On Fri, Jun 21, 2024 at 5:07 PM David Marchand
<[email protected]> wrote:
> net/mlx5 is claiming (geneve|vxlan)_tso_offload while not supporting
> outer udp checksum.

This may be a set of capabilities we can use if, for example, no udp
checksum is requested.

How about adding:
# git diff
diff --git a/lib/netdev.c b/lib/netdev.c
index 1d59bbe5d..429c86a22 100644
--- a/lib/netdev.c
+++ b/lib/netdev.c
@@ -926,6 +926,17 @@ netdev_send(struct netdev *netdev, int qid,
struct dp_packet_batch *batch,
                     return netdev_send_tso(netdev, qid, batch, concurrent_txq);
                 }
             }
+        } else if (!(netdev_flags & NETDEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
+            DP_PACKET_BATCH_FOR_EACH (i, packet, batch) {
+                if (!dp_packet_hwol_is_tso(packet) &&
+                    !dp_packet_hwol_is_tunnel_vxlan(packet) &&
+                    !dp_packet_hwol_is_tunnel_geneve(packet)) {
+                    continue;
+                }
+                if (dp_packet_hwol_is_outer_udp_cksum(packet)) {
+                    return netdev_send_tso(netdev, qid, batch, concurrent_txq);
+                }
+            }
         }
     }

Here are some numbers on mlx5, with the udp length fix I mentionned
previously + this hunk above:

# Sw GSO when csum enabled
- ovs-vsctl del-port tunnel0 -- add-port br-int tunnel0 -- set
interface tunnel0 type=vxlan options:remote_ip=172.31.3.1
options:key=0 options:csum=true

Connecting to host 172.31.2.2, port 5201
Reverse mode, remote host 172.31.2.2 is sending
[  5] local 172.31.2.1 port 58748 connected to 172.31.2.2 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   580 MBytes  4.87 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-1.04   sec   582 MBytes  4.70 Gbits/sec    0             sender
[  5]   0.00-1.00   sec   580 MBytes  4.87 Gbits/sec                  receiver

iperf Done.

# Hw GSO when csum disabled
- ovs-vsctl del-port tunnel0 -- add-port br-int tunnel0 -- set
interface tunnel0 type=vxlan options:remote_ip=172.31.3.1
options:key=0 options:csum=false

Connecting to host 172.31.2.2, port 5201
Reverse mode, remote host 172.31.2.2 is sending
[  5] local 172.31.2.1 port 39080 connected to 172.31.2.2 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.50 GBytes  12.9 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-1.04   sec  1.50 GBytes  12.4 Gbits/sec  213             sender
[  5]   0.00-1.00   sec  1.50 GBytes  12.9 Gbits/sec                  receiver

iperf Done.



-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to