From nobody Thu Mar 03 22:06: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 EE33C1A00610 for ; Thu, 3 Mar 2022 22:06:44 +0000 (UTC) (envelope-from SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net) Received: from bosmailout01.eigbox.net (bosmailout01.eigbox.net [66.96.188.1]) (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 4K8lSh2JP4z3rBc for ; Thu, 3 Mar 2022 22:06:44 +0000 (UTC) (envelope-from SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net) Received: from bosmailscan01.eigbox.net ([10.20.15.1]) by bosmailout01.eigbox.net with esmtp (Exim) id 1nPtan-0003FN-Ti for freebsd-net@freebsd.org; Thu, 03 Mar 2022 17:06:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codenetworks.net; s=dkim; h=Sender:In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Content-Type:Reply-To:Cc: Content-Transfer-Encoding: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=SP9hqOJsJQJcJQBiqlS+/7d9OibQZXbIE15EqriIRiM=; b=eGrzezhhBATUYBaP4ZlTU5AU+ Ssg3w4N1HsNhxpS7tTuU1tpyFnKhpkN4t/kF4/9mcre0ZNdsTsVq0sUzjcxD46dSv0zT7RazDXZIt h+Vz0+uExH6/aSftAwYtGPA/BNqKUk3NG/KH3jsW0QI9BGfTznpJ+mM/5KzuU5K4fAGxYmU0DcC/n SYUXVAVUeoWx508gnz7o9E8p6LA+q5eI7d8aIjz8FGjtBbuzt7u0CSRJdm1B5WrxuIoIRI2E/l5Du 6OeqbjjN3yuqVDd6Xbc3ivFdPPwztaFpODS6WW9wHKLewUed4lgF2wjackaLUaek6clz3loqdHZKO GlpajaHDQ==; Received: from [10.115.3.33] (helo=bosimpout13) by bosmailscan01.eigbox.net with esmtp (Exim) id 1nPtan-0005M5-G9 for freebsd-net@freebsd.org; Thu, 03 Mar 2022 17:06:37 -0500 Received: from bosauthsmtp10.yourhostingaccount.com ([10.20.18.10]) by bosimpout13 with id 1y6a2700D0D2CUy01y6dWJ; Thu, 03 Mar 2022 17:06:37 -0500 X-Authority-Analysis: v=2.3 cv=RNUo47q+ c=1 sm=1 tr=0 a=Kpo39fPXdbgqDwiI3/AEUA==:117 a=Ek/qOh1uPkKSHvd30yk7rg==:17 a=o8Y5sQTvuykA:10 a=-Yl_685HdVUA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=jlvWEfeLAAAA:8 a=PrUarnob6DQjcvPLUkAA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=_tA4Z11dc4MUj4BgrzMA:9 a=s2J1PaNANKe_Wt-b:21 a=_W_S_7VecoQA:10 a=BUduvz6nQKmfCEOu4uBS:22 Received: from cm-81-9-194-73.telecable.es ([81.9.194.73]:26232 helo=[192.168.1.100]) by bosauthsmtp10.eigbox.net with esmtpa (Exim) id 1nPtaj-0004N2-Vc for freebsd-net@freebsd.org; Thu, 03 Mar 2022 17:06:34 -0500 Content-Type: multipart/alternative; boundary="------------BrLRNKiHggf4ITXp9HiWOFzI" Message-ID: <8d097ca7-7f7d-7317-8d6f-1fbeaa832831@codenetworks.net> Date: Thu, 3 Mar 2022 23:06:32 +0100 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: FBSD-13 - Vale maximum virtual switches. Content-Language: en-US To: freebsd-net@freebsd.org References: <87d079ec-13da-6c8f-a801-5e68ca696466@codenetworks.net> From: Santiago Martinez In-Reply-To: X-EN-UserInfo: d3bdfab0736480cedf04ed92aaea2ef5:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: sm@codenetworks.net X-EN-OrigIP: 81.9.194.73 X-EN-OrigHost: cm-81-9-194-73.telecable.es X-Rspamd-Queue-Id: 4K8lSh2JP4z3rBc X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=codenetworks.net header.s=dkim header.b=eGrzezhh; dmarc=none; spf=pass (mx1.freebsd.org: domain of "SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net" designates 66.96.188.1 as permitted sender) smtp.mailfrom="SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net" X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.96.128.0/18]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[codenetworks.net: no valid DMARC record]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_TRACE(0.00)[codenetworks.net:~]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[66.96.188.1:from]; R_DKIM_PERMFAIL(0.00)[codenetworks.net:s=dkim]; MLMMJ_DEST(0.00)[freebsd-net]; FORGED_SENDER(0.30)[sm@codenetworks.net,SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net]; RECEIVED_SPAMHAUS_PBL(0.00)[81.9.194.73: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=WrSORx=TO=codenetworks.net=sm@eigbox.net]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------BrLRNKiHggf4ITXp9HiWOFzI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thanks a lot Vincenzo. Santi On 3/3/22 23:03, Vincenzo Maffione wrote: > Hi, >   Yes, the maximum number of VALE bridges should definitely become a > sysctl. > I'll try to implement the change asap. > > Cheers, >   Vincenzo > > Il giorno gio 3 mar 2022 alle ore 19:07 Santiago Martinez > ha scritto: > > Hi Everyone, > > The other day had to simulate a network topology and I wanted to > use vale switches instead of in-kernel bridges. > > After creating a few switches I notice that there was a hard limit > of 8 switches ( that is clearly stated on the man page). > > For my simulation I needed 32 virtual switches, hence I increase > the value of NM_BRIDGES from 8 to 64. > > After that I was able to create the bridges and they seem to work > fine. > > My question is, do we need that hard limit on 8? Should this be > change to a dynamic value set with sysctl? > > Best regards. > Santi > > diff --git a/sys/dev/netmap/netmap_bdg.h b/sys/dev/netmap/netmap_bdg.h > > index e4683885e66c..3afe1d9d5d99 100644 > --- a/sys/dev/netmap/netmap_bdg.h > +++ b/sys/dev/netmap/netmap_bdg.h > @@ -73,8 +73,8 @@struct netmap_bdg_ops { > int netmap_bwrap_attach(const char *name, struct netmap_adapter *, > struct netmap_bdg_ops *); > int netmap_bdg_regops(const char *name, struct netmap_bdg_ops > *bdg_ops, void *private_data, void *auth_token); > > -#define        NM_BRIDGES              8       /* number of > bridges */ > -#define        NM_BDG_MAXPORTS         254     /* up to 254 */ > +#define        NM_BRIDGES              64      /* number of > bridges */ > +#define        NM_BDG_MAXPORTS         16      /* up to 254 */ > #define        NM_BDG_BROADCAST        NM_BDG_MAXPORTS > #define        NM_BDG_NOPORT           (NM_BDG_MAXPORTS+1) > > > --------------BrLRNKiHggf4ITXp9HiWOFzI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Thanks a lot Vincenzo.

