Skip to content

Commit 7e617d5

Browse files
kuba-mooPaolo Abeni
authored andcommitted
eth: fbnic: fix missing programming of the default descriptor
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: 168deb7 ("eth: fbnic: Add support for XDP_TX action") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20251007232653.2099376-2-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 2854378 commit 7e617d5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/net/ethernet/meta/fbnic/fbnic_mac.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,16 @@ static void fbnic_mac_init_axi(struct fbnic_dev *fbd)
8383

8484
static void fbnic_mac_init_qm(struct fbnic_dev *fbd)
8585
{
86+
u64 default_meta = FIELD_PREP(FBNIC_TWD_L2_HLEN_MASK, ETH_HLEN) |
87+
FBNIC_TWD_FLAG_REQ_COMPLETION;
8688
u32 clock_freq;
8789

90+
/* Configure default TWQ Metadata descriptor */
91+
wr32(fbd, FBNIC_QM_TWQ_DEFAULT_META_L,
92+
lower_32_bits(default_meta));
93+
wr32(fbd, FBNIC_QM_TWQ_DEFAULT_META_H,
94+
upper_32_bits(default_meta));
95+
8896
/* Configure TSO behavior */
8997
wr32(fbd, FBNIC_QM_TQS_CTL0,
9098
FIELD_PREP(FBNIC_QM_TQS_CTL0_LSO_TS_MASK,

0 commit comments

Comments
 (0)