On 19/04/2016 15:15, "Joe Stringer" <j...@ovn.org> wrote:

>On 15 April 2016 at 17:02, Daniele Di Proietto <diproiet...@vmware.com> wrote:
>> The system userspace testsuite uses the userspace datapath with
>> netdev-linux devices, connected to veth pairs with the AF_PACKET socket:
>>
>>              (veth pair)     (AF_PACKET)
>> TCP stack -> p0 ---> ovs-p0  -------------> netdev-linux (userspace OVS)
>>
>> Unfortunately this configuration has some problems with offloads: a
>> packet generated by the TCP stack maybe sent to p0 without being
>> checksummed or segmented. The AF_PACKET socket, by default, ignores the
>> offloads and just transmits the data of the packets to userspace, but:
>>
>> 1. The packet may need GSO, so the data will be too big to be received
>>    by the userspace datapath
>> 2. The packet might have incomplete checksums, so it will likely be
>>    discarded by the receiver.
>>
>> Problem 1 causes TCP connections to see a congestion window smaller than
>> the MTU, which hurts performance but doesn't prevent communication.
>>
>> Problem 2 was hidden in the testsuite by a Linux kernel bug, fixed by
>> commit ce8c839b74e3("veth: don’t modify ip_summed; doing so treats
>> packets with bad checksums as good").  In the kernels that include the
>> fix, the userspace datapath is able to process pings, but not tcp or udp
>> data.
>>
>> Unfortunately I couldn't find a way to ask the AF_PACKET to perform
>> offloads in kernel.  A possible fix would be to use the PACKET_VNET_HDR
>> sockopt and perform the offloads in userspace.
>>
>> Until a proper fix is worked out for netdev-linux, this commit disables
>> offloads on the non-OVS side of the veth pair, as a workaround.
>>
>> Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
>
>Thanks for the fix. As I understand this simply fixes the userspace
>testsuite when running on newer kernels today, so we could apply this
>independently of the rest of the series.
>
>Acked-by: Joe Stringer <j...@ovn.org>

Thanks for the review, I'll push this in a minute
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to