Skip to content
/ linux Public

Commit c55ba75

Browse files
beshlemangregkh
authored andcommitted
eth: fbnic: set DMA_HINT_L4 for all flows
[ Upstream commit 0f30a31 ] fbnic always advertises ETHTOOL_TCP_DATA_SPLIT_ENABLED via ethtool .get_ringparam. To enable proper splitting for all flow types, even for IP/Ethernet flows, this patch sets DMA_HINT_L4 unconditionally for all RSS and NFC flow steering rules. According to the spec, L4 falls back to L3 if no valid L4 is found, and L3 falls back to L2 if no L3 is found. This makes sure that the correct header boundary is used regardless of traffic type. This is important for zero-copy use cases where we must ensure that all ZC packets are split correctly. Fixes: 2b30fc0 ("eth: fbnic: Add support for HDS configuration") Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com> Link: https://patch.msgid.link/20260211-fbnic-tcp-hds-fixes-v1-3-55d050e6f606@meta.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent aa090d2 commit c55ba75

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,9 @@ static int fbnic_set_cls_rule_ins(struct fbnic_net *fbn,
11421142
return -EINVAL;
11431143
}
11441144

1145+
dest |= FIELD_PREP(FBNIC_RPC_ACT_TBL0_DMA_HINT,
1146+
FBNIC_RCD_HDR_AL_DMA_HINT_L4);
1147+
11451148
/* Write action table values */
11461149
act_tcam->dest = dest;
11471150
act_tcam->rss_en_mask = fbnic_flow_hash_2_rss_en_mask(fbn, hash_idx);

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,8 @@ void fbnic_rss_reinit(struct fbnic_dev *fbd, struct fbnic_net *fbn)
338338
else if (tstamp_mask & (1u << flow_type))
339339
dest |= FBNIC_RPC_ACT_TBL0_TS_ENA;
340340

341-
if (act1_value[flow_type] & FBNIC_RPC_TCAM_ACT1_L4_VALID)
342-
dest |= FIELD_PREP(FBNIC_RPC_ACT_TBL0_DMA_HINT,
343-
FBNIC_RCD_HDR_AL_DMA_HINT_L4);
341+
dest |= FIELD_PREP(FBNIC_RPC_ACT_TBL0_DMA_HINT,
342+
FBNIC_RCD_HDR_AL_DMA_HINT_L4);
344343

345344
rss_en_mask = fbnic_flow_hash_2_rss_en_mask(fbn, flow_type);
346345

0 commit comments

Comments
 (0)