]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: support offloading multiple rules with same cookie
authorJohn Hurley <john.hurley@netronome.com>
Wed, 25 Apr 2018 04:17:03 +0000 (21:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Apr 2018 18:07:04 +0000 (14:07 -0400)
commitf131ef4d7711ecb554fc7e9e054483721de5f05a
tree39f5b30426c3d85926512bd88f3b240f80f75a3a
parent9a10f2756baddbaf2d5397412f9b9f39beddc64f
nfp: flower: support offloading multiple rules with same cookie

When multiple netdevs are attached to a tc offload block and register for
callbacks, a rule added to the block will be propogated to all netdevs.
Previously these were detected as duplicates (based on cookie) and
rejected. Modify the rule nfp lookup function to optionally include an
ingress netdev and a host context along with the cookie value when
searching for a rule. When a new rule is passed to the driver, the netdev
the rule is to be attached to is considered when searching for dublicates.
When a stats update is received from HW, the host context is used
alongside the cookie to map to the correct host rule.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/metadata.c
drivers/net/ethernet/netronome/nfp/flower/offload.c