]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7461f47bd4d08cf4971675f8d5662fd352e80a7b
treebabfe8574b84081e05e01343889868507159fc73
parent66a43eecc09628bda4c78f8d512f561cf1d6630b
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: b0b9f858a275 ("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