Re: Current with RSS and EPAIR and without INET6.
Date: Mon, 28 Feb 2022 20:16:32 UTC
Hi there , yes good point , the first ifdef should go inside the RSS ifdef . Will modify it to also work with INET6 only. Thanks for the feedback. Santi > On 28 Feb 2022, at 08:14, Zhenlei Huang <zlei.huang@gmail.com> wrote: > > > >>> On Feb 27, 2022, at 8:59 PM, Santiago Martinez <sm@codenetworks.net> wrote: >>> >>> Hi Everyone, >>> >>> While testing RSS and EPAIR I have find out that it is required to have kernel compiled with INET6 when enabling RSS+EPAIR. >>> >>> I usually remove everything that i do not use from the kernel, like SCTP and INET6, etc. >>> >>> After compiling with "option RSS" i noticed that iocage failed to start, checking the dmesg buffer clearly showed why. >>> >>> [321] link_elf_obj: symbol rss_soft_m2cpuid_v6 undefined >>> [321] linker_load_file: /boot/kernel/if_epair.ko - unsupported file type >>> >>> I added two ifdef INET6 on the if_epair and solve the issue, still not sure if completely correct. >>> >>> Best regards. >>> >>> Santi >>> >>> diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c >>> index 629de981d5b0..235e5098ebd8 100644 >>> --- a/sys/net/if_epair.c >>> +++ b/sys/net/if_epair.c >>> @@ -74,6 +74,8 @@ __FBSDID("$FreeBSD$"); >>> #ifdef RSS >>> #include <net/rss_config.h> >>> #include <netinet/in_rss.h> >>> +#endif >>> +#ifdef INET6 >>> #include <netinet6/in6_rss.h> >>> #endif >>> >> The newly added ifdef should be wrapped around by RSS. >> And also is "opt_inet6.h" header required? >> And maybe ifdef INET is also required as someone need IPv4 only. >> >> #ifdef RSS >> #include <net/rss_config.h> >> #include <netinet/in_rss.h> >> +#ifdef INET6 >> #include <netinet6/in6_rss.h> >> +#endif >> #endif >> >> #include <net/vnet.h> >> @@ -220,9 +222,11 @@ epair_menq(struct mbuf *m, struct epair_softc *osc) >> case ETHERTYPE_IP: >> rss_soft_m2cpuid_v4(m, 0, &bucket); >> break; >> +#ifdef INET6 >> case ETHERTYPE_IPV6: >> rss_soft_m2cpuid_v6(m, 0, &bucket); >> break; >> +#endif >> default: >> bucket = 0; >> break; >> >> >> >> >> >> >> >> >> >