patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/i40e: fix forward outer IPv6 VXLAN packets
@ 2021-11-02  7:08 Jie Wang
  2021-11-05  3:18 ` Xing, Beilei
  2021-11-05  3:37 ` [dpdk-stable] [PATCH v2] " Jie Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Jie Wang @ 2021-11-02  7:08 UTC (permalink / raw)
  To: dev
  Cc: yuying.zhang, xiaoyun.li, stevex.yang, beilei.xing, qi.z.zhang,
	Jie Wang, stable

Testpmd forwards packets in checksum mode that it need to calculate
the checksum of each layer's protocol. Then it will fill flags and
header length into mbuf.

In process_outer_cksums, HW calculates the outer checksum if
tx_offloads contains outer UDP checksum otherwise SW calculates
the outer checksum.

When tx_offloads contains outer UDP checksum or outer IPv4 checksum,
mbuf will be filled with correct header length.

This patch added outer UDP checksum in tx_offload_capa and
I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the
engine can forward outer IPv6 VXLAN packets.

Fixes: 399421100e08 ("net/i40e: fix missing mbuf fast free offload")
Cc: stable@dpdk.org

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 1 +
 drivers/net/i40e/i40e_rxtx.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 62e374d19e..faf6391350 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3746,6 +3746,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		dev_info->tx_queue_offload_capa;
 	dev_info->dev_capa =
 		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 6ccb598677..41fe3bf481 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -65,6 +65,7 @@
 		RTE_MBUF_F_TX_QINQ |       \
 		RTE_MBUF_F_TX_VLAN |	\
 		RTE_MBUF_F_TX_TUNNEL_MASK |	\
+		RTE_MBUF_F_TX_OUTER_UDP_CKSUM |	\
 		I40E_TX_IEEE1588_TMST)
 
 #define I40E_TX_OFFLOAD_NOTSUP_MASK \
-- 
2.25.1


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

* Re: [dpdk-stable] [PATCH] net/i40e: fix forward outer IPv6 VXLAN packets
  2021-11-02  7:08 [dpdk-stable] [PATCH] net/i40e: fix forward outer IPv6 VXLAN packets Jie Wang
@ 2021-11-05  3:18 ` Xing, Beilei
  2021-11-05  3:37 ` [dpdk-stable] [PATCH v2] " Jie Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Xing, Beilei @ 2021-11-05  3:18 UTC (permalink / raw)
  To: Wang, Jie1X, dev
  Cc: Zhang, Yuying, Li, Xiaoyun, Yang, SteveX, Zhang, Qi Z, stable



> -----Original Message-----
> From: Wang, Jie1X <jie1x.wang@intel.com>
> Sent: Tuesday, November 2, 2021 3:08 PM
> To: dev@dpdk.org
> Cc: Zhang, Yuying <yuying.zhang@intel.com>; Li, Xiaoyun
> <xiaoyun.li@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Jie1X
> <jie1x.wang@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/i40e: fix forward outer IPv6 VXLAN packets
> 
> Testpmd forwards packets in checksum mode that it need to calculate the
> checksum of each layer's protocol. Then it will fill flags and header length into
> mbuf.
> 
> In process_outer_cksums, HW calculates the outer checksum if tx_offloads
> contains outer UDP checksum otherwise SW calculates the outer checksum.
> 
> When tx_offloads contains outer UDP checksum or outer IPv4 checksum,
> mbuf will be filled with correct header length.
> 
> This patch added outer UDP checksum in tx_offload_capa and
> I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the
> engine can forward outer IPv6 VXLAN packets.
> 
> Fixes: 399421100e08 ("net/i40e: fix missing mbuf fast free offload")
Seems it's not the right fix line. Could you check if it should be 7497d3e2f777 ("net/i40e: convert to new Tx offloads API").

> Cc: stable@dpdk.org
> 
> Signed-off-by: Jie Wang <jie1x.wang@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 1 +
>  drivers/net/i40e/i40e_rxtx.c   | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 62e374d19e..faf6391350 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3746,6 +3746,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>  		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
>  		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
>  		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
> +		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
>  		dev_info->tx_queue_offload_capa;
>  	dev_info->dev_capa =
>  		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | diff --git
> a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index
> 6ccb598677..41fe3bf481 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -65,6 +65,7 @@
>  		RTE_MBUF_F_TX_QINQ |       \
>  		RTE_MBUF_F_TX_VLAN |	\
>  		RTE_MBUF_F_TX_TUNNEL_MASK |	\
> +		RTE_MBUF_F_TX_OUTER_UDP_CKSUM |	\
>  		I40E_TX_IEEE1588_TMST)
> 
>  #define I40E_TX_OFFLOAD_NOTSUP_MASK \
> --
> 2.25.1


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

