app/testpmd: fix csumonly mode when run without outer chksum
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.
--- app/test-pmd/csumonly.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
app/test-pmd/csumonly.c +1 -2
@@ -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;
Signature · 1 line
2.8.4
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.
--- app/test-pmd/util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
app/test-pmd/util.c +5 -1
@@ -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 )
Signature · 1 line
2.8.4
Re: [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
Quoted 40 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 2/2] app/testpmd: fix verbose mode dump for TxFix verbose mode dump for Tx to dump tx offload flags instead of Rx offload flags.
Fixes d862c45b5955 ("app/testpmd: move dumping packets to a separatefunction")
Cc: [email protected]
Cc: [email protected]Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)app/test-pmd/util.c index 5dd7157..14a9a25 renamed from app/test-pmd/util.c +0
-0100644
app/test-pmd/util.c +5
-1@@ -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);
Quoted 3 lines
if (
rte_mbuf_check(mb, 1, &reason)< 0)
--
2.8.4
Raslan Darawsheh
Acked-byRe: [dpdk-dev] [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
Hi,
Quoted 50 lines
-----Original Message-----
From: Li, Xiaoyun <[email protected]>
Sent: Tuesday, August 17, 2021 4:54 AM
To: Nithin Dabilpuram <[email protected]>
Cc: [email protected]; [email protected]; Raslan Darawsheh <[email protected]>; [email protected]
Subject: RE: [PATCH 2/2] app/testpmd: fix verbose mode dump for TxQuoted 9 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 2/2] app/testpmd: fix verbose mode dump for TxFix verbose mode dump for Tx to dump tx offload flags instead of Rx
offload
app/test-pmd/util.c index
Quoted 13 lines
flags.
Fixes d862c45b5955 ("app/testpmd: move dumping packets to a separatefunction")
Cc: [email protected]
Cc: [email protected]Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)app/test-pmd/util.c index renamed from app/test-pmd/util.c +0
-05dd7157..14a9a25
app/test-pmd/util.c dump_pkt_burst(uint16_t port_id, uint16_t
Quoted 4 lines
100644
app/test-pmd/util.c +0
-0@@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_tqueue,
app/test-pmd/util.c dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
Quoted 7 lines
app/test-pmd/util.c +2
-1struct 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));
app/test-pmd/util.c dump_pkt_burst(uint16_t port_id, uint16_t · line 282
Quoted 2 lines
app/test-pmd/util.c +2
-0+else + rte_get_tx_ol_flag_list(mb->ol_flags, buf,sizeof(buf));
Quoted 8 lines
Quoted 6 lines
app/test-pmd/util.c +1
-0+MKDUMPSTR (print_buf, buf_size, cur_len," ol_flags: %s\n" , buf);if (
rte_mbuf_check(mb, 1, &reason)< 0)
--
2.8.4Acked-by Xiaoyun Li <[email protected]>
Kindest regards,
Raslan Darawsheh
Hi
Quoted 9 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum
Quoted 4 lines
Donot use outer metadata when neither outer ip checksum nor outer udp checksum is enabled. PMD's will ignore the
outer_l2_lenandouter_l3_lenin cases where none of the outer checksum is enabled and hence onlyl2_lenandl3_lenwill 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.
Quoted 26 lines
Fixes 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/csumonly.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)app/test-pmd/csumonly.c index renamed from app/test-pmd/csumonly.c +0
-0607c889..38cc256 100644
app/test-pmd/csumonly.c +1
-3@@ -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
Quoted 16 lines · Xiaoyun
Hi
Quoted 9 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumQuoted 4 lines
Donot use outer metadata when neither outer ip checksum nor outer udp checksum is enabled. PMD's will ignore the
outer_l2_lenandouter_l3_lenin cases where none of the outer checksum is enabled and hence onlyl2_lenandl3_lenwill be used to calculate the offsets for L2 or L3 header.
Quoted 4 lines
I don't understand.
Inprocess_outer_chksum, onlyPKT_TX_OUTER_IPV6Will be set if it's ipv6 packets.
SoPKT_TX_OUTER_IPV6means 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.
Quoted 28 lines
Quoted 27 lines
Fixes 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/csumonly.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)app/test-pmd/csumonly.c index renamed from app/test-pmd/csumonly.c +0
-0607c889..38cc256 100644
app/test-pmd/csumonly.c +1
-3@@ -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
Quoted 33 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 18:56
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumQuoted 15 lines · Xiaoyun
Hi
Quoted 13 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumDonot use outer metadata when neither outer ip checksum nor outer udp checksum is enabled. PMD's will ignore the
outer_l2_lenandouter_l3_lenin cases where none of the outer checksum is enabled and hence onlyl2_lenandl3_lenwill be used to calculate the offsets for L2or L3 header.
Quoted 3 lines
I don't understand.
Inprocess_outer_chksum, onlyPKT_TX_OUTER_IPV6Will be set if it's ipv6packets.
Quoted 1 line
So
PKT_TX_OUTER_IPV6means this packet is tunnel ipv6 packet. So it actuallyneeds outer l2 len and outer l3 len put them to hw.
Quoted 8 lines
Quoted 1 line
At least i40e needs outer l2 len and outer l3 len as far as I know.
Ok, do you mean
m->outer_l2_lenandm->outer_l3_lenwill be referred in i40e driver even when bothDEV_TX_OFFLOAD_OUTER_IPV4_CKSUMandDEV_TX_OFFLOAD_OUTER_UDP_CKSUMare 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.
Quoted 29 lines
Quoted 29 lines
Quoted 28 lines
Fixes 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/csumonly.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)app/test-pmd/csumonly.c index renamed from app/test-pmd/csumonly.c +0
-0607c889..38cc256 100644
app/test-pmd/csumonly.c +1
-3@@ -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
Quoted 35 lines · Xiaoyun
Quoted 35 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 18:56
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumQuoted 15 lines · Xiaoyun
Hi
Quoted 13 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumDonot use outer metadata when neither outer ip checksum nor outer udp checksum is enabled. PMD's will ignore the
outer_l2_lenandouter_l3_lenin cases where none of the outer checksum is enabled and hence onlyl2_lenandl3_lenwill be used to calculate the offsets for L2or L3 header.
Quoted 3 lines
I don't understand.
Inprocess_outer_chksum, onlyPKT_TX_OUTER_IPV6Will be set if it's ipv6packets.
Quoted 1 line
So
PKT_TX_OUTER_IPV6means this packet is tunnel ipv6 packet. So it actuallyneeds outer l2 len and outer l3 len put them to hw.
Quoted 1 line
At least i40e needs outer l2 len and outer l3 len as far as I know.
Quoted 8 lines
Quoted 6 lines
Ok, do you mean
m->outer_l2_lenandm->outer_l3_lenwill be referred in i40e driver even when bothDEV_TX_OFFLOAD_OUTER_IPV4_CKSUMandDEV_TX_OFFLOAD_OUTER_UDP_CKSUMare 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.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
Fixes 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/csumonly.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)app/test-pmd/csumonly.c index renamed from app/test-pmd/csumonly.c +0
-0607c889..38cc256 100644
app/test-pmd/csumonly.c +1
-3@@ -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
Quoted 40 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumDonot use outer metadata when neither outer ip checksum nor outer udp checksum is enabled. PMD's will ignore the
outer_l2_lenandouter_l3_lenin cases where none of the outer checksum is enabled and hence onlyl2_lenandl3_lenwill be used to calculate the offsets for L2 or L3 header.Fixes 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/csumonly.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)app/test-pmd/csumonly.c index renamed from app/test-pmd/csumonly.c +0
-0607c889..38cc256 100644
app/test-pmd/csumonly.c +1
-3@@ -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; --
Quoted 1 line
2.8.4
Quoted 16 lines · Xiaoyun
Quoted 16 lines
-----Original Message-----
From: Nithin Dabilpuram <[email protected]>
Sent: Monday, August 16, 2021 15:10
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; [email protected]; Nithin Dabilpuram <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksumDonot use outer metadata when neither outer ip checksum nor outer udp checksum is enabled. PMD's will ignore the
outer_l2_lenandouter_l3_lenin cases where none of the outer checksum is enabled and hence onlyl2_lenandl3_lenwill be used to calculate the offsets for L2 or L3 header.
Quoted 7 lines
Quoted 5 lines
Fixes 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")Signed-off-by Nithin Dabilpuram <[email protected]>>Acked-by Xiaoyun Li <[email protected]>
Series applied to dpdk-next-net/main, thanks.