netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Solio Sarabia <solio.sarabia@intel.com>
To: David Ahern <dsahern@gmail.com>, stephen@networkplumber.org
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	sthemmin@microsoft.com, shiny.sebastian@intel.com
Subject: Re: [PATCH RFC 2/2] veth: propagate bridge GSO to peer
Date: Wed, 29 Nov 2017 16:35:37 -0800	[thread overview]
Message-ID: <20171130003534.GA60@intel.com> (raw)
In-Reply-To: <91628267-2e48-a231-7cc2-4830eb95ceef@gmail.com>

On Mon, Nov 27, 2017 at 07:02:01PM -0700, David Ahern wrote:
> On 11/27/17 6:42 PM, Solio Sarabia wrote:
> > Adding ioctl support for 'ip link set' would work. I'm still concerned
> > how to enforce the upper limit to not exceed that of the lower devices.
> > 
Actually, giving the user control to change gso doesn't solve the issue.
In a VM, user could simple ignore setting the gso, still hurting host
perf. We need to enforce the lower gso on the bridge/veth.

Should this issue be fixed at hv_netvsc level? Why is the driver passing
down gso buffer sizes greater than what synthetic interface allows.

> > Consider a system with three NICs, each reporting values in the range
> > [60,000 - 62,780]. Users could set virtual interfaces' gso to 65,536,
> > exceeding the limit, and having the host do sw gso (vms settings must
> > not affect host performance.)
> > 
> > Looping through interfaces?  With the difference that now it'd be
> > trigger upon user's request, not every time a veth is created (like one
> > previous patch discussed.)
> > 
> 
> You are concerned about the routed case right? One option is to have VRF
> devices propagate gso sizes to all devices (veth, vlan, etc) enslaved to
> it. VRF devices are Layer 3 master devices so an L3 parallel to a bridge.
Having the VRF device propagate the gso to its slaves is opposite of
what we do now: get minimum of all ports and assign it to bridge
(net/bridge/br_if.c, br_min_mtu, br_set_gso_limits.)

Would it be right to change the logic flow? If so, this this could work:

(1) bridge gets gso from lower devices upon init/setup
(2) when new device is attached to bridge, bridge sets gso for this new
    slave (and its peer if it's veth.)
(3) as the code is now, there's an optimization opportunity: for every
    new interface attached to bridge, bridge loops through all ports to
    set gso, mtu. It's not necessary as bridge already has the minimum
    from previous interfaces attached. Could be O(1) instead of O(n).

  reply	other threads:[~2017-11-30  0:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 18:17 [PATCH RFC 0/2] veth, bridge, and GSO maximums Stephen Hemminger
2017-11-26 18:17 ` [PATCH RFC 1/2] br: add notifier for when bridge changes it " Stephen Hemminger
2017-11-26 18:17 ` [PATCH RFC 2/2] veth: propagate bridge GSO to peer Stephen Hemminger
2017-11-27  3:13   ` David Ahern
2017-11-27  7:07     ` Stephen Hemminger
2017-11-27 20:14       ` Solio Sarabia
2017-11-27 21:15         ` Stephen Hemminger
2017-11-28  1:42           ` Solio Sarabia
2017-11-28  2:02             ` David Ahern
2017-11-30  0:35               ` Solio Sarabia [this message]
2017-11-30 17:10                 ` Stephen Hemminger
2017-11-30 17:26                   ` Eric Dumazet
2017-11-30 17:36                     ` Stephen Hemminger
2017-11-30 17:38                     ` David Miller
2017-11-30 17:49                     ` Stephen Hemminger
2017-11-30 17:59                       ` Eric Dumazet
2017-11-30 18:08                         ` Stephen Hemminger
2017-11-30 18:10                           ` Eric Dumazet
2017-12-01 20:30               ` Stephen Hemminger
2017-11-30 15:47 ` [PATCH RFC 0/2] veth, bridge, and GSO maximums David Miller
2017-11-30 17:11   ` Stephen Hemminger
2017-11-30 20:50     ` Alexander Duyck

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=20171130003534.GA60@intel.com \
    --to=solio.sarabia@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=shiny.sebastian@intel.com \
    --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).