net/mlx4_core: Disallow releasing VF QPs which have steering rules
authorHadar Hen Zion <hadarh@mellanox.com>
Thu, 21 Mar 2013 05:55:55 +0000 (05:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Mar 2013 16:05:08 +0000 (12:05 -0400)
commit2c473ae7e5826c108e52f4a9d75425fd4c6f9ed1
tree51f14e32590bc9c3502df95240cf2a0cd58456f7
parent1e3f7b324e46b772dec1bb6dd96ae745fc085401
net/mlx4_core: Disallow releasing VF QPs which have steering rules

VF QPs must not be released when they have steering rules attached to them.

For that end, introduce a reference count field to the QP object in the
SRIOV resource tracker which is incremented/decremented when steering rules
are attached/detached to it. QPs can be released by VF only when their
ref count is zero.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c