From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net v2] net: accept UFO datagrams from tuntap and packet Date: Fri, 24 Nov 2017 01:37:58 +0900 (KST) Message-ID: <20171124.013758.1742079561164230628.davem@davemloft.net> References: <20171121152225.83972-1-willemdebruijn.kernel@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jasowang@redhat.com, mkubecek@suse.cz, willemb@google.com To: willemdebruijn.kernel@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:44388 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752880AbdKWQiB (ORCPT ); Thu, 23 Nov 2017 11:38:01 -0500 In-Reply-To: <20171121152225.83972-1-willemdebruijn.kernel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Willem de Bruijn Date: Tue, 21 Nov 2017 10:22:25 -0500 > From: Willem de Bruijn > > Tuntap and similar devices can inject GSO packets. Accept type > VIRTIO_NET_HDR_GSO_UDP, even though not generating UFO natively. > > Processes are expected to use feature negotiation such as TUNSETOFFLOAD > to detect supported offload types and refrain from injecting other > packets. This process breaks down with live migration: guest kernels > do not renegotiate flags, so destination hosts need to expose all > features that the source host does. > > Partially revert the UFO removal from 182e0b6b5846~1..d9d30adf5677. > This patch introduces nearly(*) no new code to simplify verification. > It brings back verbatim tuntap UFO negotiation, VIRTIO_NET_HDR_GSO_UDP > insertion and software UFO segmentation. > > It does not reinstate protocol stack support, hardware offload > (NETIF_F_UFO), SKB_GSO_UDP tunneling in SKB_GSO_SOFTWARE or reception > of VIRTIO_NET_HDR_GSO_UDP packets in tuntap. > > To support SKB_GSO_UDP reappearing in the stack, also reinstate > logic in act_csum and openvswitch. Achieve equivalence with v4.13 HEAD > by squashing in commit 939912216fa8 ("net: skb_needs_check() removes > CHECKSUM_UNNECESSARY check for tx.") and reverting commit 8d63bee643f1 > ("net: avoid skb_warn_bad_offload false positives on UFO"). > > (*) To avoid having to bring back skb_shinfo(skb)->ip6_frag_id, > ipv6_proxy_select_ident is changed to return a __be32 and this is > assigned directly to the frag_hdr. Also, SKB_GSO_UDP is inserted > at the end of the enum to minimize code churn. ... > Link: http://lkml.kernel.org/r/ > Fixes: fb652fdfe837 ("macvlan/macvtap: Remove NETIF_F_UFO advertisement.") > Reported-by: Michal Kubecek > Signed-off-by: Willem de Bruijn Applied and queued up for -stable, thanks!