Re: [PATCH net-next 6/7] net: dsa: remove useless copy of tagger xmit

From: Vivien Didelot
Date: Tue May 30 2017 - 11:46:02 EST


Hi Andrew,

Andrew Lunn <andrew@xxxxxxx> writes:

>> /* Transmit function may have to reallocate the original SKB */
>> - nskb = p->xmit(skb, dev);
>> + nskb = p->dp->ds->dst->tag_ops->xmit(skb, dev);
>
> This is also the hot path for DSA transmit. Do we really want to do 4
> extra pointer dereferences a million times per second, compared to one
> copy during setup?

Yep I get the idea. It felt weird to copy structure members like this
and not at least reusing the dsa_device_ops structure.

Thanks,

Vivien