Santi


On 3/3/22 23:03, Vincenzo Maffione wrote:
Hi,
  Yes, the maximum number of VALE bridges should definitely become a sysctl.
I'll try to implement the change asap.

Cheers,
  Vincenzo

Il giorno gio 3 mar 2022 alle ore 19:07 Santiago Martinez <sm@codenetworks.net> ha scritto:

Hi Everyone,

The other day had to simulate a network topology and I wanted to use vale switches instead of in-kernel bridges.

After creating a few switches I notice that there was a hard limit of 8 switches ( that is clearly stated on the man page).

For my simulation I needed 32 virtual switches, hence I increase the value of NM_BRIDGES from 8 to 64.

After that I was able to create the bridges and they seem to work fine.

My question is, do we need that hard limit on 8? Should this be change to a dynamic value set with sysctl?

Best regards.
Santi

diff --git a/sys/dev/netmap/netmap_bdg.h b/sys/dev/netmap/netmap_bdg.h

index e4683885e66c..3afe1d9d5d99 100644
--- a/sys/dev/netmap/netmap_bdg.h
+++ b/sys/dev/netmap/netmap_bdg.h
@@ -73,8 +73,8 @@ struct netmap_bdg_ops {
int netmap_bwrap_attach(const char *name, struct netmap_adapter *, struct netmap_bdg_ops *);
int netmap_bdg_regops(const char *name, struct netmap_bdg_ops *bdg_ops, void *private_data, void *auth_token);
 
-#define        NM_BRIDGES              8       /* number of bridges */
-#define        NM_BDG_MAXPORTS         254     /* up to 254 */
+#define        NM_BRIDGES              64      /* number of bridges */
+#define        NM_BDG_MAXPORTS         16      /* up to 254 */
#define        NM_BDG_BROADCAST        NM_BDG_MAXPORTS
#define        NM_BDG_NOPORT           (NM_BDG_MAXPORTS+1)



--------------BrLRNKiHggf4ITXp9HiWOFzI--