Re: [PATCH net-next 0/2] Improvements to the DSA deferred xmit

From: David Miller
Date: Thu Jan 02 2020 - 16:49:55 EST


From: Vladimir Oltean <olteanv@xxxxxxxxx>
Date: Fri, 27 Dec 2019 03:42:06 +0200

> The DSA deferred xmit mechanism is currently used by a single driver
> (sja1105) because the transmission of some operations requires SPI
> access in the fastpath.
>
> This 2-patch series makes this mechanism better for everybody:
>
> - For those who don't use it, thanks to one less assignment in the
> hotpath
> - For those who do, by making its scheduling more amenable and moving it
> outside the generic workqueue (since it still deals with packet
> hotpath, after all)

Two comments about this patch series, I think it needs more work:

1) This adds the thread and the xmit queue but not code that actually
uses it. You really have to provide the support code in the driver
at the same time you add the new facitlity so we can actually see
how it'll be used.

2) Patch #1 talks about a tradeoff. Replacing the CB initialization of
the field skb_get(). But this skb_get() is an atomic operation and
thus much more expensive for users of the deferred xmit scheme.

Thanks.