From: Alvin Zhang Date: Tue, 11 May 2021 08:45:31 +0000 (+0800) Subject: net/i40e: fix offload flag checking in simple Tx X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=752ab161bdb7cffef1e026847428ddafc1bad6c6;p=dpdk.git net/i40e: fix offload flag checking in simple Tx Tx offload flags 'PKT_TX_IPV6, PKT_TX_IPV4, PKT_TX_OUTER_IPV6, PKT_TX_OUTER_IPV4' are supported in simple datapath. This patch removes these offload flags from packet checking in simple Tx datapath and defines 2 macro I40E_TX_OFFLOAD_SIMPLE_SUP_MASK and I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK. Fixes: 146ffa81d05e ("net/i40e: add Tx preparation for simple Tx datapath") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang Acked-by: Leyi Rong --- diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 02cf5e787c..6c58decece 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -72,6 +72,15 @@ #define I40E_TX_OFFLOAD_NOTSUP_MASK \ (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK) +#define I40E_TX_OFFLOAD_SIMPLE_SUP_MASK ( \ + PKT_TX_IPV4 | \ + PKT_TX_IPV6 | \ + PKT_TX_OUTER_IPV4 | \ + PKT_TX_OUTER_IPV6) + +#define I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK \ + (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_SIMPLE_SUP_MASK) + int i40e_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc) { @@ -1501,7 +1510,7 @@ i40e_simple_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } - if (ol_flags & PKT_TX_OFFLOAD_MASK) { + if (ol_flags & I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK) { rte_errno = ENOTSUP; return i; }