* [dpdk-stable] [PATCH v2] net/i40e: fix forward outer IPv6 VXLAN packets
  2021-11-02  7:08 [dpdk-stable] [PATCH] net/i40e: fix forward outer IPv6 VXLAN packets Jie Wang
  2021-11-05  3:18 ` Xing, Beilei
@ 2021-11-05  3:37 ` Jie Wang
  2021-11-05  3:48   ` Xing, Beilei
  1 sibling, 1 reply; 5+ messages in thread
From: Jie Wang @ 2021-11-05  3:37 UTC (permalink / raw)
  To: dev
  Cc: yuying.zhang, xiaoyun.li, stevex.yang, beilei.xing, qi.z.zhang,
	Jie Wang, stable

Testpmd forwards packets in checksum mode that it need to calculate
the checksum of each layer's protocol. Then it will fill flags and
header length into mbuf.

In process_outer_cksums, HW calculates the outer checksum if
tx_offloads contains outer UDP checksum otherwise SW calculates
the outer checksum.

When tx_offloads contains outer UDP checksum or outer IPv4 checksum,
mbuf will be filled with correct header length.

This patch added outer UDP checksum in tx_offload_capa and
I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the
engine can forward outer IPv6 VXLAN packets.

Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 1 +
 drivers/net/i40e/i40e_rxtx.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 9ea5f303ff..344cbd25d3 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3746,6 +3746,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		dev_info->tx_queue_offload_capa;
 	dev_info->dev_capa =
 		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 6ccb598677..41fe3bf481 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -65,6 +65,7 @@
 		RTE_MBUF_F_TX_QINQ |       \
 		RTE_MBUF_F_TX_VLAN |	\
 		RTE_MBUF_F_TX_TUNNEL_MASK |	\
+		RTE_MBUF_F_TX_OUTER_UDP_CKSUM |	\
 		I40E_TX_IEEE1588_TMST)
 
 #define I40E_TX_OFFLOAD_NOTSUP_MASK \
-- 
2.25.1


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

* Re: [dpdk-stable] [PATCH v2] net/i40e: fix forward outer IPv6 VXLAN packets
  2021-11-05  3:37 ` [dpdk-stable] [PATCH v2] " Jie Wang
@ 2021-11-05  3:48   ` Xing, Beilei
  2021-11-11 18:25     ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Xing, Beilei @ 2021-11-05  3:48 UTC (permalink / raw)
  To: Wang, Jie1X, dev
  Cc: Zhang, Yuying, Li, Xiaoyun, Yang, SteveX, Zhang, Qi Z, stable



> -----Original Message-----
> From: Wang, Jie1X <jie1x.wang@intel.com>
> Sent: Friday, November 5, 2021 11:37 AM
> To: dev@dpdk.org
> Cc: Zhang, Yuying <yuying.zhang@intel.com>; Li, Xiaoyun
> <xiaoyun.li@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Jie1X
> <jie1x.wang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/i40e: fix forward outer IPv6 VXLAN packets
> 
> Testpmd forwards packets in checksum mode that it need to calculate the
> checksum of each layer's protocol. Then it will fill flags and header length into
> mbuf.
> 
> In process_outer_cksums, HW calculates the outer checksum if tx_offloads
> contains outer UDP checksum otherwise SW calculates the outer checksum.
> 
> When tx_offloads contains outer UDP checksum or outer IPv4 checksum,
> mbuf will be filled with correct header length.
> 
> This patch added outer UDP checksum in tx_offload_capa and
> I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the
> engine can forward outer IPv6 VXLAN packets.
> 
> Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>

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

* Re: [dpdk-stable] [PATCH v2] net/i40e: fix forward outer IPv6 VXLAN packets
  2021-11-05  3:48   ` Xing, Beilei
@ 2021-11-11 18:25     ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2021-11-11 18:25 UTC (permalink / raw)
  To: Xing, Beilei, Wang, Jie1X, dev
  Cc: Zhang, Yuying, Li, Xiaoyun, Yang, SteveX, Zhang, Qi Z, stable

On 11/5/2021 3:48 AM, Xing, Beilei wrote:
> 
> 
>> -----Original Message-----
>> From: Wang, Jie1X <jie1x.wang@intel.com>
>> Sent: Friday, November 5, 2021 11:37 AM
>> To: dev@dpdk.org
>> Cc: Zhang, Yuying <yuying.zhang@intel.com>; Li, Xiaoyun
>> <xiaoyun.li@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Xing, Beilei
>> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Jie1X
>> <jie1x.wang@intel.com>; stable@dpdk.org
>> Subject: [PATCH v2] net/i40e: fix forward outer IPv6 VXLAN packets
>>
>> Testpmd forwards packets in checksum mode that it need to calculate the
>> checksum of each layer's protocol. Then it will fill flags and header length into
>> mbuf.
>>
>> In process_outer_cksums, HW calculates the outer checksum if tx_offloads
>> contains outer UDP checksum otherwise SW calculates the outer checksum.
>>
>> When tx_offloads contains outer UDP checksum or outer IPv4 checksum,
>> mbuf will be filled with correct header length.
>>
>> This patch added outer UDP checksum in tx_offload_capa and
>> I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the
>> engine can forward outer IPv6 VXLAN packets.
>>
>> Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Jie Wang <jie1x.wang@intel.com>
> Acked-by: Beilei Xing <beilei.xing@intel.com>
> 

For record,
This patch has been merged to next-net-intel, and pulled to next-net from there.


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

end of thread, other threads:[~2021-11-11 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02  7:08 [dpdk-stable] [PATCH] net/i40e: fix forward outer IPv6 VXLAN packets Jie Wang
2021-11-05  3:18 ` Xing, Beilei
2021-11-05  3:37 ` [dpdk-stable] [PATCH v2] " Jie Wang
2021-11-05  3:48   ` Xing, Beilei
2021-11-11 18:25     ` Ferruh Yigit

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git