Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231905
b: refs/heads/master
c: 39d4a96
h: refs/heads/master
i:
  231903: 2e0b0f1
v: v3
  • Loading branch information
Shreyas Bhatewara authored and David S. Miller committed Jan 16, 2011
1 parent 56d7161 commit 541abf5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54da3d00f6e781f69cb8726757d190704b702a8e
refs/heads/master: 39d4a96fd7d2926e46151adbd18b810aeeea8ec0
23 changes: 9 additions & 14 deletions trunk/drivers/net/vmxnet3/vmxnet3_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,30 +807,25 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
skb_transport_header(skb))->doff * 4;
ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size;
} else {
unsigned int pull_size;

if (skb->ip_summed == CHECKSUM_PARTIAL) {
ctx->eth_ip_hdr_size = skb_checksum_start_offset(skb);

if (ctx->ipv4) {
struct iphdr *iph = (struct iphdr *)
skb_network_header(skb);
if (iph->protocol == IPPROTO_TCP) {
pull_size = ctx->eth_ip_hdr_size +
sizeof(struct tcphdr);

if (unlikely(!pskb_may_pull(skb,
pull_size))) {
goto err;
}
if (iph->protocol == IPPROTO_TCP)
ctx->l4_hdr_size = ((struct tcphdr *)
skb_transport_header(skb))->doff * 4;
} else if (iph->protocol == IPPROTO_UDP) {
else if (iph->protocol == IPPROTO_UDP)
/*
* Use tcp header size so that bytes to
* be copied are more than required by
* the device.
*/
ctx->l4_hdr_size =
sizeof(struct udphdr);
} else {
sizeof(struct tcphdr);
else
ctx->l4_hdr_size = 0;
}
} else {
/* for simplicity, don't copy L4 headers */
ctx->l4_hdr_size = 0;
Expand Down

0 comments on commit 541abf5

Please sign in to comment.