diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-10 22:16:10 -0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-25 22:24:58 -0700 |
commit | bbe735e4247dba32568a305553b010081c8dea99 (patch) | |
tree | 95d96619c85785a47ccee48965b68d99cf946854 /drivers/net/cxgb3 | |
parent | e7dd65dafda5737a983c04d652a69ab8da78ee3f (diff) | |
download | op-kernel-dev-bbe735e4247dba32568a305553b010081c8dea99.zip op-kernel-dev-bbe735e4247dba32568a305553b010081c8dea99.tar.gz |
[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>
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/sge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 4dd7120..7e9e9db 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -897,7 +897,7 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb, d->flit[2] = 0; cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT_LSO); hdr->cntrl = htonl(cntrl); - eth_type = skb->nh.raw - skb->data == ETH_HLEN ? + eth_type = skb_network_offset(skb) == ETH_HLEN ? CPL_ETH_II : CPL_ETH_II_VLAN; tso_info |= V_LSO_ETH_TYPE(eth_type) | V_LSO_IPHDR_WORDS(skb->nh.iph->ihl) | |