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: 146ffa81d0 ("net/i40e: add Tx preparation for simple Tx datapath")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Leyi Rong <leyi.rong@intel.com>
This commit is contained in:
Alvin Zhang 2021-05-11 16:45:31 +08:00 committed by Qi Zhang
parent 39ecdd3dfa
commit 752ab161bd

View File

@ -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;
}