From: Arnd Bergmann <arnd@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andy Gospodarek <andrew.gospodarek@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
Randy Schacher <stuart.schacher@broadcom.com>,
Vasundhara Volam <vasundhara-v.volam@broadcom.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] bnxt: fix building without CONFIG_RFS_ACCEL
Date: Wed, 3 Jan 2024 11:23:11 +0100 [thread overview]
Message-ID: <20240103102332.3642417-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.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@broadcom.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.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
next reply other threads:[~2024-01-03 10:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 10:23 Arnd Bergmann [this message]
2024-01-03 15:46 ` [PATCH] bnxt: fix building without CONFIG_RFS_ACCEL Andy Gospodarek
2024-01-03 16:01 ` Arnd Bergmann
2024-01-03 16:56 ` Michael Chan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240103102332.3642417-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=andrew.gospodarek@broadcom.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=stuart.schacher@broadcom.com \
--cc=vasundhara-v.volam@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).