]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Use flag to properly monitor a flow rule offloading state
authorHadar Hen Zion <hadarh@mellanox.com>
Tue, 14 Feb 2017 12:03:45 +0000 (14:03 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 30 Apr 2017 13:03:09 +0000 (16:03 +0300)
commitc874360c38d82d3e3e9fa7acc317cd50a9064efb
tree4822f70f6a93723b81f2d79cf1b827a9963f03d6
parent27f5511b9c0726cba48527d714b411bb4766eceb
net/mlx5e: Use flag to properly monitor a flow rule offloading state

Instead of relaying on the 'flow->rule' pointer value which can be
valid or invalid (in case the FW returns an error while trying to offload
the rule), monitor the rule state using a flag.

In downstream patch which adds support to IP tunneling neigh update
flow, a TC rule could be cached in the driver and not offloaded into the
HW. In this case, the flow handle pointer stays NULL.

Check the offloaded flag to properly deal with rules which are currently
not offloaded when querying rule statistics.

This patch doesn't add any new functionality.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c