DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
@ 2021-08-16  7:09 Nithin Dabilpuram
  2021-08-16  7:09 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx Nithin Dabilpuram
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nithin Dabilpuram @ 2021-08-16  7:09 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: jerinj, dev, Nithin Dabilpuram, jia.guo, stable

Donot use outer metadata when neither outer ip checksum nor
outer udp checksum is enabled. PMD's will ignore the
outer_l2_len and outer_l3_len in cases where none of
the outer checksum is enabled and hence only l2_len and
l3_len will be used to calculate the offsets for L2 or L3
header.

Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
Cc: jia.guo@intel.com
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 app/test-pmd/csumonly.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 607c889..38cc256 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 			    (tx_offloads &
 			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
 			    (tx_offloads &
-			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
-			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
+			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
 				m->outer_l2_len = info.outer_l2_len;
 				m->outer_l3_len = info.outer_l3_len;
 				m->l2_len = info.l2_len;
-- 
2.8.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
  2021-08-16  7:09 [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Nithin Dabilpuram
@ 2021-08-16  7:09 ` Nithin Dabilpuram
  2021-08-17  1:54   ` Li, Xiaoyun
  2021-08-16  8:48 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Li, Xiaoyun
  2021-08-17  1:44 ` Li, Xiaoyun
  2 siblings, 1 reply; 10+ messages in thread
From: Nithin Dabilpuram @ 2021-08-16  7:09 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: jerinj, dev, Nithin Dabilpuram, rasland, stable

Fix verbose mode dump for Tx to dump tx offload flags instead of
Rx offload flags.

Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate function")
Cc: rasland@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 app/test-pmd/util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 5dd7157..14a9a25 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
 			  (unsigned int) queue);
 		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
-		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+		if (is_rx)
+			rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+		else
+			rte_get_tx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+
 		MKDUMPSTR(print_buf, buf_size, cur_len,
 			  "  ol_flags: %s\n", buf);
 		if (rte_mbuf_check(mb, 1, &reason) < 0)
-- 
2.8.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
  2021-08-16  7:09 [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Nithin Dabilpuram
  2021-08-16  7:09 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx Nithin Dabilpuram
@ 2021-08-16  8:48 ` Li, Xiaoyun
  2021-08-16 10:55   ` Nithin Dabilpuram
  2021-08-17  1:44 ` Li, Xiaoyun
  2 siblings, 1 reply; 10+ messages in thread
From: Li, Xiaoyun @ 2021-08-16  8:48 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: jerinj, dev, jia.guo, stable

Hi

> -----Original Message-----
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Sent: Monday, August 16, 2021 15:10
> To: Li, Xiaoyun <xiaoyun.li@intel.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; jia.guo@intel.com; stable@dpdk.org
> Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer
> chksum
> 
> Donot use outer metadata when neither outer ip checksum nor outer udp
> checksum is enabled. PMD's will ignore the outer_l2_len and outer_l3_len in
> cases where none of the outer checksum is enabled and hence only l2_len and
> l3_len will be used to calculate the offsets for L2 or L3 header.

I don't understand.
In process_outer_chksum, only PKT_TX_OUTER_IPV6 Will be set if it's ipv6 packets.
So PKT_TX_OUTER_IPV6 means this packet is tunnel ipv6 packet. So it actually needs outer l2 len and outer l3 len put them to hw.
At least i40e needs outer l2 len and outer l3 len as far as I know.

> 
> Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
> Cc: jia.guo@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  app/test-pmd/csumonly.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index
> 607c889..38cc256 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
>  			    (tx_offloads &
>  			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
>  			    (tx_offloads &
> -			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
> -			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
> +			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
>  				m->outer_l2_len = info.outer_l2_len;
>  				m->outer_l3_len = info.outer_l3_len;
>  				m->l2_len = info.l2_len;
> --
> 2.8.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
  2021-08-16  8:48 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Li, Xiaoyun
@ 2021-08-16 10:55   ` Nithin Dabilpuram
  2021-08-17  1:43     ` Li, Xiaoyun
  0 siblings, 1 reply; 10+ messages in thread
From: Nithin Dabilpuram @ 2021-08-16 10:55 UTC (permalink / raw)
  To: Li, Xiaoyun; +Cc: jerinj, dev, jia.guo, stable

On Mon, Aug 16, 2021 at 08:48:20AM +0000, Li, Xiaoyun wrote:
> Hi
> 
> > -----Original Message-----
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Sent: Monday, August 16, 2021 15:10
> > To: Li, Xiaoyun <xiaoyun.li@intel.com>
> > Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> > <ndabilpuram@marvell.com>; jia.guo@intel.com; stable@dpdk.org
> > Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer
> > chksum
> > 
> > Donot use outer metadata when neither outer ip checksum nor outer udp
> > checksum is enabled. PMD's will ignore the outer_l2_len and outer_l3_len in
> > cases where none of the outer checksum is enabled and hence only l2_len and
> > l3_len will be used to calculate the offsets for L2 or L3 header.
> 
> I don't understand.
> In process_outer_chksum, only PKT_TX_OUTER_IPV6 Will be set if it's ipv6 packets.
> So PKT_TX_OUTER_IPV6 means this packet is tunnel ipv6 packet. So it actually needs outer l2 len and outer l3 len put them to hw.
> At least i40e needs outer l2 len and outer l3 len as far as I know.

Ok, do you mean m->outer_l2_len and m->outer_l3_len will be referred in i40e driver
even when both DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM and 
DEV_TX_OFFLOAD_OUTER_UDP_CKSUM are not enabled in ethdev Tx offloads ?

I thought as per spec, those fields will only be used when the Outer offloads
are enabled.

> 
> > 
> > Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
> > Cc: jia.guo@intel.com
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >  app/test-pmd/csumonly.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index
> > 607c889..38cc256 100644
> > --- a/app/test-pmd/csumonly.c
> > +++ b/app/test-pmd/csumonly.c
> > @@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
> >  			    (tx_offloads &
> >  			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> >  			    (tx_offloads &
> > -			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
> > -			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
> > +			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
> >  				m->outer_l2_len = info.outer_l2_len;
> >  				m->outer_l3_len = info.outer_l3_len;
> >  				m->l2_len = info.l2_len;
> > --
> > 2.8.4
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
  2021-08-16 10:55   ` Nithin Dabilpuram
@ 2021-08-17  1:43     ` Li, Xiaoyun
  2021-08-17 10:58       ` Nithin Dabilpuram
  0 siblings, 1 reply; 10+ messages in thread
From: Li, Xiaoyun @ 2021-08-17  1:43 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: jerinj, dev, stable



> -----Original Message-----
> From: Nithin Dabilpuram <nithind1988@gmail.com>
> Sent: Monday, August 16, 2021 18:56
> To: Li, Xiaoyun <xiaoyun.li@intel.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; jia.guo@intel.com; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run
> without outer chksum
> 
> On Mon, Aug 16, 2021 at 08:48:20AM +0000, Li, Xiaoyun wrote:
> > Hi
> >
> > > -----Original Message-----
> > > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > > Sent: Monday, August 16, 2021 15:10
> > > To: Li, Xiaoyun <xiaoyun.li@intel.com>
> > > Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> > > <ndabilpuram@marvell.com>; jia.guo@intel.com; stable@dpdk.org
> > > Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without
> > > outer chksum
> > >
> > > Donot use outer metadata when neither outer ip checksum nor outer
> > > udp checksum is enabled. PMD's will ignore the outer_l2_len and
> > > outer_l3_len in cases where none of the outer checksum is enabled
> > > and hence only l2_len and l3_len will be used to calculate the offsets for L2
> or L3 header.
> >
> > I don't understand.
> > In process_outer_chksum, only PKT_TX_OUTER_IPV6 Will be set if it's ipv6
> packets.
> > So PKT_TX_OUTER_IPV6 means this packet is tunnel ipv6 packet. So it actually
> needs outer l2 len and outer l3 len put them to hw.
> > At least i40e needs outer l2 len and outer l3 len as far as I know.
> 
> Ok, do you mean m->outer_l2_len and m->outer_l3_len will be referred in i40e
> driver even when both DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM and
> DEV_TX_OFFLOAD_OUTER_UDP_CKSUM are not enabled in ethdev Tx offloads ?
> 
> I thought as per spec, those fields will only be used when the Outer offloads are
> enabled.

Checked again. You're right. Tx offloads are enough.

> 
> >
> > >
> > > Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
> > > Cc: jia.guo@intel.com
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > > ---
> > >  app/test-pmd/csumonly.c | 3 +--
> > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index
> > > 607c889..38cc256 100644
> > > --- a/app/test-pmd/csumonly.c
> > > +++ b/app/test-pmd/csumonly.c
> > > @@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
> > >  			    (tx_offloads &
> > >  			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> > >  			    (tx_offloads &
> > > -			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
> > > -			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
> > > +			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
> > >  				m->outer_l2_len = info.outer_l2_len;
> > >  				m->outer_l3_len = info.outer_l3_len;
> > >  				m->l2_len = info.l2_len;
> > > --
> > > 2.8.4
> >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
  2021-08-16  7:09 [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Nithin Dabilpuram
  2021-08-16  7:09 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx Nithin Dabilpuram
  2021-08-16  8:48 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Li, Xiaoyun
@ 2021-08-17  1:44 ` Li, Xiaoyun
  2021-08-25 12:57   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  2 siblings, 1 reply; 10+ messages in thread
From: Li, Xiaoyun @ 2021-08-17  1:44 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: jerinj, dev, jia.guo, stable



> -----Original Message-----
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Sent: Monday, August 16, 2021 15:10
> To: Li, Xiaoyun <xiaoyun.li@intel.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; jia.guo@intel.com; stable@dpdk.org
> Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer
> chksum
> 
> Donot use outer metadata when neither outer ip checksum nor outer udp
> checksum is enabled. PMD's will ignore the outer_l2_len and outer_l3_len in
> cases where none of the outer checksum is enabled and hence only l2_len and
> l3_len will be used to calculate the offsets for L2 or L3 header.
> 
> Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
> Cc: jia.guo@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  app/test-pmd/csumonly.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index
> 607c889..38cc256 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
>  			    (tx_offloads &
>  			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
>  			    (tx_offloads &
> -			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
> -			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
> +			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
>  				m->outer_l2_len = info.outer_l2_len;
>  				m->outer_l3_len = info.outer_l3_len;
>  				m->l2_len = info.l2_len;
> --
> 2.8.4

Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
  2021-08-16  7:09 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx Nithin Dabilpuram
@ 2021-08-17  1:54   ` Li, Xiaoyun
  2021-08-17  7:54     ` Raslan Darawsheh
  0 siblings, 1 reply; 10+ messages in thread
From: Li, Xiaoyun @ 2021-08-17  1:54 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: jerinj, dev, rasland, stable



> -----Original Message-----
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Sent: Monday, August 16, 2021 15:10
> To: Li, Xiaoyun <xiaoyun.li@intel.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; rasland@mellanox.com; stable@dpdk.org
> Subject: [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
> 
> Fix verbose mode dump for Tx to dump tx offload flags instead of Rx offload
> flags.
> 
> Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate
> function")
> Cc: rasland@mellanox.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  app/test-pmd/util.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index 5dd7157..14a9a25
> 100644
> --- a/app/test-pmd/util.c
> +++ b/app/test-pmd/util.c
> @@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue,
> struct rte_mbuf *pkts[],
>  			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
>  			  (unsigned int) queue);
>  		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
> -		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> +		if (is_rx)
> +			rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> +		else
> +			rte_get_tx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> +
>  		MKDUMPSTR(print_buf, buf_size, cur_len,
>  			  "  ol_flags: %s\n", buf);
>  		if (rte_mbuf_check(mb, 1, &reason) < 0)
> --
> 2.8.4

Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
  2021-08-17  1:54   ` Li, Xiaoyun
@ 2021-08-17  7:54     ` Raslan Darawsheh
  0 siblings, 0 replies; 10+ messages in thread
From: Raslan Darawsheh @ 2021-08-17  7:54 UTC (permalink / raw)
  To: Li, Xiaoyun, Nithin Dabilpuram; +Cc: jerinj, dev, stable

Hi,

> -----Original Message-----
> From: Li, Xiaoyun <xiaoyun.li@intel.com>
> Sent: Tuesday, August 17, 2021 4:54 AM
> To: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; Raslan Darawsheh
> <rasland@nvidia.com>; stable@dpdk.org
> Subject: RE: [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
> 
> 
> 
> > -----Original Message-----
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Sent: Monday, August 16, 2021 15:10
> > To: Li, Xiaoyun <xiaoyun.li@intel.com>
> > Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> > <ndabilpuram@marvell.com>; rasland@mellanox.com; stable@dpdk.org
> > Subject: [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
> >
> > Fix verbose mode dump for Tx to dump tx offload flags instead of Rx
> offload
> > flags.
> >
> > Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate
> > function")
> > Cc: rasland@mellanox.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >  app/test-pmd/util.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index
> 5dd7157..14a9a25
> > 100644
> > --- a/app/test-pmd/util.c
> > +++ b/app/test-pmd/util.c
> > @@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t
> queue,
> > struct rte_mbuf *pkts[],
> >  			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
> >  			  (unsigned int) queue);
> >  		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
> > -		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> > +		if (is_rx)
> > +			rte_get_rx_ol_flag_list(mb->ol_flags, buf,
> sizeof(buf));
> > +		else
> > +			rte_get_tx_ol_flag_list(mb->ol_flags, buf,
> sizeof(buf));
> > +
> >  		MKDUMPSTR(print_buf, buf_size, cur_len,
> >  			  "  ol_flags: %s\n", buf);
> >  		if (rte_mbuf_check(mb, 1, &reason) < 0)
> > --
> > 2.8.4
> 
> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
  2021-08-17  1:43     ` Li, Xiaoyun
@ 2021-08-17 10:58       ` Nithin Dabilpuram
  0 siblings, 0 replies; 10+ messages in thread
From: Nithin Dabilpuram @ 2021-08-17 10:58 UTC (permalink / raw)
  To: Li, Xiaoyun; +Cc: jerinj, dev, stable

On Tue, Aug 17, 2021 at 01:43:27AM +0000, Li, Xiaoyun wrote:
> 
> 
> > -----Original Message-----
> > From: Nithin Dabilpuram <nithind1988@gmail.com>
> > Sent: Monday, August 16, 2021 18:56
> > To: Li, Xiaoyun <xiaoyun.li@intel.com>
> > Cc: jerinj@marvell.com; dev@dpdk.org; jia.guo@intel.com; stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run
> > without outer chksum
> > 
> > On Mon, Aug 16, 2021 at 08:48:20AM +0000, Li, Xiaoyun wrote:
> > > Hi
> > >
> > > > -----Original Message-----
> > > > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > > > Sent: Monday, August 16, 2021 15:10
> > > > To: Li, Xiaoyun <xiaoyun.li@intel.com>
> > > > Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> > > > <ndabilpuram@marvell.com>; jia.guo@intel.com; stable@dpdk.org
> > > > Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without
> > > > outer chksum
> > > >
> > > > Donot use outer metadata when neither outer ip checksum nor outer
> > > > udp checksum is enabled. PMD's will ignore the outer_l2_len and
> > > > outer_l3_len in cases where none of the outer checksum is enabled
> > > > and hence only l2_len and l3_len will be used to calculate the offsets for L2
> > or L3 header.
> > >
> > > I don't understand.
> > > In process_outer_chksum, only PKT_TX_OUTER_IPV6 Will be set if it's ipv6
> > packets.
> > > So PKT_TX_OUTER_IPV6 means this packet is tunnel ipv6 packet. So it actually
> > needs outer l2 len and outer l3 len put them to hw.
> > > At least i40e needs outer l2 len and outer l3 len as far as I know.
> > 
> > Ok, do you mean m->outer_l2_len and m->outer_l3_len will be referred in i40e
> > driver even when both DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM and
> > DEV_TX_OFFLOAD_OUTER_UDP_CKSUM are not enabled in ethdev Tx offloads ?
> > 
> > I thought as per spec, those fields will only be used when the Outer offloads are
> > enabled.
> 
> Checked again. You're right. Tx offloads are enough.

Ack, thanks.
> 
> > 
> > >
> > > >
> > > > Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
> > > > Cc: jia.guo@intel.com
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > > > ---
> > > >  app/test-pmd/csumonly.c | 3 +--
> > > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > >
> > > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index
> > > > 607c889..38cc256 100644
> > > > --- a/app/test-pmd/csumonly.c
> > > > +++ b/app/test-pmd/csumonly.c
> > > > @@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
> > > >  			    (tx_offloads &
> > > >  			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> > > >  			    (tx_offloads &
> > > > -			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
> > > > -			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
> > > > +			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
> > > >  				m->outer_l2_len = info.outer_l2_len;
> > > >  				m->outer_l3_len = info.outer_l3_len;
> > > >  				m->l2_len = info.l2_len;
> > > > --
> > > > 2.8.4
> > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
  2021-08-17  1:44 ` Li, Xiaoyun
@ 2021-08-25 12:57   ` Ferruh Yigit
  0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-08-25 12:57 UTC (permalink / raw)
  To: Li, Xiaoyun, Nithin Dabilpuram; +Cc: jerinj, dev, jia.guo, stable

On 8/17/2021 2:44 AM, Li, Xiaoyun wrote:
> 
> 
>> -----Original Message-----
>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>> Sent: Monday, August 16, 2021 15:10
>> To: Li, Xiaoyun <xiaoyun.li@intel.com>
>> Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
>> <ndabilpuram@marvell.com>; jia.guo@intel.com; stable@dpdk.org
>> Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer
>> chksum
>>
>> Donot use outer metadata when neither outer ip checksum nor outer udp
>> checksum is enabled. PMD's will ignore the outer_l2_len and outer_l3_len in
>> cases where none of the outer checksum is enabled and hence only l2_len and
>> l3_len will be used to calculate the offsets for L2 or L3 header.
>>
>> Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
>> Cc: jia.guo@intel.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>>
> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
> 

Series applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-25 12:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16  7:09 [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Nithin Dabilpuram
2021-08-16  7:09 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx Nithin Dabilpuram
2021-08-17  1:54   ` Li, Xiaoyun
2021-08-17  7:54     ` Raslan Darawsheh
2021-08-16  8:48 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum Li, Xiaoyun
2021-08-16 10:55   ` Nithin Dabilpuram
2021-08-17  1:43     ` Li, Xiaoyun
2021-08-17 10:58       ` Nithin Dabilpuram
2021-08-17  1:44 ` Li, Xiaoyun
2021-08-25 12:57   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).