]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: call reoffload op on block callback reg
authorJohn Hurley <john.hurley@netronome.com>
Mon, 25 Jun 2018 21:30:10 +0000 (14:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jun 2018 14:21:33 +0000 (23:21 +0900)
commit2958c9587972c6704240a19a85681a6482b28415
treec0a910ed8cf411968ae1dc86ec9423a7a0c80e4f
parentfbc48bfbc6383ac4fbd5052e411703a1d0cd2f12
net: sched: call reoffload op on block callback reg

Call the reoffload tcf_proto_op on all tcf_proto nodes in all chains of a
block when a callback tries to register to a block that already has
offloaded rules. If all existing rules cannot be offloaded then the
registration is rejected. This replaces the previous policy of rejecting
such callback registration outright.

On unregistration of a callback, the rules are flushed for that given cb.
The implementation of block sharing in the NFP driver, for example,
duplicates shared rules to all devs bound to a block. This meant that
rules could still exist in hw even after a device is unbound from a block
(assuming the block still remains active).

Signed-off-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
include/net/pkt_cls.h
net/sched/cls_api.c