From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 2/2] veth: allow configuring GSO maximums Date: Sun, 3 Dec 2017 19:43:07 -0700 Message-ID: <755b938b-2d7e-bc76-a7a3-0fee730e4e0c@gmail.com> References: <20171201201158.25594-1-sthemmin@microsoft.com> <20171201201158.25594-3-sthemmin@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Stephen Hemminger To: Stephen Hemminger , davem@davemloft.net Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:38502 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbdLDCnN (ORCPT ); Sun, 3 Dec 2017 21:43:13 -0500 Received: by mail-pg0-f68.google.com with SMTP id f12so7194139pgo.5 for ; Sun, 03 Dec 2017 18:43:13 -0800 (PST) In-Reply-To: <20171201201158.25594-3-sthemmin@microsoft.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/1/17 1:11 PM, Stephen Hemminger wrote: > diff --git a/drivers/net/veth.c b/drivers/net/veth.c > index f5438d0978ca..510c058ba227 100644 > --- a/drivers/net/veth.c > +++ b/drivers/net/veth.c > @@ -410,6 +410,26 @@ static int veth_newlink(struct net *src_net, struct net_device *dev, > if (ifmp && (dev->ifindex != 0)) > peer->ifindex = ifmp->ifi_index; > > + if (tbp[IFLA_GSO_MAX_SIZE]) { > + u32 max_size = nla_get_u32(tbp[IFLA_GSO_MAX_SIZE]); > + > + if (max_size > GSO_MAX_SIZE) > + return -EINVAL; > + > + peer->gso_max_size = max_size; > + dev->gso_max_size = max_size; > + } > + > + if (tbp[IFLA_GSO_MAX_SEGS]) { > + u32 max_segs = nla_get_u32(tbp[IFLA_GSO_MAX_SEGS]); > + > + if (max_segs > GSO_MAX_SEGS) > + return -EINVAL; > + > + peer->gso_max_segs = max_segs; > + dev->gso_max_segs = max_segs; > + } > + > err = register_netdevice(peer); > put_net(net); > net = NULL; > Given the role of veth it seems odd to only allow these to be set at create time. I think Solio is saying the same with respect to the Docker use case.