net: sched: allow indirect blocks to bind to clsact in TC
authorJohn Hurley <john.hurley@netronome.com>
Thu, 5 Dec 2019 17:03:35 +0000 (17:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Dec 2019 04:45:09 +0000 (20:45 -0800)
commit25a443f74bcff2c4d506a39eae62fc15ad7c618a
treebabfe8574b84081e05e01343889868507159fc73
parentdbad3408896c3c5722ec9cda065468b3df16c5bf
net: sched: allow indirect blocks to bind to clsact in TC

When a device is bound to a clsact qdisc, bind events are triggered to
registered drivers for both ingress and egress. However, if a driver
registers to such a device using the indirect block routines then it is
assumed that it is only interested in ingress offload and so only replays
ingress bind/unbind messages.

The NFP driver supports the offload of some egress filters when
registering to a block with qdisc of type clsact. However, on unregister,
if the block is still active, it will not receive an unbind egress
notification which can prevent proper cleanup of other registered
callbacks.

Modify the indirect block callback command in TC to send messages of
ingress and/or egress bind depending on the qdisc in use. NFP currently
supports egress offload for TC flower offload so the changes are only
added to TC.

Fixes: 4d12ba42787b ("nfp: flower: allow offloading of matches on 'internal' ports")
Signed-off-by: John Hurley <john.hurley@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c