mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
bnx2x: fix tunneling CSUM calculation
Since commit c957d09ffda417f6c8e3d1f10e2b05228607d6d7 "bnx2x: Remove sparse and coccinelle warnings" driver provided wrong partial csum for HW in tunneing scenarios. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Alexander Duyck <alexander.h.duyck@intel.com> CC: Pravin Shelar <pshelar@nicira.com> CC: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Tested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a8798a5c77
commit
1b4fc0e249
@ -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));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user