]> 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)
commit04e7ea09bb7d77178c037effcbea6ec74d573ca8
tree4822f70f6a93723b81f2d79cf1b827a9963f03d6
parentc8bbd109b9ef1e2e18c67b4b9824196b59a67e7b
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