Re: [PATCH] make net_gso_ok return false when gso_type is zero(invalid)

From: Marcelo Ricardo Leitner
Date: Tue Apr 10 2018 - 12:32:29 EST


On Sun, Apr 08, 2018 at 08:41:21PM +0200, Wenhua Shi wrote:
> 2018-04-08 18:51 GMT+02:00 David Miller <davem@xxxxxxxxxxxxx>:
> >
> > From: Wenhua Shi <march511@xxxxxxxxx>
> > Date: Fri, 6 Apr 2018 03:43:39 +0200
> >
> > > Signed-off-by: Wenhua Shi <march511@xxxxxxxxx>
> >
> > This precondition should be made impossible instead of having to do
> > an extra check everywhere that this helper is invoked, many of which
> > are in fast paths.
>
> I believe the precondition you said is quite true. In my situation, I
> have to disable GSO for some packet and I notice that it leads to a
> worse performance (slower than 1Mbps, was almost 800Mbps).
>
> Here's the hook I use on debian 9.4, kernel version 4.9:

There is quite a distance between 4.9 and net/net-next. Did you test
on a more recent kernel too?

Note that TCP stack now works with GSO being always on.
0a6b2a1dc2a2 ("tcp: switch to GSO being always on")