Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85824
b: refs/heads/master
c: 41825d7
h: refs/heads/master
v: v3
  • Loading branch information
Auke Kok authored and Jeff Garzik committed Feb 15, 2008
1 parent fe80c8b commit eab9e40
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 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: 5918bd88effd0233a048983570ec5803f5f753dc
refs/heads/master: 41825d7158d4ca6488d562d73279392a886b9e7c
24 changes: 21 additions & 3 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2277,11 +2277,29 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
IXGBE_ADVTXD_DTYP_CTXT);

if (skb->ip_summed == CHECKSUM_PARTIAL) {
if (skb->protocol == htons(ETH_P_IP))
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
if (ip_hdr(skb)->protocol == IPPROTO_TCP)
type_tucmd_mlhl |=
IXGBE_ADVTXD_TUCMD_L4T_TCP;
break;

case __constant_htons(ETH_P_IPV6):
/* XXX what about other V6 headers?? */
if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
type_tucmd_mlhl |=
IXGBE_ADVTXD_TUCMD_L4T_TCP;
break;

if (skb->sk->sk_protocol == IPPROTO_TCP)
type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP;
default:
if (unlikely(net_ratelimit())) {
DPRINTK(PROBE, WARNING,
"partial checksum but proto=%x!\n",
skb->protocol);
}
break;
}
}

context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
Expand Down

0 comments on commit eab9e40

Please sign in to comment.