Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2020 07:38:34 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359914 - head/sys/net
Message-ID:  <202004140738.03E7cYUm055259@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Tue Apr 14 07:38:34 2020
New Revision: 359914
URL: https://svnweb.freebsd.org/changeset/base/359914

Log:
  Postpone multipath seed init till SI_SUB_LAST, as it is needed only after
   some useland program installs multiple paths to the same destination.
  
  While here, make multipath init conditional.
  
  Discussed with:	cem,ian

Modified:
  head/sys/net/radix_mpath.c

Modified: head/sys/net/radix_mpath.c
==============================================================================
--- head/sys/net/radix_mpath.c	Tue Apr 14 01:07:58 2020	(r359913)
+++ head/sys/net/radix_mpath.c	Tue Apr 14 07:38:34 2020	(r359914)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
+#include "opt_mpath.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -298,11 +299,13 @@ rt_mpath_init_rnh(struct rib_head *rnh)
 	rnh->rnh_multipath = 1;
 }
 
+#ifdef RADIX_MPATH
 static void
 mpath_init(void)
 {
 
 	hashjitter = arc4random();
 }
-SYSINIT(mpath_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, mpath_init, NULL);
+SYSINIT(mpath_init, SI_SUB_LAST, SI_ORDER_ANY, mpath_init, NULL);
+#endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004140738.03E7cYUm055259>