On 1/11/2019 12:26 PM, Ian Stokes wrote:
On 1/10/2019 4:58 PM, Tiago Lam wrote:
Previously, TSO was being explicity disabled on vhost interfaces,
meaning the guests wouldn't have TSO support negotiated in. With TSO
negotiated and enabled, packets are now marked for TSO, through the
PKT_TX_TCP_SEG flag.

In order to deal with this type of packets, a new function,
netdev_dpdk_prep_tso_packet(), has been introduced, with the main
purpose of setting correctly the l2, l3 and l4 length members of the
mbuf struct, and the appropriate ol_flags. This function supports TSO
both in IPv4 and IPv6.

netdev_dpdk_prep_tso_packet() is then only called when packets are
marked with the PKT_TX_TCP_SEG flag, meaning they have been marked for
TSO, and when the packet will be traversing the NIC.

Additionally, if a packet is marked for TSO but the egress netdev
doesn't support it, the packet is dropped.


Hi Tiago,

a high level first pass, I still need to test this in more detail so not a full review yet but some minor issues to be addressed below.

One more addition to below.

[snip]

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index fa79b2a..1476096 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -1379,6 +1379,13 @@ netdev_linux_sock_batch_send(int sock, int ifindex,
      struct dp_packet *packet;
      DP_PACKET_BATCH_FOR_EACH (i, packet, batch) {
+        /* TSO not supported in Linux netdev */
+        if (dp_packet_is_tso(packet)) {
+            VLOG_WARN_RL(&rl, "%d: No TSO enabled on port, TSO packet dropped "
+                         "%ld", sock, size);
Will cause compilation warnings:

format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘size_t’

Ian
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to