Date: Mon, 28 Feb 2022 21:16:32 +0100 From: Santiago Martinez <sm@codenetworks.net> To: Zhenlei Huang <zlei.huang@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: Current with RSS and EPAIR and without INET6. Message-ID: <E12FF030-E12E-442C-8675-59979CEE59D3@codenetworks.net> In-Reply-To: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com> References: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail-C415A5CE-9694-4D8F-B5F6-B74DF3407486 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: >=20 > =EF=BB=BF >=20 >>> On Feb 27, 2022, at 8:59 PM, Santiago Martinez <sm@codenetworks.net> wro= te: >>>=20 >>> Hi Everyone,=20 >>>=20 >>> While testing RSS and EPAIR I have find out that it is required to have k= ernel compiled with INET6 when enabling RSS+EPAIR. >>>=20 >>> I usually remove everything that i do not use from the kernel, like SCTP= and INET6, etc.=20 >>>=20 >>> After compiling with "option RSS" i noticed that iocage failed to start,= checking the dmesg buffer clearly showed why. >>>=20 >>> [321] link_elf_obj: symbol rss_soft_m2cpuid_v6 undefined=20 >>> [321] linker_load_file: /boot/kernel/if_epair.ko - unsupported file type= >>>=20 >>> I added two ifdef INET6 on the if_epair and solve the issue, still not s= ure if completely correct. >>>=20 >>> Best regards. >>>=20 >>> Santi >>>=20 >>> diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c=20 >>> index 629de981d5b0..235e5098ebd8 100644=20 >>> --- a/sys/net/if_epair.c=20 >>> +++ b/sys/net/if_epair.c=20 >>> @@ -74,6 +74,8 @@ __FBSDID("$FreeBSD$");=20 >>> #ifdef RSS=20 >>> #include <net/rss_config.h>=20 >>> #include <netinet/in_rss.h>=20 >>> +#endif=20 >>> +#ifdef INET6=20 >>> #include <netinet6/in6_rss.h>=20 >>> #endif=20 >>>=20 >> The newly added ifdef should be wrapped around by RSS.=20 >> And also is "opt_inet6.h" header required? >> And maybe ifdef INET is also required as someone need IPv4 only. >>=20 >> #ifdef RSS >> #include <net/rss_config.h> >> #include <netinet/in_rss.h>=20 >> +#ifdef INET6=20 >> #include <netinet6/in6_rss.h>=20 >> +#endif=20 >> #endif=20 >>=20 >> #include <net/vnet.h>=20 >> @@ -220,9 +222,11 @@ epair_menq(struct mbuf *m, struct epair_softc *osc)=20= >> case ETHERTYPE_IP:=20 >> rss_soft_m2cpuid_v4(m, 0, &bucket);=20 >> break;=20 >> +#ifdef INET6=20 >> case ETHERTYPE_IPV6:=20 >> rss_soft_m2cpuid_v6(m, 0, &bucket);=20 >> break;=20 >> +#endif=20 >> default:=20 >> bucket =3D 0;=20 >> break; >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >=20 --Apple-Mail-C415A5CE-9694-4D8F-B5F6-B74DF3407486 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D= utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr">Hi t= here , yes good point , the first ifdef should go inside the RSS ifdef . Wil= l modify it to also work with INET6 only. Thanks for the feedback.</div><div= dir=3D"ltr">Santi</div><div dir=3D"ltr"><br></div><div dir=3D"ltr"><br><blo= ckquote type=3D"cite">On 28 Feb 2022, at 08:14, Zhenlei Huang <zlei.huang= @gmail.com> wrote:<br><br></blockquote></div><blockquote type=3D"cite"><d= iv dir=3D"ltr">=EF=BB=BF<meta http-equiv=3D"Content-Type" content=3D"text/ht= ml; charset=3Dus-ascii"><br class=3D""><div><br class=3D""><blockquote type=3D= "cite" class=3D""><div class=3D"">On Feb 27, 2022, at 8:59 PM, Santiago Mart= inez <<a href=3D"mailto:sm@codenetworks.net" class=3D"">sm@codenetworks.n= et</a>> wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D= ""> =20 <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8"= class=3D""> =20 <div class=3D""><p class=3D"">Hi Everyone, <br class=3D""> </p><p class=3D"">While testing RSS and EPAIR I have find out that it is= required to have kernel compiled with INET6 when enabling RSS+EPAIR.<br class=3D= ""> </p><p class=3D"">I usually remove everything that i do not use from the= kernel, like SCTP and INET6, etc. <br class=3D""> </p><p class=3D"">After compiling with "option RSS" i noticed that iocag= e failed to start, checking the dmesg buffer clearly showed why.<br class=3D""> </p><p class=3D""><span style=3D"font-family:monospace" class=3D""><span= style=3D"background-color: rgb(255, 255, 255);" class=3D"">[321] link_elf_obj: symbol rss_soft_m2cpuid_v6 undefined </span><br class=3D""> [321] linker_load_file: /boot/kernel/if_epair.ko - unsupported file type<br class=3D""> </span></p><p class=3D""><span style=3D"font-family:monospace" class=3D= ""></span>I added two ifdef INET6 on the if_epair and solve the issue, still not sure if completely correct.<br class=3D""> </p><p class=3D"">Best regards.</p><p class=3D"">Santi</p><p class=3D"">= <span style=3D"font-family:monospace" class=3D""><span style=3D"font-weight:= bold; background-color: rgb(255, 255, 255);" class=3D"">diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c</span><span style=3D= "background-color: rgb(255, 255, 255);" class=3D""> </span><br class=3D""> <span style=3D"font-weight: bold; background-color: rgb(255, 255, 25= 5);" class=3D"">index 629de981d5b0..235e5098ebd8 100644</span><span style=3D"background-= color: rgb(255, 255, 255);" class=3D""> </span><br class=3D""> <span style=3D"font-weight: bold; background-color: rgb(255, 255, 25= 5);" class=3D"">--- a/sys/net/if_epair.c</span><span style=3D"background-color: rgb(25= 5, 255, 255);" class=3D""> </span><br class=3D""> <span style=3D"font-weight: bold; background-color: rgb(255, 255, 25= 5);" class=3D"">+++ b/sys/net/if_epair.c</span><span style=3D"background-color: rgb(25= 5, 255, 255);" class=3D""> </span><br class=3D""> <span style=3D"color:#18b2b2;background-color:#ffffff;" class=3D"">@= @ -74,6 +74,8 @@</span><span style=3D"background-color: rgb(255, 255, 255)= ;" class=3D""> __FBSDID("$FreeBSD$"); </span><br class=3D""> #ifdef RSS <br class=3D""> #include <net/rss_config.h> <br class=3D""> #include <netinet/in_rss.h> <br class=3D""> <span style=3D"color:#18b218;background-color:#ffffff;" class=3D"">+= #endif</span><span style=3D"background-color: rgb(255, 255, 255);" class=3D"= "> </span><br class=3D""> <span style=3D"color:#18b218;background-color:#ffffff;" class=3D"">+= #ifdef INET6</span><span style=3D"background-color: rgb(255, 255, 255);" c= lass=3D""> </span><br class=3D""> #include <netinet6/in6_rss.h> <br class=3D""> #endif <br class=3D""></span></p></div></div></blockquote><div>The newly ad= ded ifdef should be wrapped around by RSS. </div><div>And also is "opt_= inet6.h" header required?</div><div>And maybe <span class=3D"">ifdef IN= ET is also required as someone need IPv4 only.</span></div><span class=3D= ""><br class=3D""></span><div><font color=3D"#a021df" face=3D"Menlo" class=3D= ""><span style=3D"background-color: rgba(255, 255, 255, 0);" class=3D"">#ifd= ef RSS<br class=3D"">#include <net/rss_config.h><br class=3D"">#includ= e <netinet/in_rss.h></span></font><span style=3D"font-family: monospac= e;" class=3D""> </span></div></div><div><div><span class=3D"" style=3D"= font-family: monospace; color: rgb(24, 178, 24); background-color: rgb(255, 2= 55, 255);">+#ifdef INET6</span><span class=3D"" style=3D"background-color: r= gb(255, 255, 255);"><font face=3D"monospace" class=3D""> </font><br cla= ss=3D""></span><font color=3D"#a021df" face=3D"Menlo" class=3D"">#include &l= t;netinet6/in6_rss.h></font><font face=3D"monospace" class=3D""> <br= class=3D""></font><span class=3D"" style=3D"font-family: monospace; color: r= gb(24, 178, 24); background-color: rgb(255, 255, 255);">+#endif</span><span c= lass=3D""><font face=3D"monospace" class=3D""><span style=3D"background-colo= r: rgb(255, 255, 255);" class=3D""> <br class=3D""></span></font></span= ><span class=3D""><font color=3D"#a021df" face=3D"Menlo" class=3D"">#endif</= font></span><span class=3D"" style=3D"font-family: monospace;"> </span>= </div><br class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><d= iv class=3D""><p class=3D""><span style=3D"font-family:monospace" class=3D""= > #include <net/vnet.h> <br class=3D""> <span style=3D"color:#18b2b2;background-color:#ffffff;" class=3D"">@= @ -220,9 +222,11 @@</span><span style=3D"background-color: rgb(255, 255, 25= 5);" class=3D""> epair_menq(struct mbuf *m, struct epair_softc *osc) </span><br class=3D""> &n= bsp; case ETHERTYPE_IP: <br class=3D""> &n= bsp; rss_so= ft_m2cpuid_v4(m, 0, &bucket); <br class=3D""> &n= bsp; break;= <br class=3D""> <span style=3D"color:#18b218;background-color:#ffffff;" class=3D"">+= #ifdef INET6</span><span style=3D"background-color: rgb(255, 255, 255);" c= lass=3D""> </span><br class=3D""> &n= bsp; case ETHERTYPE_IPV6: <br class=3D""> &n= bsp; rss_so= ft_m2cpuid_v6(m, 0, &bucket); <br class=3D""> &n= bsp; break;= <br class=3D""> <span style=3D"color:#18b218;background-color:#ffffff;" class=3D"">+= #endif</span><span style=3D"background-color: rgb(255, 255, 255);" class=3D"= "> </span><br class=3D""> &n= bsp; default: <br class=3D""> &n= bsp; bucket= =3D 0; <br class=3D""> &n= bsp; break;= <br class=3D""> </span></p><p class=3D""><span style=3D"font-family:monospace" class=3D= ""></span><br class=3D""> <span style=3D"font-family:monospace" class=3D""></span></p><p class=3D= ""><br class=3D""> </p><p class=3D""><br class=3D""> </p> <span style=3D"font-family:monospace" class=3D""></span><p class=3D""><b= r class=3D""> <span style=3D"font-family:monospace" class=3D""></span></p> </div> </div></blockquote></div><br class=3D""></div></blockquote></body></html>= --Apple-Mail-C415A5CE-9694-4D8F-B5F6-B74DF3407486--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E12FF030-E12E-442C-8675-59979CEE59D3>