From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, bpf@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>,
alexanderduyck@fb.com, jacob.e.keller@intel.com,
mohsin.bashr@gmail.com
Subject: [PATCH net v2 1/9] eth: fbnic: fix missing programming of the default descriptor
Date: Tue, 7 Oct 2025 16:26:45 -0700 [thread overview]
Message-ID: <20251007232653.2099376-2-kuba@kernel.org> (raw)
In-Reply-To: <20251007232653.2099376-1-kuba@kernel.org>
XDP_TX typically uses no offloads. To optimize XDP we added a "default
descriptor" feature to the chip, which allows us to send XDP frames with
just the buffer descriptors (DMA address + length). All the metadata
descriptors are derived from the queue config.
Commit under Fixes missed adding setting the defaults up when transplanting
the code from the prototype driver. Importantly after reset the "request
completion" bit is not set. Packets still get sent but there's no
completion, so ring is not cleaned up. We can send one ring's worth
of packets and then will start dropping all frames that got the XDP_TX
action from the XDP prog.
Reviewed-by: Simon Horman <horms@kernel.org>
Fixes: 168deb7b31b2 ("eth: fbnic: Add support for XDP_TX action")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: alexanderduyck@fb.com
CC: jacob.e.keller@intel.com
CC: mohsin.bashr@gmail.com
---
drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
index 8f998d26b9a3..2a84bd1d7e26 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
@@ -83,8 +83,16 @@ static void fbnic_mac_init_axi(struct fbnic_dev *fbd)
static void fbnic_mac_init_qm(struct fbnic_dev *fbd)
{
+ u64 default_meta = FIELD_PREP(FBNIC_TWD_L2_HLEN_MASK, ETH_HLEN) |
+ FBNIC_TWD_FLAG_REQ_COMPLETION;
u32 clock_freq;
+ /* Configure default TWQ Metadata descriptor */
+ wr32(fbd, FBNIC_QM_TWQ_DEFAULT_META_L,
+ lower_32_bits(default_meta));
+ wr32(fbd, FBNIC_QM_TWQ_DEFAULT_META_H,
+ upper_32_bits(default_meta));
+
/* Configure TSO behavior */
wr32(fbd, FBNIC_QM_TQS_CTL0,
FIELD_PREP(FBNIC_QM_TQS_CTL0_LSO_TS_MASK,
--
2.51.0
next prev parent reply other threads:[~2025-10-07 23:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 23:26 [PATCH net v2 0/9] eth: fbnic: fix XDP_TX and XDP vs qstats Jakub Kicinski
2025-10-07 23:26 ` Jakub Kicinski [this message]
2025-10-08 23:28 ` [PATCH net v2 1/9] eth: fbnic: fix missing programming of the default descriptor Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 2/9] eth: fbnic: fix accounting of XDP packets Jakub Kicinski
2025-10-08 23:29 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 3/9] eth: fbnic: fix saving stats from XDP_TX rings on close Jakub Kicinski
2025-10-08 23:30 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 4/9] selftests: drv-net: xdp: rename netnl to ethnl Jakub Kicinski
2025-10-08 23:31 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 5/9] selftests: drv-net: xdp: add test for interface level qstats Jakub Kicinski
2025-10-08 23:32 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 6/9] eth: fbnic: fix reporting of alloc_failed qstats Jakub Kicinski
2025-10-08 23:33 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 7/9] selftests: drv-net: fix linter warnings in pp_alloc_fail Jakub Kicinski
2025-10-08 23:34 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 8/9] selftests: drv-net: pp_alloc_fail: lower traffic expectations Jakub Kicinski
2025-10-08 23:35 ` Jacob Keller
2025-10-07 23:26 ` [PATCH net v2 9/9] selftests: drv-net: pp_alloc_fail: add necessary optoins to config Jakub Kicinski
2025-10-08 23:35 ` Jacob Keller
2025-10-09 9:20 ` [PATCH net v2 0/9] eth: fbnic: fix XDP_TX and XDP vs qstats patchwork-bot+netdevbpf
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=20251007232653.2099376-2-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).