From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [PATCH net-next 2/2] veth: allow configuring GSO maximums
Date: Sun, 3 Dec 2017 19:43:07 -0700 [thread overview]
Message-ID: <755b938b-2d7e-bc76-a7a3-0fee730e4e0c@gmail.com> (raw)
In-Reply-To: <20171201201158.25594-3-sthemmin@microsoft.com>
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.
next prev parent reply other threads:[~2017-12-04 2:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 20:11 [PATCH net-next 0/2] allow setting gso_maximum values Stephen Hemminger
2017-12-01 20:11 ` [PATCH net-next 1/2] rtnetlink: allow GSO maximums to be passed to device Stephen Hemminger
2017-12-01 20:11 ` [PATCH net-next 2/2] veth: allow configuring GSO maximums Stephen Hemminger
2017-12-04 2:43 ` David Ahern [this message]
2017-12-05 0:03 ` Cong Wang
2017-12-05 1:04 ` Eric Dumazet
2017-12-01 23:30 ` [PATCH net-next 0/2] allow setting gso_maximum values Stephen Hemminger
2017-12-02 1:03 ` Solio Sarabia
2017-12-04 15:40 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=755b938b-2d7e-bc76-a7a3-0fee730e4e0c@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=sthemmin@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).