Date: Wed, 2 Mar 2022 23:24:56 +0100 From: Santiago Martinez <sm@codenetworks.net> To: Kristof Provost <kp@FreeBSD.org>, Zhenlei Huang <zlei.huang@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: Current with RSS and EPAIR and without INET6. Message-ID: <7f1b3db6-07e0-8919-072f-cc764194814c@codenetworks.net> In-Reply-To: <19c46030-0618-721a-7947-54142f50a943@codenetworks.net> References: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com> <E12FF030-E12E-442C-8675-59979CEE59D3@codenetworks.net> <9AC37B44-217F-4FE3-BAB3-482330F533AF@FreeBSD.org> <19c46030-0618-721a-7947-54142f50a943@codenetworks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------5i5ATyj0AEI50LkzKHF54NK3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Kristof and Zhenlei, I have updated the patch as requested (wrapped the ifdef INET|INET6 inside the ifdef RSS). It now works without INET6 or without INET. (only tested module loading and interface creation on both cases v4/6). Best regards. Santi @@ -73,8 +73,12 @@__FBSDID("$FreeBSD$"); #include <net/netisr.h> #ifdef RSS #include <net/rss_config.h> +#ifdef INET #include <netinet/in_rss.h> +#endif +#ifdef INET6 #include <netinet6/in6_rss.h> +#endif #endif #include <net/vnet.h> @@ -217,12 +221,16 @@epair_menq(struct mbuf *m, struct epair_softc *osc) eh = mtod(m, struct ether_header *); switch (ntohs(eh->ether_type)) { +#ifdef INET case ETHERTYPE_IP: rss_soft_m2cpuid_v4(m, 0, &bucket); break; +#endif +#ifdef INET6 case ETHERTYPE_IPV6: rss_soft_m2cpuid_v6(m, 0, &bucket); break; +#endif default: bucket = 0; break; On 3/2/22 20:12, Santiago Martinez wrote: > Hi Kristof, sorry for my late reply. Im testing without INET. > > I will keep you updated. > > Santi > > > On 2/28/22 21:20, Kristof Provost wrote: >> On 28 Feb 2022, at 21:16, Santiago Martinez wrote: >>> 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 >>> >>> >> Can you copy me on your updated patch? I’ll commit that. >> >> Thanks for finding and reporting this. >> >> Kristof >> > --------------5i5ATyj0AEI50LkzKHF54NK3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Hi Kristof and Zhenlei,</p> <p>I have updated the patch as requested (wrapped the ifdef INET|INET6 inside the ifdef RSS).</p> <p>It now works without INET6 or without INET. (only tested module loading and interface creation on both cases v4/6).</p> <p>Best regards.</p> <p>Santi</p> <p><span style="font-family:monospace"><span style="color:#18b2b2;background-color:#ffffff;">@@ -73,8 +73,12 @@</span><span style="color:#000000;background-color:#ffffff;"> __FBSDID("$FreeBSD$"); </span><br> #include <net/netisr.h> <br> #ifdef RSS <br> #include <net/rss_config.h> <br> <span style="color:#18b218;background-color:#ffffff;">+#ifdef INET</span><span style="color:#000000;background-color:#ffffff;"> </span><br> #include <netinet/in_rss.h> <br> <span style="color:#18b218;background-color:#ffffff;">+#endif</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="color:#18b218;background-color:#ffffff;">+#ifdef INET6</span><span style="color:#000000;background-color:#ffffff;"> </span><br> #include <netinet6/in6_rss.h> <br> <span style="color:#18b218;background-color:#ffffff;">+#endif</span><span style="color:#000000;background-color:#b21818;"> </span><span style="color:#000000;background-color:#ffffff;"> </span><br> #endif <br> #include <net/vnet.h> <br> <br> <span style="color:#18b2b2;background-color:#ffffff;">@@ -217,12 +221,16 @@</span><span style="color:#000000;background-color:#ffffff;"> epair_menq(struct mbuf *m, struct epair_softc *osc) </span><br> eh = mtod(m, struct ether_header *); <br> <br> switch (ntohs(eh->ether_type)) { <br> <span style="color:#18b218;background-color:#ffffff;">+#ifdef INET</span><span style="color:#000000;background-color:#ffffff;"> </span><br> case ETHERTYPE_IP: <br> rss_soft_m2cpuid_v4(m, 0, &bucket); <br> break; <br> <span style="color:#18b218;background-color:#ffffff;">+#endif</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="color:#18b218;background-color:#ffffff;">+#ifdef INET6</span><span style="color:#000000;background-color:#ffffff;"> </span><br> case ETHERTYPE_IPV6: <br> rss_soft_m2cpuid_v6(m, 0, &bucket); <br> break; <br> <span style="color:#18b218;background-color:#ffffff;">+#endif</span><span style="color:#000000;background-color:#ffffff;"> </span><br> default: <br> bucket = 0; <br> break;<br> <br> </span></p> <p><span style="font-family:monospace"><br> </span></p> <p><br> </p> <p><br> </p> <div class="moz-cite-prefix">On 3/2/22 20:12, Santiago Martinez wrote:<br> </div> <blockquote type="cite" cite="mid:19c46030-0618-721a-7947-54142f50a943@codenetworks.net">Hi Kristof, sorry for my late reply. Im testing without INET. <br> <br> I will keep you updated. <br> <br> Santi <br> <br> <br> On 2/28/22 21:20, Kristof Provost wrote: <br> <blockquote type="cite">On 28 Feb 2022, at 21:16, Santiago Martinez wrote: <br> <blockquote type="cite">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. <br> Santi <br> <br> <br> </blockquote> Can you copy me on your updated patch? I’ll commit that. <br> <br> Thanks for finding and reporting this. <br> <br> Kristof <br> <br> </blockquote> <br> </blockquote> </body> </html> --------------5i5ATyj0AEI50LkzKHF54NK3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7f1b3db6-07e0-8919-072f-cc764194814c>