net: Fix offloading indirect devices dependency on qdisc order creation
authorEli Cohen <elic@nvidia.com>
Tue, 17 Aug 2021 17:05:18 +0000 (20:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:14 +0000 (13:42 +0200)
commit6628eefa087e32f69a85fa1b3161cde1dac18555
treee0f3fd289bf61a0a6ffd6f011ebbc0ddb3bbe6fb
parent881d24d153dc7891dd7eee5cd40cc3b5f66aabf7
net: Fix offloading indirect devices dependency on qdisc order creation

[ Upstream commit 74fc4f828769cca1c3be89ea92cb88feaa27ef52 ]

Currently, when creating an ingress qdisc on an indirect device before
the driver registered for callbacks, the driver will not have a chance
to register its filter configuration callbacks.

To fix that, modify the code such that it keeps track of all the ingress
qdiscs that call flow_indr_dev_setup_offload(). When a driver calls
flow_indr_dev_register(),  go through the list of tracked ingress qdiscs
and call the driver callback entry point so as to give it a chance to
register its callback.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/flow_offload.h
net/core/flow_offload.c
net/netfilter/nf_flow_table_offload.c
net/netfilter/nf_tables_offload.c
net/sched/cls_api.c