patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 19.11] net/i40e: fix forward outer IPv6 VXLAN
@ 2021-12-08 10:28 Jie Wang
  2021-12-08 14:20 ` Christian Ehrhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Jie Wang @ 2021-12-08 10:28 UTC (permalink / raw)
  To: stable; +Cc: Jie Wang, Beilei Xing

[ upstream commit 8cc79a1636cda2e9d6ba4cfd1cf16cf2a782ae1b ]

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")

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@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 508f90595f..b05cb52b22 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3714,6 +3714,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_TX_OFFLOAD_IPIP_TNL_TSO |
 		DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
 		DEV_TX_OFFLOAD_MULTI_SEGS |
+		DEV_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 6cba729639..f6868e2ccf 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -66,6 +66,7 @@
 		PKT_TX_QINQ_PKT |       \
 		PKT_TX_VLAN_PKT |	\
 		PKT_TX_TUNNEL_MASK |	\
+		PKT_TX_OUTER_UDP_CKSUM |	\
 		I40E_TX_IEEE1588_TMST)
 
 #define I40E_TX_OFFLOAD_NOTSUP_MASK \
-- 
2.25.1


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

* Re: [PATCH 19.11] net/i40e: fix forward outer IPv6 VXLAN
  2021-12-08 10:28 [PATCH 19.11] net/i40e: fix forward outer IPv6 VXLAN Jie Wang
@ 2021-12-08 14:20 ` Christian Ehrhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ehrhardt @ 2021-12-08 14:20 UTC (permalink / raw)
  To: Jie Wang; +Cc: stable, Beilei Xing

On Wed, Dec 8, 2021 at 3:32 AM Jie Wang <jie1x.wang@intel.com> wrote:
>
> [ upstream commit 8cc79a1636cda2e9d6ba4cfd1cf16cf2a782ae1b ]

Thanks, applied

> 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")
>
> Signed-off-by: Jie Wang <jie1x.wang@intel.com>
> Acked-by: Beilei Xing <beilei.xing@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 508f90595f..b05cb52b22 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3714,6 +3714,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>                 DEV_TX_OFFLOAD_IPIP_TNL_TSO |
>                 DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
>                 DEV_TX_OFFLOAD_MULTI_SEGS |
> +               DEV_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 6cba729639..f6868e2ccf 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -66,6 +66,7 @@
>                 PKT_TX_QINQ_PKT |       \
>                 PKT_TX_VLAN_PKT |       \
>                 PKT_TX_TUNNEL_MASK |    \
> +               PKT_TX_OUTER_UDP_CKSUM |        \
>                 I40E_TX_IEEE1588_TMST)
>
>  #define I40E_TX_OFFLOAD_NOTSUP_MASK \
> --
> 2.25.1
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 10:28 [PATCH 19.11] net/i40e: fix forward outer IPv6 VXLAN Jie Wang
2021-12-08 14:20 ` Christian Ehrhardt

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).