Hi Flavio, Thanks for the explanation. I followed the steps in the document but TCP connection still failed to build between 2 VMs.
I finally modified VM's kernel directly to disable TCP checksum validation to get it working properly. I got 30.0Gbps for 'iperf' between 2 VMs. Best, Yifeng On Tue, Jan 28, 2020 at 4:00 AM Flavio Leitner <f...@sysclose.org> wrote: > > On Mon, Jan 27, 2020 at 05:17:01PM -0800, Yifeng Sun wrote: > > Hi Ilya, > > > > Thanks for your reply. > > > > The thing is, if checksum offloading is enabled in both VMs, then > > sender VM will send > > a packet with invalid TCP checksum, and later OVS will send this > > packet to receiver > > VM directly without calculating a valid checksum. As a result, > > receiver VM will drop > > this packet because it contains invalid checksum. This is what > > happened when I tried > > this patch. > > > > When TSO is enabled, the TX checksumming offloading is required, > then you will see invalid checksum. This is well documented here: > > https://github.com/openvswitch/ovs/blob/master/Documentation/topics/userspace-tso.rst#userspace-datapath---tso > > "Additionally, if the traffic is headed to a VM within the same host > further optimization can be expected. As the traffic never leaves > the machine, no MTU needs to be accounted for, and thus no > segmentation and checksum calculations are required, which saves yet > more cycles." > > Therefore, it's expected to see bad csum in the traffic dumps. > > To use the feature, you need few steps: enable the feature in OvS > enable in qemu and inside the VM. The linux guest usually enable > the feature by default if qemu offers it. > > HTH, > fbl > > > > Best, > > Yifeng > > > > On Mon, Jan 27, 2020 at 12:09 PM Ilya Maximets <i.maxim...@ovn.org> wrote: > > > > > > On 27.01.2020 18:24, Yifeng Sun wrote: > > > > Hi Flavio, > > > > > > > > I am testing your patch using iperf between 2 VMs on the same host. > > > > But it seems that TCP connection can't be created between these 2 VMs. > > > > When inspecting further, I found that TCP packets have invalid > > > > checksums. > > > > This might be the reason. > > > > > > > > I am wondering if I missed something in the setup? Thanks a lot. > > > > > > I didn't test myself, but according to current design, checksum offloading > > > (rx and tx) shuld be enabled in both VMs. Otherwise all the packets will > > > be dropped by the guest kernel. > > > > > > Best regards, Ilya Maximets. > > -- > fbl _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev