diff mbox series

[v3] net/i40e: fix offload flag checking in simple Tx datapath

Message ID 20210511084531.34044-1-alvinx.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series [v3] net/i40e: fix offload flag checking in simple Tx datapath | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/github-robot success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhang, AlvinX May 11, 2021, 8:45 a.m. UTC
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>
---

v3: Update codes according to comments
---
 drivers/net/i40e/i40e_rxtx.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Leyi Rong May 11, 2021, 9:20 a.m. UTC | #1
> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Tuesday, May 11, 2021 4:46 PM
> 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 v3] 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>
> ---
> 
> v3: Update codes according to comments
> ---
>  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)
> +
>  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

Acked-by: Leyi Rong <leyi.rong@intel.com>
Zhang, Qi Z May 12, 2021, 8:48 a.m. UTC | #2
> -----Original Message-----
> From: Rong, Leyi <leyi.rong@intel.com>
> Sent: Tuesday, May 11, 2021 5:20 PM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v3] net/i40e: fix offload flag checking in simple Tx
> datapath
> 
> 
> > -----Original Message-----
> > From: Zhang, AlvinX <alvinx.zhang@intel.com>
> > Sent: Tuesday, May 11, 2021 4:46 PM
> > 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 v3] 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>
> > ---
> >
> > v3: Update codes according to comments
> > ---
> >  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)
> > +
> >  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
> 
> Acked-by: Leyi Rong <leyi.rong@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

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