From nobody Thu Mar 03 18: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 1995F19EEDE9 for ; Thu, 3 Mar 2022 18:06:39 +0000 (UTC) (envelope-from SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net) Received: from bosmailout03.eigbox.net (bosmailout03.eigbox.net [66.96.189.3]) (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 4K8f7f2hmnz4kRB for ; Thu, 3 Mar 2022 18:06:38 +0000 (UTC) (envelope-from SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net) Received: from bosmailscan07.eigbox.net ([10.20.15.7]) by bosmailout03.eigbox.net with esmtp (Exim) id 1nPpqX-0000hp-SZ for freebsd-net@freebsd.org; Thu, 03 Mar 2022 13:06:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codenetworks.net; s=dkim; h=Sender:Subject:From:To: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gs6ZieoADyrnYobdLikrsgneW3H6vYQ8LaFgCBWRaCk=; b=aIFDQHaIyKloeOY5/Kn7NBpmuf o4qKfelp09i6LA01MMTZcs6Vbj6TTOXeOO/W8pwQFPB/Ow57NyKrC8Gxya9SvaMenh7P36ji0hXcf 5RehZvbykrEOqhugWVRmEpUzWZyeF1km99PvVrnY8FrpgMT5zjKxrCqRoUOaNAGxuOYsOPlc9Cn6a xYlN0tcbEguXZFiixMbsauTw78yU8OZVlM+O68aycFCJRSxCUhFwm7lcE3m4bgbYTFlv/zKrs8Vj1 pfmCbbXl6E7oO/O805BlZjdyHtIBadCEiSeN/MO48JPuwjVqPyv5GAJDE5ihfObQr2kUHLhEUnZZ5 IIf0J1eg==; Received: from [10.115.3.32] (helo=bosimpout12) by bosmailscan07.eigbox.net with esmtp (Exim) id 1nPpqX-0000js-5D for freebsd-net@freebsd.org; Thu, 03 Mar 2022 13:06:37 -0500 Received: from bosauthsmtp10.yourhostingaccount.com ([10.20.18.10]) by bosimpout12 with id 1u6a270040D2CUy01u6dgz; Thu, 03 Mar 2022 13:06:37 -0500 X-Authority-Analysis: v=2.3 cv=d4VuNSrE 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=6gpzOEBoA0JRRg2qh7UA:9 a=QEXdDO2ut3YA:10 a=NIuqi1V-cdCkLdMphFcA:9 a=ONBjnHum5WZ79v1z:21 a=_W_S_7VecoQA:10 Received: from cm-81-9-194-73.telecable.es ([81.9.194.73]:26920 helo=[192.168.1.100]) by bosauthsmtp10.eigbox.net with esmtpa (Exim) id 1nPpqT-0006l8-Pc for freebsd-net@freebsd.org; Thu, 03 Mar 2022 13:06:33 -0500 Content-Type: multipart/alternative; boundary="------------DykW8ECoV69Vit04Q9wK0uDv" Message-ID: <87d079ec-13da-6c8f-a801-5e68ca696466@codenetworks.net> Date: Thu, 3 Mar 2022 19: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 Content-Language: en-US To: "freebsd-net@freebsd.org" From: Santiago Martinez Subject: FBSD-13 - Vale maximum virtual switches. 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: 4K8f7f2hmnz4kRB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=codenetworks.net header.s=dkim header.b=aIFDQHaI; dmarc=none; spf=pass (mx1.freebsd.org: domain of "SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net" designates 66.96.189.3 as permitted sender) smtp.mailfrom="SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net" X-Spamd-Result: default: False [-2.96 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.96.128.0/18:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[codenetworks.net: no valid DMARC record]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[codenetworks.net:~]; NEURAL_HAM_SHORT(-0.97)[-0.965]; RCVD_IN_DNSWL_NONE(0.00)[66.96.189.3:from]; TO_DN_EQ_ADDR_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net]; FORGED_SENDER(0.30)[sm@codenetworks.net,SRS0=WrSORx=TO=codenetworks.net=sm@eigbox.net]; R_DKIM_PERMFAIL(0.00)[codenetworks.net:s=dkim]; 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. --------------DykW8ECoV69Vit04Q9wK0uDv Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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) --------------DykW8ECoV69Vit04Q9wK0uDv Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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)



--------------DykW8ECoV69Vit04Q9wK0uDv--