]> git.baikalelectronics.ru Git - kernel.git/commit
net: flow_offload: simplify hw stats check handling
authorEdward Cree <ecree@solarflare.com>
Wed, 20 May 2020 18:18:10 +0000 (19:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 22:52:08 +0000 (15:52 -0700)
commit201b4a88810e7039eb4a90a8c7913ac43d576b5b
tree2ddae67686976fea72d805cd55e3627f0be77391
parentdce21ba7fbdf9e0133a4bd2df65b3369480f45c8
net: flow_offload: simplify hw stats check handling

Make FLOW_ACTION_HW_STATS_DONT_CARE be all bits, rather than none, so that
 drivers and __flow_action_hw_stats_check can use simple bitwise checks.

Pre-fill all actions with DONT_CARE in flow_rule_alloc(), rather than
 relying on implicit semantics of zero from kzalloc, so that callers which
 don't configure action stats themselves (i.e. netfilter) get the correct
 behaviour by default.

Only the kernel's internal API semantics change; the TC uAPI is unaffected.

v4: move DONT_CARE setting to flow_rule_alloc() for robustness and simplicity.

v3: set DONT_CARE in nft and ct offload.

v2: rebased on net-next, removed RFC tags.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
include/net/flow_offload.h
net/core/flow_offload.c