On Mon, Jul 25, 2016 at 5:49 PM, Pravin B Shelar <pshe...@ovn.org> wrote:
> OVS compat layer can handle tunnel GSO packets. but it does
> keep skb encapsulation on for packet handled in GSO. This can
> confuse some NIC drivers. I have seen this issue on intel devices:
>
>   i40e 0000:42:00.0: TX driver issue detected, PF reset issued
>
> Following patch resets this bit in case compat layer handles the packet.
>
> VMware-BZ: 1698877
> Signed-off-by: Pravin B Shelar <pshe...@ovn.org>

In upstream, this is done as part of the GSO code (for example, in
__skb_udp_tunnel_segment()) so that probably makes more sense and is
safer if this is GSO specific. There is already code in
ovs_iptunnel_handle_offloads() that will clear the encapsulation bit
in the case of checksum offload on the outer header.

One minor comment - skb->encapsulation is actually a u8 field instead
of a bool, so setting it to 0 rather than false is more consistent
with the rest of the kernel.

Something that I noticed while looking at this is it looks like the
recent patch that moved the check for gso_type_mask into a GSO-only
block in ovs_iptunnel_handle_offloads() might cause a bit of a
performance regression. Even though that field is GSO-specific, it is
also used to control whether we resolve partial checksums. Even in
cases where we do need to use the OVS offload compat code, I suspect
we could take better advantage of hardware offloads - not computing
the checksum when !skb->encapsulation (since every kernel can do UDP
checksum offload), using scatter/gather in GSO, checking for backport
support when clearing type in rpl_udp_tunnel_handle_offloads().
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to