]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: cls_matchall: implement offload tcf_proto_op
authorJohn Hurley <john.hurley@netronome.com>
Mon, 25 Jun 2018 21:30:07 +0000 (14:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jun 2018 14:21:33 +0000 (23:21 +0900)
commit5d8550c2742d9723451676c8b5ecf1a49b0f4a43
tree53702bd0fddc409850b1ca822b9c6536882d3ff5
parentf4d3b65980c98a11ba31bca5f81cff07293f5593
net: sched: cls_matchall: implement offload tcf_proto_op

Add the reoffload tcf_proto_op in matchall to generate an offload message
for each filter in the given tcf_proto. Call the specified callback with
this new offload message. The function only returns an error if the
callback rejects adding a 'hardware only' rule.

Ensure matchall flags correctly report if the rule is in hw by keeping a
reference counter for the number of instances of the rule offloaded. Only
update the flag when this counter changes from or to 0.

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>
net/sched/cls_matchall.c