Re: [PATCH v3 net-next] net: introduce dev_set_forwarding()

Eric Dumazet
2013-11-04T06:05:58Z

On Mon, 2013-11-04 at 13:23 +0800, Herbert Xu wrote:
> On Sun, Nov 03, 2013 at 09:00:54PM -0800, Eric Dumazet wrote:
> > On Mon, 2013-11-04 at 12:29 +0800, Herbert Xu wrote:
> >
> > > Have you actually measured this? The latency added by GRO is pure
> > > processing overhead. This is tiny when compared to the time NAPI takes
> > > to wait.
> >
> > Please take a look at
> >
> > 2e71a6f8084e net: gro: selective flush of packets
>
> This is a different problem altogether. I was worried about the
> latency in cases where we're idle and waiting for new data, while
> you're worried about the latency in the CPU-bound case.

Idle case, you very rarely cant keep up building skbs with 16 MSS.

>
> I think we can definitely improve our behaviour the CPU-bound case.
> Right now if we encounter something we can't hold for GRO we
> start processing it right away. Instead we can place it in a
> list for later processing together with the GRO packets.
>
> This way GRO packets are not penalised by non-GRO packets.
>
> You can then use the usual NAPI budget to minimise latency and
> ensure scheduling fairness.

We had these latencies only dealing with TCP packets, all GRO
candidates.

Really, I think we have used GRO at large scale here at Google ;)