Date: Mon, 28 Feb 2022 15:12:58 +0800 From: Zhenlei Huang <zlei.huang@gmail.com> To: Santiago Martinez <sm@codenetworks.net> Cc: freebsd-net@freebsd.org Subject: Re: Current with RSS and EPAIR and without INET6. Message-ID: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com> In-Reply-To: <5a7afbfc-586e-710d-f3af-c3ab92f1ae4e@codenetworks.net> References: <5a7afbfc-586e-710d-f3af-c3ab92f1ae4e@codenetworks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_E10F9D72-229B-44C7-AA58-A280AEC6E5C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 27, 2022, at 8:59 PM, Santiago Martinez <sm@codenetworks.net> = wrote: >=20 > Hi Everyone,=20 >=20 > While testing RSS and EPAIR I have find out that it is required to = have kernel 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 = sure 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. #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 > #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 --Apple-Mail=_E10F9D72-229B-44C7-AA58-A280AEC6E5C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><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 Martinez <<a = href=3D"mailto:sm@codenetworks.net" class=3D"">sm@codenetworks.net</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 = iocage 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, 255);" 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, 255);" class=3D"">--- a/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, 255);" class=3D"">+++ 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"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);" class=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 added 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 INET 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"">#ifdef = RSS<br class=3D"">#include <net/rss_config.h><br class=3D"">#include= <netinet/in_rss.h></span></font><span style=3D"font-family: = monospace;" class=3D""> </span></div></div><div><div><span class=3D""= style=3D"font-family: monospace; color: rgb(24, 178, 24); = background-color: rgb(255, 255, 255);">+#ifdef INET6</span><span = class=3D"" style=3D"background-color: rgb(255, 255, 255);"><font = face=3D"monospace" class=3D""> </font><br class=3D""></span><font = color=3D"#a021df" face=3D"Menlo" class=3D"">#include = <netinet6/in6_rss.h></font><font face=3D"monospace" = class=3D""> <br class=3D""></font><span class=3D"" = style=3D"font-family: monospace; color: rgb(24, 178, 24); = background-color: rgb(255, 255, 255);">+#endif</span><span = class=3D""><font face=3D"monospace" class=3D""><span = style=3D"background-color: 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""><div = 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, 255);" 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_soft_m= 2cpuid_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);" class=3D""> </span><br class=3D""> = &n= bsp; case ETHERTYPE_IPV6: <br class=3D""> = &n= bsp; rss_soft_m= 2cpuid_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""><br class=3D""> <span style=3D"font-family:monospace" class=3D""></span></p> </div> </div></blockquote></div><br class=3D""></body></html>= --Apple-Mail=_E10F9D72-229B-44C7-AA58-A280AEC6E5C0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0687A548-41D3-4D84-A83B-B2C0A87056BC>