Message ID | 20210809115722.351383-1-vladimir.oltean@nxp.com |
---|---|
Headers | show |
Series | DSA tagger helpers | expand |
On Mon, Aug 09, 2021 at 02:57:19PM +0300, Vladimir Oltean wrote: > All header taggers open-code a memmove that is fairly not all that > obvious, and we can hide the details behind a helper function, since the > only thing specific to the driver is the length of the header tag. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On Mon, Aug 09, 2021 at 02:57:21PM +0300, Vladimir Oltean wrote: > It seems that protocol tagging driver writers are always surprised about > the formula they use to reach their EtherType header on RX, which > becomes apparent from the fact that there are comments in multiple > drivers that mention the same information. > > Create a helper that returns a void pointer to skb->data - 2, as well as > centralize the explanation why that is the case. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On 8/9/2021 4:57 AM, Vladimir Oltean wrote: > All header taggers open-code a memmove that is fairly not all that > obvious, and we can hide the details behind a helper function, since the > only thing specific to the driver is the length of the header tag. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian
On 8/9/2021 4:57 AM, Vladimir Oltean wrote: > It seems that protocol tagging driver writers are always surprised about > the formula they use to reach their EtherType header on RX, which > becomes apparent from the fact that there are comments in multiple > drivers that mention the same information. > > Create a helper that returns a void pointer to skb->data - 2, as well as > centralize the explanation why that is the case. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian