Commit 1b4fc0e2 authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller
Browse files

bnx2x: fix tunneling CSUM calculation

Since commit c957d09f

"bnx2x: Remove sparse and coccinelle warnings"
driver provided wrong partial csum for HW in tunneing
Reported-by: default avatarEric Dumazet <>
CC: Alexander Duyck <>
CC: Pravin Shelar <>
CC: Cong Wang <>
Signed-off-by: default avatarDmitry Kravkov <>
Tested-by: default avatarEric Dumazet <>
Signed-off-by: default avatarDavid S. Miller <>
parent a8798a5c
...@@ -3543,9 +3543,9 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb, ...@@ -3543,9 +3543,9 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb,
/* outer IP header info */ /* outer IP header info */
if (xmit_type & XMIT_CSUM_V4) { if (xmit_type & XMIT_CSUM_V4) {
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
u16 csum = (__force u16)(~iph->check) - u32 csum = (__force u32)(~iph->check) -
(__force u16)iph->tot_len - (__force u32)iph->tot_len -
(__force u16)iph->frag_off; (__force u32)iph->frag_off;
pbd2->fw_ip_csum_wo_len_flags_frag = pbd2->fw_ip_csum_wo_len_flags_frag =
bswab16(csum_fold((__force __wsum)csum)); bswab16(csum_fold((__force __wsum)csum));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment