netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Michael Chan <michael.chan@broadcom.com>,
	David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>,
	Andrew Gospodarek <andrew.gospodarek@broadcom.com>
Subject: Re: [PATCH net-next v5 0/5] Introduce NETIF_F_GRO_HW
Date: Fri, 29 Dec 2017 13:43:32 +0100	[thread overview]
Message-ID: <20171229124332.GA20090@bistromath.localdomain> (raw)
In-Reply-To: <CAKgT0UexohK4Mup928VqLDfzuafB-geqhbHA_Y9dJL3Yo4goKw@mail.gmail.com>

2017-12-22, 10:14:32 -0800, Alexander Duyck wrote:
> On Fri, Dec 22, 2017 at 6:57 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> > IIUC, with the patches that were applied, each driver can define
> > whether GRO_HW depends on GRO? From a user's perspective, this
> > inconsistent behavior is going to be quite confusing.
> >
> > Worse than inconsistent behavior, it looks like a driver deciding that
> > GRO_HW doesn't depend on GRO is going to introduce a change of
> > behavior.  Previously, when GRO was disabled, there wouldn't be any
> > packet over MTU handed to the network stack.  Now, even if GRO is
> > disabled, GRO_HW might still be enabled, so we might get over-MTU
> > packets because of hardware GRO.
> 
> This isn't actually true. LRO was still handling packets larger than
> MTU over even when GRO was disabled.

Sure, LRO will also cause that, but we're speaking in the context of
GRO here, which means no LRO.


> > I don't think drivers should be allowed to say "GRO_HW doesn't depend
> > on GRO".
> 
> Why not, it doesn't. In my mind GRO_HW is closer to LRO than it is to
> GRO.

Why do you say that? It looks like GRO to me. These drivers are
calling tcp_gro_complete() for example.

> The only ugly bit as I see it is that these devices were exposing
> the feature via the GRO flag in the first place. So for the sake of
> legacy they might want to carry around the dependency.
> 
> > I think it's reasonable to be able to disable software GRO even if
> > hardware GRO is enabled. Thus, I would propose:
> > - keep the current GRO flag
> > - add a GRO_HW flag, depending on GRO, enforced by the core as in
> >   earlier versions of these patches
> > - add a GRO_SW flag, also depending on GRO
> 
> This seems like a bunch of extra overhead for not much gain. Do we
> really need to fork GRO into 3 bits? I would argue that GRO_HW really
> should have been branded something like FORWARDABLE_LRO, but nobody
> wanted to touch the name LRO since it apparently has some negative
> stigma to it. If we had used a name like that we probably wouldn't be
> going through all these extra hoops. The only real reason why this is
> even being associated with GRO in the first place is that is how this
> feature was hidden by the drivers so they got around having to deal
> with the LRO being disabled for routing/forwarding issue. Those are
> the parts that want to keep it associated with GRO since that is how
> they exposed it in their devices originally.

I think it wouldn't have hidden behind GRO if it wasn't GRO. Again,
why do you think it's not GRO?

-- 
Sabrina

  reply	other threads:[~2017-12-29 12:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-16  8:09 [PATCH net-next v5 0/5] Introduce NETIF_F_GRO_HW Michael Chan
2017-12-16  8:09 ` [PATCH net-next v5 1/5] net: " Michael Chan
2017-12-16 16:38   ` Alexander Duyck
2017-12-16  8:09 ` [PATCH net-next v5 2/5] net: Disable GRO_HW when generic XDP is installed on a device Michael Chan
2017-12-16  8:09 ` [PATCH net-next v5 3/5] bnxt_en: Use NETIF_F_GRO_HW Michael Chan
2017-12-16  8:09 ` [PATCH net-next v5 4/5] bnx2x: " Michael Chan
2017-12-17 11:49   ` Chopra, Manish
2017-12-16  8:09 ` [PATCH net-next v5 5/5] qede: " Michael Chan
2017-12-17 11:52   ` Chopra, Manish
2017-12-19 15:50 ` [PATCH net-next v5 0/5] Introduce NETIF_F_GRO_HW David Miller
2017-12-19 19:04   ` Marcelo Ricardo Leitner
2017-12-19 19:24     ` David Miller
2017-12-19 19:25     ` Michael Chan
2017-12-19 19:55       ` Marcelo Ricardo Leitner
2017-12-22 14:57 ` Sabrina Dubroca
2017-12-22 18:14   ` Alexander Duyck
2017-12-29 12:43     ` Sabrina Dubroca [this message]
2017-12-29 15:12       ` Alexander Duyck
2017-12-30  5:20         ` Michael Chan
2017-12-30 15:45           ` David Miller
2019-01-07 14:00 ` Shay Agroskin
2019-01-07 14:46   ` David Miller
2019-01-08 10:58   ` Michael Chan
2019-01-13 10:36     ` Shay Agroskin

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=20171229124332.GA20090@bistromath.localdomain \
    --to=sd@queasysnail.net \
    --cc=alexander.duyck@gmail.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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).