aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge/myri10ge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r--drivers/net/myri10ge/myri10ge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 9bdd43ab3573..9f16681d0e7e 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -930,7 +930,7 @@ static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, u16 hw_csum)
930 (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) || 930 (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) ||
931 vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) { 931 vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) {
932 skb->csum = hw_csum; 932 skb->csum = hw_csum;
933 skb->ip_summed = CHECKSUM_HW; 933 skb->ip_summed = CHECKSUM_COMPLETE;
934 } 934 }
935} 935}
936 936
@@ -973,7 +973,7 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
973 if ((skb->protocol == ntohs(ETH_P_IP)) || 973 if ((skb->protocol == ntohs(ETH_P_IP)) ||
974 (skb->protocol == ntohs(ETH_P_IPV6))) { 974 (skb->protocol == ntohs(ETH_P_IPV6))) {
975 skb->csum = ntohs((u16) csum); 975 skb->csum = ntohs((u16) csum);
976 skb->ip_summed = CHECKSUM_HW; 976 skb->ip_summed = CHECKSUM_COMPLETE;
977 } else 977 } else
978 myri10ge_vlan_ip_csum(skb, ntohs((u16) csum)); 978 myri10ge_vlan_ip_csum(skb, ntohs((u16) csum));
979 } 979 }
@@ -1897,13 +1897,13 @@ again:
1897 pseudo_hdr_offset = 0; 1897 pseudo_hdr_offset = 0;
1898 odd_flag = 0; 1898 odd_flag = 0;
1899 flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST); 1899 flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST);
1900 if (likely(skb->ip_summed == CHECKSUM_HW)) { 1900 if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
1901 cksum_offset = (skb->h.raw - skb->data); 1901 cksum_offset = (skb->h.raw - skb->data);
1902 pseudo_hdr_offset = (skb->h.raw + skb->csum) - skb->data; 1902 pseudo_hdr_offset = (skb->h.raw + skb->csum) - skb->data;
1903 /* If the headers are excessively large, then we must 1903 /* If the headers are excessively large, then we must
1904 * fall back to a software checksum */ 1904 * fall back to a software checksum */
1905 if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) { 1905 if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) {
1906 if (skb_checksum_help(skb, 0)) 1906 if (skb_checksum_help(skb))
1907 goto drop; 1907 goto drop;
1908 cksum_offset = 0; 1908 cksum_offset = 0;
1909 pseudo_hdr_offset = 0; 1909 pseudo_hdr_offset = 0;