On Wed, Nov 17, 2021 at 12:44 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > > Hi Randy, > > On Wed, Nov 17, 2021 at 6:49 AM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote: > > On 11/16/21 6:58 PM, Stephen Rothwell wrote: > > > Changes since 20211116: > > > > ARCH=um SUBARCH=x86_64: > > # CONFIG_IPV6 is not set > > It doesn't always happen with CONFIG_IPV6=n, so I guess that's why > it wasn't detected before. Thanks for letting me know I guess the following addition would fix the issue ? diff --git a/arch/x86/um/asm/checksum_64.h b/arch/x86/um/asm/checksum_64.h index 7b6cd1921573c97361b8d486bbba3e8870d53ad6..4f0c15a61925c46b261f87fa319e6aff28f4cfce 100644 --- a/arch/x86/um/asm/checksum_64.h +++ b/arch/x86/um/asm/checksum_64.h @@ -14,6 +14,30 @@ static inline unsigned add32_with_carry(unsigned a, unsigned b) return a; } +#define _HAVE_ARCH_IPV6_CSUM +static inline __sum16 +csum_ipv6_magic(const struct in6_addr *saddr, + const struct in6_addr *daddr, + __u32 len, __u8 proto, __wsum sum) +{ + __u64 rest, sum64; + + rest = (__force __u64)htonl(len) + (__force __u64)htons(proto) + + (__force __u64)sum; + + asm(" addq (%[saddr]),%[sum]\n" + " adcq 8(%[saddr]),%[sum]\n" + " adcq (%[daddr]),%[sum]\n" + " adcq 8(%[daddr]),%[sum]\n" + " adcq $0,%[sum]\n" + + : [sum] "=r" (sum64) + : "[sum]" (rest), [saddr] "r" (saddr), [daddr] "r" (daddr)); + + return csum_fold( + (__force __wsum)add32_with_carry(sum64 & 0xffffffff, sum64>>32)); +} + extern __sum16 ip_compute_csum(const void *buff, int len); #endif > > > In file included from ../net/ethernet/eth.c:62:0: > > ../include/net/gro.h: In function ‘ip6_gro_compute_pseudo’: > > ../include/net/gro.h:413:22: error: implicit declaration of function ‘csum_ipv6_magic’; did you mean ‘csum_tcpudp_magic’? [-Werror=implicit-function-declaration] > > return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr, > > ^~~~~~~~~~~~~~~ > > csum_tcpudp_magic > > > > > > After I made ip6_gro_compute_pseudo() conditional on CONFIG_IPV6, > > I got this build error: > > > > In file included from ../net/ipv6/tcpv6_offload.c:10:0: > > ../net/ipv6/tcpv6_offload.c: In function ‘tcp6_gro_receive’: > > ../net/ipv6/tcpv6_offload.c:22:11: error: implicit declaration of function ‘ip6_gro_compute_pseudo’; did you mean ‘inet_gro_compute_pseudo’? [-Werror=implicit-function-declaration] > > ip6_gro_compute_pseudo)) { > > ^ > > ../include/net/gro.h:235:5: note: in definition of macro ‘__skb_gro_checksum_validate’ > > compute_pseudo(skb, proto)); \ > > ^~~~~~~~~~~~~~ > > ../net/ipv6/tcpv6_offload.c:21:6: note: in expansion of macro ‘skb_gro_checksum_validate’ > > skb_gro_checksum_validate(skb, IPPROTO_TCP, > > ^~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > This is UML x86_64 defconfig: > > > > $ make ARCH=um SUBARCH=x86_64 defconfig all > > noreply@xxxxxxxxxxxxxx reported the same issue for m5272c3_defconfig, > and I've bisected the failure to commit 4721031c3559db8e ("net: > move gro definitions to include/net/gro.h"). > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds