diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2010-12-14 10:24:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-16 17:43:15 -0500 |
commit | 0d0b16727f24f8258eeb33818347ca0f4557f982 (patch) | |
tree | e89fec837700b02aff0d08de1c5cbae3ff5060a8 /drivers/net/vmxnet3 | |
parent | 55508d601dab7df5cbcc7a63f4be8620eface204 (diff) |
net: Fix drivers advertising HW_CSUM feature to use csum_start
Some drivers are using skb_transport_offset(skb) instead of skb->csum_start
for NETIF_F_HW_CSUM offload. This does not matter now, but if someone
implements checksumming of encapsulated packets then this will break silently.
TSO output paths are left as they are, since they are for IP+TCP only
(might be worth converting though).
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 0169be7694a..23154cf601e 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -798,7 +798,7 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
798 | { | 798 | { |
799 | struct Vmxnet3_TxDataDesc *tdd; | 799 | struct Vmxnet3_TxDataDesc *tdd; |
800 | 800 | ||
801 | if (ctx->mss) { | 801 | if (ctx->mss) { /* TSO */ |
802 | ctx->eth_ip_hdr_size = skb_transport_offset(skb); | 802 | ctx->eth_ip_hdr_size = skb_transport_offset(skb); |
803 | ctx->l4_hdr_size = ((struct tcphdr *) | 803 | ctx->l4_hdr_size = ((struct tcphdr *) |
804 | skb_transport_header(skb))->doff * 4; | 804 | skb_transport_header(skb))->doff * 4; |
@@ -807,7 +807,7 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
807 | unsigned int pull_size; | 807 | unsigned int pull_size; |
808 | 808 | ||
809 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 809 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
810 | ctx->eth_ip_hdr_size = skb_transport_offset(skb); | 810 | ctx->eth_ip_hdr_size = skb_checksum_start_offset(skb); |
811 | 811 | ||
812 | if (ctx->ipv4) { | 812 | if (ctx->ipv4) { |
813 | struct iphdr *iph = (struct iphdr *) | 813 | struct iphdr *iph = (struct iphdr *) |