Message ID | 20210511023926.27296-1-alvinx.zhang@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Qi Zhang |
Headers | show |
Series | [v2] net/i40e: fix offload flag checking in simple Tx datapath | expand |
Context | Check | Description |
---|---|---|
ci/iol-mellanox-Functional | fail | Functional Testing issues |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/intel-Testing | success | Testing PASS |
ci/github-robot | success | github build: passed |
ci/iol-abi-testing | success | Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-testing | success | Testing PASS |
ci/iol-intel-Functional | success | Functional Testing PASS |
ci/checkpatch | success | coding style OK |
> -----Original Message----- > From: Zhang, AlvinX <alvinx.zhang@intel.com> > Sent: Tuesday, May 11, 2021 10:39 AM > To: Xing, Beilei <beilei.xing@intel.com>; Rong, Leyi <leyi.rong@intel.com> > Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org > Subject: [PATCH v2] net/i40e: fix offload flag checking in simple Tx datapath > > 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 <alvinx.zhang@intel.com> > --- > drivers/net/i40e/i40e_rxtx.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index > 02cf5e7..337916b 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) Hi Alvin, Better to use ^ oprand here, think about the situation when setting a flag in I40E_TX_OFFLOAD_SIMPLE_SUP_MASK but not in the PKT_TX_OFFLOAD_MASK, the result is going to be unexpected. > + > int > i40e_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc) > { @@ -1501,7 +1510,7 @@ > return i; > } > > - if (ol_flags & PKT_TX_OFFLOAD_MASK) { > + if (ol_flags & I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK) { > rte_errno = ENOTSUP; > return i; > } > -- > 1.8.3.1
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 02cf5e7..337916b 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 @@ return i; } - if (ol_flags & PKT_TX_OFFLOAD_MASK) { + if (ol_flags & I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK) { rte_errno = ENOTSUP; return i; }
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 <alvinx.zhang@intel.com> --- drivers/net/i40e/i40e_rxtx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)