]> git.itanic.dy.fi Git - linux-stable/commit
net: dpaa: avoid one skb_reset_mac_header() in dpaa_enable_tx_csum()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 20 Apr 2023 22:55:55 +0000 (01:55 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Apr 2023 13:16:44 +0000 (14:16 +0100)
commite2fdfd7119128b49d81972a75e74169802aa8ae0
tree4f3d9f5bb8e65997c9ebf759e8100e626774305e
parent1f5020acb33f926030f62563c86dffca35c7b701
net: dpaa: avoid one skb_reset_mac_header() in dpaa_enable_tx_csum()

It appears that dpaa_enable_tx_csum() only calls skb_reset_mac_header()
to get to the VLAN header using skb_mac_header().

We can use skb_vlan_eth_hdr() to get to the VLAN header based on
skb->data directly. This avoids spending a few cycles to set
skb->mac_header.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c