lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220510202739.67068-1-nbd@nbd.name>
Date:   Tue, 10 May 2022 22:27:39 +0200
From:   Felix Fietkau <nbd@....name>
To:     netfilter-devel@...r.kernel.org
Cc:     netdev@...r.kernel.org, pablo@...filter.org,
        Jo-Philipp Wich <jo@...n.io>
Subject: [RFC] netfilter: nf_tables: ignore errors on flowtable device hw offload setup

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@...n.io>
Signed-off-by: Felix Fietkau <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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