[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171118.104243.1900474824000692140.davem@davemloft.net>
Date: Sat, 18 Nov 2017 10:42:43 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: willemdebruijn.kernel@...il.com
Cc: netdev@...r.kernel.org, jasowang@...hat.com, mkubecek@...e.cz,
willemb@...gle.com
Subject: Re: [PATCH net] net: accept UFO datagrams from tuntap and packet
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Date: Fri, 17 Nov 2017 17:59:13 -0500
> 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.
This looks good, one minor nit:
> @@ -2369,6 +2369,10 @@ static int set_offload(struct tun_struct *tun, unsigned long arg)
> features |= NETIF_F_TSO6;
> arg &= ~(TUN_F_TSO4|TUN_F_TSO6);
> }
> +
> + if (arg & TUN_F_UFO) {
> + arg &= ~TUN_F_UFO;
> + }
This can be just simply "arg &= ~TUN_F_UFO;"? If anything the curly braces
should be removed for a single statement basic block.
Thanks for working so hard on fixing this.
Powered by blists - more mailing lists