All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] netfilter: nf_tables: ignore errors on flowtable device hw offload setup
@ 2022-05-10 20:27 Felix Fietkau
  2022-05-13  7:49 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 12+ messages in thread
From: Felix Fietkau @ 2022-05-10 20:27 UTC (permalink / raw)
  To: netfilter-devel; +Cc: netdev, pablo, Jo-Philipp Wich

In many cases, it's not easily possible for user space to know, which
devices properly support hardware offload. Even if a device supports hardware
flow offload, it is not guaranteed that it will actually be able to handle
the flows for which hardware offload is requested.

Ignoring errors on the FLOW_BLOCK_BIND makes it a lot easier to set up
configurations that use hardware offload where possible and gracefully
fall back to software offload for everything else.

Cc: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/netfilter/nf_tables_api.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 16c3a39689f4..9d4528f0aa12 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7323,11 +7323,9 @@ static int nft_register_flowtable_net_hooks(struct net *net,
 			}
 		}
 
-		err = flowtable->data.type->setup(&flowtable->data,
-						  hook->ops.dev,
-						  FLOW_BLOCK_BIND);
-		if (err < 0)
-			goto err_unregister_net_hooks;
+		flowtable->data.type->setup(&flowtable->data,
+					    hook->ops.dev,
+					    FLOW_BLOCK_BIND);
 
 		err = nf_register_net_hook(net, &hook->ops);
 		if (err < 0) {
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-05-30 18:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 20:27 [RFC] netfilter: nf_tables: ignore errors on flowtable device hw offload setup Felix Fietkau
2022-05-13  7:49 ` Pablo Neira Ayuso
2022-05-13  8:03   ` Felix Fietkau
2022-05-13  8:15     ` Pablo Neira Ayuso
2022-05-13  9:09       ` Felix Fietkau
2022-05-16  0:57         ` Pablo Neira Ayuso
2022-05-19 15:37           ` Felix Fietkau
2022-05-20  7:50             ` Pablo Neira Ayuso
2022-05-20 18:07               ` Felix Fietkau
2022-05-20 21:47                 ` Pablo Neira Ayuso
2022-05-30 16:55                   ` Pablo Neira Ayuso
2022-05-30 18:52                     ` Felix Fietkau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.