aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 540b647eb825..23d0a4afe0e1 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2277,11 +2277,29 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
2277 IXGBE_ADVTXD_DTYP_CTXT); 2277 IXGBE_ADVTXD_DTYP_CTXT);
2278 2278
2279 if (skb->ip_summed == CHECKSUM_PARTIAL) { 2279 if (skb->ip_summed == CHECKSUM_PARTIAL) {
2280 if (skb->protocol == htons(ETH_P_IP)) 2280 switch (skb->protocol) {
2281 case __constant_htons(ETH_P_IP):
2281 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; 2282 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
2283 if (ip_hdr(skb)->protocol == IPPROTO_TCP)
2284 type_tucmd_mlhl |=
2285 IXGBE_ADVTXD_TUCMD_L4T_TCP;
2286 break;
2287
2288 case __constant_htons(ETH_P_IPV6):
2289 /* XXX what about other V6 headers?? */
2290 if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
2291 type_tucmd_mlhl |=
2292 IXGBE_ADVTXD_TUCMD_L4T_TCP;
2293 break;
2282 2294
2283 if (skb->sk->sk_protocol == IPPROTO_TCP) 2295 default:
2284 type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP; 2296 if (unlikely(net_ratelimit())) {
2297 DPRINTK(PROBE, WARNING,
2298 "partial checksum but proto=%x!\n",
2299 skb->protocol);
2300 }
2301 break;
2302 }
2285 } 2303 }
2286 2304
2287 context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl); 2305 context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);