From nobody Mon Feb 28 07:12:58 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 BC15A19D9480 for ; Mon, 28 Feb 2022 07:13:16 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K6Wn75GrVz4ZL3 for ; Mon, 28 Feb 2022 07:13:15 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: by mail-pf1-x433.google.com with SMTP id u16so10261531pfg.12 for ; Sun, 27 Feb 2022 23:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=t8nCbOpKZdmfJa/1twDnTBPoxEoLO1qTt1mIvpfcPzg=; b=pQfbLp0x6BQoYWb/0PJvr5uA3XsTLZkM++vcqOlAznqRKbYqVN+PutADa+ZGS9b83B YtKfFb1mzSSe7kjBgcPTqh8J4tJYZM2BvK2ljIhwBRdEyrZSAu2LbC6F4oZ+9as8o10v lZS3fm2bFvxBqgGrNyL4AepT2nRa0iZ5wk59gT1d/ydiagKfKd844221XT9CtUXwthaE 6QrXUTil+g6MLI5mTezQcwWxLx37atdUUOnxqGLb4ucxCRLgWiWwdhcqfN6PvKhE1XEM TJ/rke49Nd4mrAgCaz00ZSfE5rGJW0Nos0d1DhYgeFlh6wpuWDq6invn3a8CyxRALUaF SU1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=t8nCbOpKZdmfJa/1twDnTBPoxEoLO1qTt1mIvpfcPzg=; b=nvBAv4E5sVSdIZYgN1rkaAerHnZKWUGqGCGtQ8iKHQtYPhMo3lmgcWwuZN3tdAh6ZW cJX0E0UELauXGcvWQU9fMX6l1CAi6mCWydW/oopbKhwZB/crYqLjh12kAx60wUroi1Fs MDGl8zNtCKtWYWnLyI5tv7Jy6cJXf3pSv9vpCvR57UcgmEke8O/TLF3ypa0clDZ3B9Ua d1Cz51j5TjrErmjKTk5S8zlVL76oJTeW2g1i7EdKSuKAyU3SanxcLJBxDikI819UZQW3 y+1T9m7Z5KNh39NNiK20Cp4QWMJp0fBfDJj/6k0WegH2O8ZprHYqWfi+ctyVC3qV/Yd3 xVcQ== X-Gm-Message-State: AOAM531capH4Cymc16f1QwzwHk9DwiqtOFW/nEs+HU9Pd5NEAHa0JA+Z MFIJBnTEJsNsSN1mjpXjMY5jLaUkyizpWw== X-Google-Smtp-Source: ABdhPJz80h+0KYgNUwzNnKuGx6bbXChH7anua+2SfMdd/4xVO6ocG+Psk+/e8iDMrRGP9yY6UOBe5Q== X-Received: by 2002:a63:544c:0:b0:378:907d:1e37 with SMTP id e12-20020a63544c000000b00378907d1e37mr3852455pgm.394.1646032389338; Sun, 27 Feb 2022 23:13:09 -0800 (PST) Received: from [172.17.252.129] (ns1.oxydns.net. [45.32.91.63]) by smtp.gmail.com with ESMTPSA id c28-20020a056a00009c00b004f3e3fea979sm8148937pfj.149.2022.02.27.23.13.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Feb 2022 23:13:09 -0800 (PST) From: Zhenlei Huang Message-Id: <0687A548-41D3-4D84-A83B-B2C0A87056BC@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_E10F9D72-229B-44C7-AA58-A280AEC6E5C0" 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 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Current with RSS and EPAIR and without INET6. Date: Mon, 28 Feb 2022 15:12:58 +0800 In-Reply-To: <5a7afbfc-586e-710d-f3af-c3ab92f1ae4e@codenetworks.net> Cc: freebsd-net@freebsd.org To: Santiago Martinez References: <5a7afbfc-586e-710d-f3af-c3ab92f1ae4e@codenetworks.net> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4K6Wn75GrVz4ZL3 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=pQfbLp0x; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of zleihuang@gmail.com designates 2607:f8b0:4864:20::433 as permitted sender) smtp.mailfrom=zleihuang@gmail.com X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::433:from]; MLMMJ_DEST(0.00)[freebsd-net]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --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 = 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 =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. #ifdef RSS #include #include =20 +#ifdef INET6=20 #include =20 +#endif=20 #endif=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 --Apple-Mail=_E10F9D72-229B-44C7-AA58-A280AEC6E5C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Feb 27, 2022, at 8:59 PM, Santiago Martinez <sm@codenetworks.net>= 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 = 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)
=             &n= bsp;  case ETHERTYPE_IP:
=             &n= bsp;          rss_soft_m= 2cpuid_v4(m, 0, &bucket);
=             &n= bsp;          break;
+#ifdef INET6
=             &n= bsp;  case ETHERTYPE_IPV6:
=             &n= bsp;          rss_soft_m= 2cpuid_v6(m, 0, &bucket);
=             &n= bsp;          break;
+#endif
=             &n= bsp;  default:
=             &n= bsp;          bucket =3D= 0;
=             &n= bsp;          break;






= --Apple-Mail=_E10F9D72-229B-44C7-AA58-A280AEC6E5C0--