On 2/9/2026 5:45 PM, Bruce Richardson wrote:
Move all context descriptor handling to a single function, as with the
ice driver, and use the same function signature as that driver.
Signed-off-by: Bruce Richardson <[email protected]>
---
<snip>
+static __rte_always_inline uint16_t
+get_context_desc(uint64_t ol_flags, const struct rte_mbuf *tx_pkt,
+ const union ci_tx_offload *tx_offload,
+ const struct ci_tx_queue *txq __rte_unused,
+ uint64_t *qw0, uint64_t *qw1)
+{
+ uint16_t cd_l2tag2 = 0;
+ uint64_t cd_type_cmd_tso_mss = I40E_TX_DESC_DTYPE_CONTEXT;
+ uint32_t cd_tunneling_params = 0;
+
+ if (i40e_calc_context_desc(ol_flags) == 0)
+ return 0;
+
+ if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
+ i40e_parse_tunneling_params(ol_flags, *tx_offload,
&cd_tunneling_params);
+
+ if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
+ cd_type_cmd_tso_mss |= i40e_set_tso_ctx(ol_flags, tx_pkt,
*tx_offload);
+ } else {
+#ifdef RTE_LIBRTE_IEEE1588
+ if (ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST)
+ cd_type_cmd_tso_mss |=
+ ((uint64_t)I40E_TX_CTX_DESC_TSYN <<
I40E_TXD_CTX_QW1_CMD_SHIFT);
+#endif
I couldn't find any places where we define this, it appears to be some
sort of legacy define, making this basically dead code?
--
Thanks,
Anatoly