IB/mlx5: Check supported flow table size
authorMaor Gottlieb <maorg@mellanox.com>
Wed, 29 Mar 2017 03:09:00 +0000 (06:09 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 21 Apr 2017 16:26:05 +0000 (12:26 -0400)
commitdac388ef4cc7a9250e59b4093b78e33da9495c6d
tree43c06486d556399a02f4a939012e5d33491795f4
parent1377661298d2820d675553d186c31b6f46c140d0
IB/mlx5: Check supported flow table size

Check that the required flow table size is supported
by device. Return ENOMEM error if no space left.

In addition change the create flow table routine
to return ENOMEM instead of ENOSPC.

Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support')
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c