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: <20240103102332.3642417-1-arnd@kernel.org>
Date: Wed,  3 Jan 2024 11:23:11 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Michael Chan <michael.chan@...adcom.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Andy Gospodarek <andrew.gospodarek@...adcom.com>,
	Pavan Chebbi <pavan.chebbi@...adcom.com>,
	Somnath Kotur <somnath.kotur@...adcom.com>,
	Kalesh AP <kalesh-anakkur.purayil@...adcom.com>,
	Randy Schacher <stuart.schacher@...adcom.com>,
	Vasundhara Volam <vasundhara-v.volam@...adcom.com>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] bnxt: fix building without CONFIG_RFS_ACCEL

From: Arnd Bergmann <arnd@...db.de>

A recent patch series generalized the filter logic in bnxt to no
longer just be used for RFS, but it now fails to build when RFS_ACCEL
is disabled:

drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_cfg_ntp_filters':
drivers/net/ethernet/broadcom/bnxt/bnxt.c:14077:37: error: implicit declaration of function 'rps_may_expire_flow' [-Werror=implicit-function-declaration]
14077 |                                 if (rps_may_expire_flow(bp->dev, fltr->base.rxq,
      |                                     ^~~~~~~~~~~~~~~~~~~

Add back one #ifdef check around a call to the missing rps_may_expire_flow()
function.

Fixes: 59cde76f33fa ("bnxt_en: Refactor filter insertion logic in bnxt_rx_flow_steer().")
Cc: Michael Chan <michael.chan@...adcom.com>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
I don't know if this is a correct fix, only checked that it is plausible
and that it does address the build failure. If a different fix is needed,
please just treat this as a bug report.
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 827821e89c40..83a97c65b728 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -14074,6 +14074,7 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
 			if (test_bit(BNXT_FLTR_VALID, &fltr->base.state)) {
 				if (fltr->base.flags & BNXT_ACT_NO_AGING)
 					continue;
+#if IS_ENABLED(CONFIG_RFS_ACCEL)
 				if (rps_may_expire_flow(bp->dev, fltr->base.rxq,
 							fltr->flow_id,
 							fltr->base.sw_id)) {
@@ -14081,6 +14082,7 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
 									 fltr);
 					del = true;
 				}
+#endif
 			} else {
 				rc = bnxt_hwrm_cfa_ntuple_filter_alloc(bp,
 								       fltr);
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