From: Saeed Mahameed <saeed@kernel.org>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v1 1/2] net: core: count drops from GRO
Date: Fri, 08 Jan 2021 12:26:58 -0800 [thread overview]
Message-ID: <0e06ff3234b78b5bde6bf77d192a42c3f8ab5319.camel@kernel.org> (raw)
In-Reply-To: <c11bb25a-f73d-3ae9-b1fd-7eb96bc79cc7@pensando.io>
On Fri, 2021-01-08 at 11:21 -0800, Shannon Nelson wrote:
> On 1/8/21 10:26 AM, Jesse Brandeburg wrote:
> > Shannon Nelson wrote:
> >
> > > On 1/6/21 1:55 PM, Jesse Brandeburg wrote:
> > > > When drivers call the various receive upcalls to receive an skb
> > > > to the stack, sometimes that stack can drop the packet. The
> > > > good
> > > > news is that the return code is given to all the drivers of
> > > > NET_RX_DROP or GRO_DROP. The bad news is that no drivers except
> > > > the one "ice" driver that I changed, check the stat and
> > > > increment
> > > If the stack is dropping the packet, isn't it up to the stack to
> > > track
> > > that, perhaps with something that shows up in netstat -s? We
> > > don't
> > > really want to make the driver responsible for any drops that
> > > happen
> > > above its head, do we?
> > I totally agree!
> >
> > In patch 2/2 I revert the driver-specific changes I had made in an
> > earlier patch, and this patch *was* my effort to make the stack
> > show the
> > drops.
> >
> > Maybe I wasn't clear. I'm seeing packets disappear during TCP
> > workloads, and this GRO_DROP code was the source of the drops (I
> > see it
> > returning infrequently but regularly)
> >
> > The driver processes the packet but the stack never sees it, and
> > there
> > were no drop counters anywhere tracking it.
> >
>
> My point is that the patch increments a netdev counter, which to my
> mind
> immediately implicates the driver and hardware, rather than the
> stack.
> As a driver maintainer, I don't want to be chasing driver packet
> drop
> reports that are a stack problem. I'd rather see a new counter in
> netstat -s that reflects the stack decision and can better imply
> what
> went wrong. I don't have a good suggestion for a counter name at
> the
> moment.
>
> I guess part of the issue is that this is right on the boundary of
> driver-stack. But if we follow Eric's suggestions, maybe the
> problem
> magically goes away :-) .
>
> sln
>
I think there is still some merit in this patchset even with Eric's
removal of GRO_DROP from gro_receive(). As Eric explained, it is still
possible to silently drop for the same reason when drivers
call napi_get_frags or even alloc_skb() apis, many drivers do not
account for such packet drops, and maybe it is the right thing to do to
inline the packet drop accounting into the skb alloc APIs ? the
question is, is it the job of those APIs to update netdev->stats ?
next prev parent reply other threads:[~2021-01-08 20:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 21:55 [Intel-wired-lan] [PATCH net-next v1 0/2] GRO drop accounting Jesse Brandeburg
2021-01-06 21:55 ` [Intel-wired-lan] [PATCH net-next v1 1/2] net: core: count drops from GRO Jesse Brandeburg
2021-01-07 18:47 ` Jacob Keller
2021-01-07 21:15 ` Alexander Duyck
2021-01-08 18:23 ` Jesse Brandeburg
2021-01-08 0:50 ` Shannon Nelson
2021-01-08 18:26 ` Jesse Brandeburg
2021-01-08 19:21 ` Shannon Nelson
2021-01-08 20:26 ` Saeed Mahameed [this message]
2021-01-08 22:17 ` Eric Dumazet
2021-01-14 13:53 ` Jamal Hadi Salim
2021-01-08 9:25 ` Eric Dumazet
2021-01-08 18:35 ` Jesse Brandeburg
2021-01-08 18:45 ` Eric Dumazet
2021-01-09 0:54 ` Jacob Keller
2021-01-06 21:55 ` [Intel-wired-lan] [PATCH net-next v1 2/2] ice: remove GRO drop accounting Jesse Brandeburg
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=0e06ff3234b78b5bde6bf77d192a42c3f8ab5319.camel@kernel.org \
--to=saeed@kernel.org \
--cc=intel-wired-lan@osuosl.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