]> git.baikalelectronics.ru Git - kernel.git/commit
cls_bpf: fix offload assumptions after callback conversion
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 19 Dec 2017 21:32:13 +0000 (13:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Dec 2017 18:08:18 +0000 (13:08 -0500)
commitb2268ad5919e346f335733f8885797735563db46
treef597b469e6fcb2ed5f2c9614a48041ffd3909884
parent7f639ad40f6f375cfa6c78da8003789f03f5b2e6
cls_bpf: fix offload assumptions after callback conversion

cls_bpf used to take care of tracking what offload state a filter
is in, i.e. it would track if offload request succeeded or not.
This information would then be used to issue correct requests to
the driver, e.g. requests for statistics only on offloaded filters,
removing only filters which were offloaded, using add instead of
replace if previous filter was not added etc.

This tracking of offload state no longer functions with the new
callback infrastructure.  There could be multiple entities trying
to offload the same filter.

Throw out all the tracking and corresponding commands and simply
pass to the drivers both old and new bpf program.  Drivers will
have to deal with offload state tracking by themselves.

Fixes: 7ed5c22ca4a8 ("net: sched: cls_bpf: call block callbacks for offload")
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/netronome/nfp/bpf/main.c
include/net/pkt_cls.h
net/sched/cls_bpf.c