[SK_BUFF]: Introduce skb_network_offset()
For the quite common 'skb->nh.raw - skb->data' sequence. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e7dd65dafd
commit
bbe735e424
@@ -1865,7 +1865,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
++st->tx_tso;
|
||||
|
||||
eth_type = skb->nh.raw - skb->data == ETH_HLEN ?
|
||||
eth_type = skb_network_offset(skb) == ETH_HLEN ?
|
||||
CPL_ETH_II : CPL_ETH_II_VLAN;
|
||||
|
||||
hdr = (struct cpl_tx_pkt_lso *)skb_push(skb, sizeof(*hdr));
|
||||
|
Reference in New Issue
Block a user