Multicast routing on FreeBSD 11 current

Marko Zec zec at fer.hr
Sun Jan 24 16:48:01 UTC 2016


On Sun, 24 Jan 2016 13:17:45 +0300
"Andrey V. Elsukov" <bu7cher at yandex.ru> wrote:

> On 24.01.16 01:14, Ben Woods wrote:
> > % sudo kldload -v ip_mroute
> > kldload: an error occurred while loading the module. Please check
> > dmesg(8) for more details.
> > % dmesg
> > linker_load_file: Unsupported file type
> > 
> > Any ideas what could be causing this error?  
> 
> Usually this means that your running kernel is out of sync with
> modules. You are running r294463, but __FreeBSD_version was bumped
> recently in r294505. You need rebuild and reinstall your kernel and
> all modules.

In this particular case the problem is that ip_mroute demands more
space for "virtualized global" variables than what kernel linker has
put aside for each vnet.

Bumping VNET_MODMIN to 24 should circumvent the issue that Ben is
observing.  A more vnet-friendly fix would require refactoring
ip_mroute's arrays so that they get malloc()ed / free()d from SYSINIT
handlers instead of being declared "virtualized global".

Marko

===================================================================
--- vnet.c      (revision 294659)
+++ vnet.c      (working copy)
@@ -170,7 +170,7 @@
  * we want the virtualized global variable space to be page-sized, we
may
  * have more space than that in practice.
  */
-#define        VNET_MODMIN     8192
+#define        VNET_MODMIN     3 * 8192
 #define        VNET_SIZE       roundup2(VNET_BYTES, PAGE_SIZE)
 #define        VNET_MODSIZE    (VNET_SIZE - (VNET_BYTES - VNET_MODMIN))
 


More information about the freebsd-net mailing list