Date: Thu, 3 Mar 2022 19:06:32 +0100 From: Santiago Martinez <sm@codenetworks.net> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: FBSD-13 - Vale maximum virtual switches. Message-ID: <87d079ec-13da-6c8f-a801-5e68ca696466@codenetworks.net>
next in thread | raw e-mail | index | archive | help
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 <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <span style="font-weight:bold;color:#000000;background-color:#ffffff;"></span> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Hi Everyone, <br> </span></span></p> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">The other day had to simulate a network topology and I wanted to use vale switches instead of in-kernel bridges.</span></span></p> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">After creating a few switches I notice that there was a hard limit of 8 switches ( that is clearly stated on the man page).</span></span></p> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">For my simulation I needed 32 virtual switches, hence I increase the value of NM_BRIDGES from 8 to 64.</span></span></p> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">After that I was able to create the bridges and they seem to work fine.<br> </span></span></p> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">My question is, do we need that hard limit on 8? Should this be change to a dynamic value set with sysctl?</span></span></p> <p><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"> Best regards.<br> Santi</span></span></p> <p><span style="font-family:monospace"><span style="font-weight:bold;color:#000000;background-color:#ffffff;">diff --git a/sys/dev/netmap/netmap_bdg.h b/sys/dev/netmap/netmap_bdg.h</span><span style="color:#000000;background-color:#ffffff;"> </span></span></p> <span style="font-family:monospace"></span> <p><span style="font-family:monospace"><span style="font-weight:bold;color:#000000;background-color:#ffffff;">index e4683885e66c..3afe1d9d5d99 100644</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="font-weight:bold;color:#000000;background-color:#ffffff;">--- a/sys/dev/netmap/netmap_bdg.h</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="font-weight:bold;color:#000000;background-color:#ffffff;">+++ b/sys/dev/netmap/netmap_bdg.h</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="color:#18b2b2;background-color:#ffffff;">@@ -73,8 +73,8 @@</span><span style="color:#000000;background-color:#ffffff;"> struct netmap_bdg_ops { </span><br> int netmap_bwrap_attach(const char *name, struct netmap_adapter *, struct netmap_bdg_ops *); <br> int netmap_bdg_regops(const char *name, struct netmap_bdg_ops *bdg_ops, void *private_data, void *auth_token); <br> <br> <span style="color:#b21818;background-color:#ffffff;">-#define NM_BRIDGES 8 /* number of bridges */</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="color:#b21818;background-color:#ffffff;">-#define NM_BDG_MAXPORTS 254 /* up to 254 */</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="color:#18b218;background-color:#ffffff;">+#define NM_BRIDGES 64 /* number of bridges */</span><span style="color:#000000;background-color:#ffffff;"> </span><br> <span style="color:#18b218;background-color:#ffffff;">+#define NM_BDG_MAXPORTS 16 /* up to 254 */</span><span style="color:#000000;background-color:#ffffff;"> </span><br> #define NM_BDG_BROADCAST NM_BDG_MAXPORTS <br> #define NM_BDG_NOPORT (NM_BDG_MAXPORTS+1)<br> <br> <br> </span></p> <p><br> </p> </body> </html> --------------DykW8ECoV69Vit04Q9wK0uDv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87d079ec-13da-6c8f-a801-5e68ca696466>