On Fri, Aug 28, 2015 at 12:46 PM, Joe Perches <[email protected]> wrote: > On Fri, 2015-08-28 at 14:28 -0500, [email protected] wrote: >> From: Carol L Soto <[email protected]> >> >> Seeing this message with mlx4_eni with IPv6: hw csum failure >> >> Changing IPv6 csum calculation to be based on OFED 2.4 code. >> When calculate IPv6 csum based also on source and destination >> addresses. > [] >> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c >> b/drivers/net/ethernet/mellanox/mlx4/en_rx.c > [] >> +static __wsum csum_ipv6_magic_nofold(const struct in6_addr *saddr, >> + const struct in6_addr *daddr, >> + __u32 len, unsigned short proto) >> +{ >> + __wsum res = 0; >> + >> + res = csum_add(res, saddr->in6_u.u6_addr32[0]); >> + res = csum_add(res, saddr->in6_u.u6_addr32[1]); >> + res = csum_add(res, saddr->in6_u.u6_addr32[2]); >> + res = csum_add(res, saddr->in6_u.u6_addr32[3]); >> + res = csum_add(res, daddr->in6_u.u6_addr32[0]); >> + res = csum_add(res, daddr->in6_u.u6_addr32[1]); >> + res = csum_add(res, daddr->in6_u.u6_addr32[2]); >> + res = csum_add(res, daddr->in6_u.u6_addr32[3]); >> + res = csum_add(res, len); >> + res = csum_add(res, htonl(proto)); > > You should try running sparse on this code.
Yep, if I remember correct, the patch is still under internal review with making sparse/smatch happy on it being a pending comment. Or. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
