From nobody Mon Feb 28 20:16:32 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 78EFA19E7B34 for ; Mon, 28 Feb 2022 20:16:48 +0000 (UTC) (envelope-from SRS0=ie/3Yr=TL=codenetworks.net=sm@eigbox.net) Received: from bosmailout02.eigbox.net (bosmailout02.eigbox.net [66.96.184.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K6s9C3S7rz4kyf for ; Mon, 28 Feb 2022 20:16:47 +0000 (UTC) (envelope-from SRS0=ie/3Yr=TL=codenetworks.net=sm@eigbox.net) Received: from bosmailscan01.eigbox.net ([10.20.15.1]) by bosmailout02.eigbox.net with esmtp (Exim) id 1nOmRk-00069M-Oe for freebsd-net@freebsd.org; Mon, 28 Feb 2022 15:16:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codenetworks.net; s=dkim; h=Sender:To:In-Reply-To:Cc:References:Message-Id: Date:Subject:Mime-Version:From:Content-Transfer-Encoding:Content-Type: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OoqRsP2edvXFYeb5DnG+sYMqhmZ6yypv4aUNTGZ7yfQ=; b=J4mOk1SwUXhlfl35Qo39PEa4gX UyBrlyrAKFTVpWJ+xgqPdyXCZFKfxhlaiCK/EFqg6ZnFY+qdvF+AsUjuLzY0q28jv3qy2x3RzGmA6 u8kNOEcysgAvKD1vr8GlJP+F6gHEmZTNm9X6O7XIVLdDP3pEGyE6KLVBtX/Cozm38B9UPJiNualFL RuJIz3sSNEh+M+bfwkFpNKcpWyuWNSz+AZag9mp5LHChLsjy3hphWtSY6uJg8+MTXTpoI0FkJunSi LCW9KNtjZWACluHUwEofQeD3wc+v/xtV31VN6zoJoXNi2t5JVecNXcKNUQ81wTs5hW4poCM8CEoi7 DoWEmvzg==; Received: from [10.115.3.32] (helo=bosimpout12) by bosmailscan01.eigbox.net with esmtp (Exim) id 1nOmRk-0004ax-BP for freebsd-net@freebsd.org; Mon, 28 Feb 2022 15:16:40 -0500 Received: from bosauthsmtp02.yourhostingaccount.com ([10.20.18.2]) by bosimpout12 with id 0kGd2700D02gpmq01kGgul; Mon, 28 Feb 2022 15:16:40 -0500 X-Authority-Analysis: v=2.3 cv=d4VuNSrE c=1 sm=1 tr=0 a=9MP9vxlQrmnoeofDS6o88g==:117 a=u65dWv6gT4JondKis34hyg==:17 a=oGFeUVbbRNcA:10 a=TGXRfop3UWIA:10 a=pGLkceISAAAA:8 a=jlvWEfeLAAAA:8 a=Qj2odpRJQxpj8Ys5qRsA:9 a=QEXdDO2ut3YA:10 a=lqgWWfKehcCkW4ATArUA:9 a=m4WrthLKQ-f_IQFU:21 a=_W_S_7VecoQA:10 a=BUduvz6nQKmfCEOu4uBS:22 Received: from 77.red-176-83-106.dynamicip.rima-tde.net ([176.83.106.77]:35974 helo=smtpclient.apple) by bosauthsmtp02.eigbox.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) id 1nOmRh-00052r-1o; Mon, 28 Feb 2022 15:16:37 -0500 Content-Type: multipart/alternative; boundary=Apple-Mail-C415A5CE-9694-4D8F-B5F6-B74DF3407486 Content-Transfer-Encoding: 7bit From: Santiago Martinez List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: Current with RSS and EPAIR and without INET6. Date: Mon, 28 Feb 2022 21:16:32 +0100 Message-Id: References: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com> Cc: freebsd-net@freebsd.org In-Reply-To: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com> To: Zhenlei Huang X-Mailer: iPhone Mail (19A404) X-EN-UserInfo: d3bdfab0736480cedf04ed92aaea2ef5:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: sm@codenetworks.net X-EN-OrigIP: 176.83.106.77 X-EN-OrigHost: 77.red-176-83-106.dynamicip.rima-tde.net X-Rspamd-Queue-Id: 4K6s9C3S7rz4kyf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=codenetworks.net header.s=dkim header.b=J4mOk1Sw; dmarc=none; spf=pass (mx1.freebsd.org: domain of "SRS0=ie/3Yr=TL=codenetworks.net=sm@eigbox.net" designates 66.96.184.2 as permitted sender) smtp.mailfrom="SRS0=ie/3Yr=TL=codenetworks.net=sm@eigbox.net" X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:66.96.128.0/18]; DKIM_TRACE(0.00)[codenetworks.net:~]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[sm@codenetworks.net,SRS0=ie/3Yr=TL=codenetworks.net=sm@eigbox.net]; RECEIVED_SPAMHAUS_PBL(0.00)[176.83.106.77:received]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:29873, ipnet:66.96.128.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[sm@codenetworks.net,SRS0=ie/3Yr=TL=codenetworks.net=sm@eigbox.net]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[codenetworks.net: no valid DMARC record]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[66.96.184.2:from]; R_DKIM_PERMFAIL(0.00)[codenetworks.net:s=dkim]; MLMMJ_DEST(0.00)[freebsd-net] X-ThisMailContainsUnwantedMimeParts: N --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 wrote: >=20 > =EF=BB=BF >=20 >>> On Feb 27, 2022, at 8:59 PM, Santiago Martinez 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 =20 >>> #include =20 >>> +#endif=20 >>> +#ifdef INET6=20 >>> #include =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 >> #include =20 >> +#ifdef INET6=20 >> #include =20 >> +#endif=20 >> #endif=20 >>=20 >> #include =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
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.
Santi


On 28 Feb 2022, at 08:14, Zhenlei Huang <zlei.huang= @gmail.com> wrote:

=EF=BB=BF

On Feb 27, 2022, at 8:59 PM, Santiago Mart= inez <sm@codenetworks.n= et> wrote:

=20 =20

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 iocag= e 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 ad= ded ifdef should be wrapped around by RSS. 
And also is "opt_= inet6.h" header required?
And maybe ifdef IN= ET is also required as someone need IPv4 only.

#ifd= ef RSS
#include <net/rss_config.h>
#includ= e <netinet/in_rss.h>
 
+#ifdef INET6 
#include &l= t;netinet6/in6_rss.h> +#endif 
#endif =

#include <net/vnet.h>
@= @ -220,9 +222,11 @@ epair_menq(struct mbuf *m, struct epair_softc *osc)
           &n= bsp;   case ETHERTYPE_IP:
           &n= bsp;           rss_so= ft_m2cpuid_v4(m, 0, &bucket);
           &n= bsp;           break;=
+= #ifdef INET6
           &n= bsp;   case ETHERTYPE_IPV6:
           &n= bsp;           rss_so= ft_m2cpuid_v6(m, 0, &bucket);
           &n= bsp;           break;=
+= #endif
           &n= bsp;   default:
           &n= bsp;           bucket= =3D 0;
           &n= bsp;           break;=





= --Apple-Mail-C415A5CE-9694-4D8F-B5F6-B74DF3407486--