Re: [ovs-dev] 答复: [PATCH v4 0/3] Add support for TSO with DPDK

2020-02-20 Thread William Tu
On Thu, Feb 20, 2020 at 2:12 AM Yi Yang (杨燚)-云服务集团  wrote:
>
> Hi, Flavio
>
> I find this tso feature doesn't work normally on my Ubuntu 16.04, here is my
> result. My kernel version is

Hi Yiyang,

I'm so confused with your description. Which case does not work for you?
Yifeng and Flavio were using OVS-DPDK with vhostuser to VM, is this
the case you're talking about?

>
> $ uname -a
> Linux cmp008 4.15.0-55-generic #60~16.04.2-Ubuntu SMP Thu Jul 4 09:03:09 UTC
> 2019 x86_64 x86_64 x86_64 GNU/Linux
> $
>
> $ ./run-iperf3.sh

Which case is this one?

> Connecting to host 10.15.1.3, port 5201
> [  4] local 10.15.1.2 port 56466 connected to 10.15.1.3 port 5201
> [ ID] Interval   Transfer Bandwidth   Retr  Cwnd
> [  4]   0.00-10.00  sec  7.05 MBytes  5.91 Mbits/sec  2212   5.66 KBytes
> [  4]  10.00-20.00  sec  7.67 MBytes  6.44 Mbits/sec  2484   5.66 KBytes
> [  4]  20.00-30.00  sec  7.77 MBytes  6.52 Mbits/sec  2500   5.66 KBytes
> [  4]  30.00-40.00  sec  7.77 MBytes  6.52 Mbits/sec  2490   5.66 KBytes
> [  4]  40.00-50.00  sec  7.76 MBytes  6.51 Mbits/sec  2500   5.66 KBytes
> [  4]  50.00-60.00  sec  7.79 MBytes  6.54 Mbits/sec  2504   5.66 KBytes
> - - - - - - - - - - - - - - - - - - - - - - - - -
> [ ID] Interval   Transfer Bandwidth   Retr
> [  4]   0.00-60.00  sec  45.8 MBytes  6.40 Mbits/sec  14690
> sender
> [  4]   0.00-60.00  sec  45.7 MBytes  6.40 Mbits/sec
> receiver
>
> Server output:
> Accepted connection from 10.15.1.2, port 56464
> [  5] local 10.15.1.3 port 5201 connected to 10.15.1.2 port 56466
> [ ID] Interval   Transfer Bandwidth
> [  5]   0.00-10.00  sec  6.90 MBytes  5.79 Mbits/sec
> [  5]  10.00-20.00  sec  7.71 MBytes  6.47 Mbits/sec
> [  5]  20.00-30.00  sec  7.73 MBytes  6.48 Mbits/sec
> [  5]  30.00-40.00  sec  7.79 MBytes  6.53 Mbits/sec
> [  5]  40.00-50.00  sec  7.79 MBytes  6.53 Mbits/sec
> [  5]  50.00-60.00  sec  7.79 MBytes  6.54 Mbits/sec
>
>
> iperf Done.
> $
>
> But it does work for tap, I'm not sure if it is a kernel issue, which kernel
  ^^^
So which case does not work?

> version are you using? I didn't use tpacket_v3 patch. Here is my local ovs
> info.

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


Re: [ovs-dev] 答复: [PATCH v4 0/3] Add support for TSO with DPDK

2020-02-20 Thread Flavio Leitner
On Thu, Feb 20, 2020 at 10:10:36AM +, Yi Yang (杨�D)-云服务集团 wrote:
> Hi, Flavio
> 
> I find this tso feature doesn't work normally on my Ubuntu 16.04, here is my
> result. My kernel version is 
> 
> $ uname -a
> Linux cmp008 4.15.0-55-generic #60~16.04.2-Ubuntu SMP Thu Jul 4 09:03:09 UTC
> 2019 x86_64 x86_64 x86_64 GNU/Linux
> $

I tested with 4.15.0 upstream and it worked. Can you do the same?

> $ ./run-iperf3.sh
> Connecting to host 10.15.1.3, port 5201
> [  4] local 10.15.1.2 port 56466 connected to 10.15.1.3 port 5201
> [ ID] Interval   Transfer Bandwidth   Retr  Cwnd
> [  4]   0.00-10.00  sec  7.05 MBytes  5.91 Mbits/sec  2212   5.66 KBytes
> [  4]  10.00-20.00  sec  7.67 MBytes  6.44 Mbits/sec  2484   5.66 KBytes
> [  4]  20.00-30.00  sec  7.77 MBytes  6.52 Mbits/sec  2500   5.66 KBytes
> [  4]  30.00-40.00  sec  7.77 MBytes  6.52 Mbits/sec  2490   5.66 KBytes
> [  4]  40.00-50.00  sec  7.76 MBytes  6.51 Mbits/sec  2500   5.66 KBytes
> [  4]  50.00-60.00  sec  7.79 MBytes  6.54 Mbits/sec  2504   5.66 KBytes
> - - - - - - - - - - - - - - - - - - - - - - - - -
> [ ID] Interval   Transfer Bandwidth   Retr
> [  4]   0.00-60.00  sec  45.8 MBytes  6.40 Mbits/sec  14690
> sender
> [  4]   0.00-60.00  sec  45.7 MBytes  6.40 Mbits/sec
> receiver

