diff mbox series

[ovs-dev,v4,1/7] netdev-dpdk: Disable net/tap Tx L4 checksum offloads.

Message ID 20230830082822.2168900-1-david.marchand@redhat.com
State Accepted
Commit bb61931dc5467e3bd24ac6b2877de6f9b6ff5d87
Headers show
Series [ovs-dev,v4,1/7] netdev-dpdk: Disable net/tap Tx L4 checksum offloads. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

David Marchand Aug. 30, 2023, 8:28 a.m. UTC
As reported by Ales when doing some OVN integration tests with OVS 3.2,
net/tap has broken L4 checksum offloads.

Fixes are pending on DPDK side.
Until they get in a LTS release used by OVS, disable those Tx offloads.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- added this patch as part of the DPDK tests update series,
- restored TSO feature,
- added comment in code,
- changed log level,

---
 lib/netdev-dpdk.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Ilya Maximets Aug. 30, 2023, 8:14 p.m. UTC | #1
On 8/30/23 10:28, David Marchand wrote:
> As reported by Ales when doing some OVN integration tests with OVS 3.2,
> net/tap has broken L4 checksum offloads.
> 
> Fixes are pending on DPDK side.
> Until they get in a LTS release used by OVS, disable those Tx offloads.
> 
> Acked-by: Eelco Chaudron <echaudro@redhat.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Changes since v1:
> - added this patch as part of the DPDK tests update series,
> - restored TSO feature,
> - added comment in code,
> - changed log level,
> 
> ---
>  lib/netdev-dpdk.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 2f5a133184..55700250df 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -1312,6 +1312,16 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)
>          dev->hw_ol_features &= ~NETDEV_RX_HW_SCATTER;
>      }
>  
> +    if (!strcmp(info.driver_name, "net_tap")) {
> +        /* FIXME: L4 checksum offloading is broken in DPDK net/tap driver.
> +         * This workaround can be removed once the fix makes it to a DPDK
> +         * LTS release used by OVS. */
> +        VLOG_INFO("%s: disabled Tx L4 checksum offloads for a net/tap port.",
> +                  netdev_get_name(&dev->up));
> +        info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_UDP_CKSUM;
> +        info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_TCP_CKSUM;
> +    }
> +
>      if (info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) {
>          dev->hw_ol_features |= NETDEV_TX_IPV4_CKSUM_OFFLOAD;
>      } else {

Thanks!  Applied this one patch to master and branch-3.2.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 2f5a133184..55700250df 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1312,6 +1312,16 @@  dpdk_eth_dev_init(struct netdev_dpdk *dev)
         dev->hw_ol_features &= ~NETDEV_RX_HW_SCATTER;
     }
 
+    if (!strcmp(info.driver_name, "net_tap")) {
+        /* FIXME: L4 checksum offloading is broken in DPDK net/tap driver.
+         * This workaround can be removed once the fix makes it to a DPDK
+         * LTS release used by OVS. */
+        VLOG_INFO("%s: disabled Tx L4 checksum offloads for a net/tap port.",
+                  netdev_get_name(&dev->up));
+        info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_UDP_CKSUM;
+        info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_TCP_CKSUM;
+    }
+
     if (info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) {
         dev->hw_ol_features |= NETDEV_TX_IPV4_CKSUM_OFFLOAD;
     } else {