That looks like TSO packets are being dropped and the traffic is
basically TCP retransmissions of MTU size.

fbl


> 
> Server output:
> Accepted connection from 10.15.1.2, port 56464
> [  5] local 10.15.1.3 port 5201 connected to 10.15.1.2 port 56466
> [ ID] Interval   Transfer Bandwidth
> [  5]   0.00-10.00  sec  6.90 MBytes  5.79 Mbits/sec
> [  5]  10.00-20.00  sec  7.71 MBytes  6.47 Mbits/sec
> [  5]  20.00-30.00  sec  7.73 MBytes  6.48 Mbits/sec
> [  5]  30.00-40.00  sec  7.79 MBytes  6.53 Mbits/sec
> [  5]  40.00-50.00  sec  7.79 MBytes  6.53 Mbits/sec
> [  5]  50.00-60.00  sec  7.79 MBytes  6.54 Mbits/sec
> 
> 
> iperf Done.
> $
> 
> But it does work for tap, I'm not sure if it is a kernel issue, which kernel
> version are you using? I didn't use tpacket_v3 patch. Here is my local ovs
> info.
> 
> $ git log
> commit 1223cf123ed141c0a0110ebed17572bdb2e3d0f4
> Author: Ilya Maximets 
> Date:   Thu Feb 6 14:24:23 2020 +0100
> 
> netdev-dpdk: Don't enable offloading on HW device if not requested.
> 
> DPDK drivers has different implementations of transmit functions.
> Enabled offloading may cause driver to choose slower variant
> significantly affecting performance if userspace TSO wasn't requested.
> 
> Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support")
> Reported-by: David Marchand 
> Acked-by: David Marchand 
> Acked-by: Flavio Leitner 
> Acked-by: Kevin Traynor 
> Signed-off-by: Ilya Maximets 
> 
> commit 73858f9dbe83daf8cc8d4b604acc23eb62cc3f52
> Author: Flavio Leitner 
> Date:   Mon Feb 3 18:45:50 2020 -0300
> 
> netdev-linux: Prepend the std packet in the TSO packet
> 
> Usually TSO packets are close to 50k, 60k bytes long, so to
> to copy less bytes when receiving a packet from the kernel
> change the approach. Instead of extending the MTU sized
> packet received and append with remaining TSO data from
> the TSO buffer, allocate a TSO packet with enough headroom
> to prepend the std packet data.
> 
> Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support")
> Suggested-by: Ben Pfaff 
> Signed-off-by: Flavio Leitner 
> Signed-off-by: Ben Pfaff 
> 
> commit 2297cbe6cc25b6b1862c499ce8f16f52f75d9e5f
> Author: Flavio Leitner 
> Date:   Mon Feb 3 11:22:22 2020 -0300
> 
> netdev-linux-private: fix max length to be 16 bits
> 
> The dp_packet length is limited to 16 bits, so document that
> and fix the length value accordingly.
> 
> Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support")
> Signed-off-by: Flavio Leitner 
> Signed-off-by: Ben Pfaff 
> 
> commit 3d6a6f450af5b7eaf4b532983cb14458ae792b72
> Author: David Marchand 
> Date:   Tue Feb 4 22:28:26 2020 +0100
> 
> netdev-dpdk: Fix port init when lacking Tx offloads for TSO.
> 
> The check on TSO capability did not ensure ip checksum, tcp checksum and
> TSO tx offloads were available which resulted in a port init failure
> (example below with a ena device):
> 
> *2020-02-04T17:42:52.976Z|00084|dpdk|ERR|Ethdev port_id=0 requested Tx
> offloads 0x2a doesn't match Tx offloads capabilities 0xe in
> rte_eth_dev_configure()*
> 
> Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support")
> 
> Reported-by: Ravi Kerur 
> Signed-off-by: David Marchand 
> Acked-by: Kevin Traynor 
> Acked-by: Flavio Leitner 
> Signed-off-by: Ilya Maximets 
> 
> commit 8e371aa497aa95e3562d53f566c2d634b4b0f589
> Author: Kirill A. Kornilov 
> Date:   Mon Jan 13 12:29:10 2020 +0300
> 
> vswitchd: Add serial number configuration.
> 
> Signed-off-by: Kirill A. Kornilov