Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2019 22:43:09 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350547 - head/sys/netinet
Message-ID:  <201908022243.x72Mh9ZS094904@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Fri Aug  2 22:43:09 2019
New Revision: 350547
URL: https://svnweb.freebsd.org/changeset/base/350547

Log:
  Fix !INET build.

Modified:
  head/sys/netinet/in_pcb.c
  head/sys/netinet/tcp_ratelimit.c

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c	Fri Aug  2 22:36:42 2019	(r350546)
+++ head/sys/netinet/in_pcb.c	Fri Aug  2 22:43:09 2019	(r350547)
@@ -3296,11 +3296,13 @@ in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet *
 	} else {
 		error = ifp->if_snd_tag_alloc(ifp, &params, &inp->inp_snd_tag);
 
+#ifdef INET
 		if (error == 0) {
 			counter_u64_add(rate_limit_set_ok, 1);
 			counter_u64_add(rate_limit_active, 1);
 		} else
 			counter_u64_add(rate_limit_alloc_fail, 1);
+#endif
 	}
 	return (error);
 }
@@ -3320,7 +3322,9 @@ in_pcbdetach_tag(struct ifnet *ifp, struct m_snd_tag *
 
 	/* release reference count on network interface */
 	if_rele(ifp);
+#ifdef INET
 	counter_u64_add(rate_limit_active, -1);
+#endif
 }
 
 /*
@@ -3479,6 +3483,7 @@ in_pcboutput_eagain(struct inpcb *inp)
 		INP_DOWNGRADE(inp);
 }
 
+#ifdef INET
 static void
 rl_init(void *st)
 {
@@ -3488,4 +3493,5 @@ rl_init(void *st)
 }
 
 SYSINIT(rl, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, rl_init, NULL);
+#endif
 #endif /* RATELIMIT */

Modified: head/sys/netinet/tcp_ratelimit.c
==============================================================================
--- head/sys/netinet/tcp_ratelimit.c	Fri Aug  2 22:36:42 2019	(r350546)
+++ head/sys/netinet/tcp_ratelimit.c	Fri Aug  2 22:43:09 2019	(r350547)
@@ -270,9 +270,11 @@ rs_destroy(epoch_context_t ctx)
 
 }
 
+#ifdef INET
 extern counter_u64_t rate_limit_set_ok;
 extern counter_u64_t rate_limit_active;
 extern counter_u64_t rate_limit_alloc_fail;
+#endif
 
 static int
 rl_attach_txrtlmt(struct ifnet *ifp,
@@ -294,12 +296,14 @@ rl_attach_txrtlmt(struct ifnet *ifp,
 		error = EOPNOTSUPP;
 	} else {
 		error = ifp->if_snd_tag_alloc(ifp, &params, tag);
+#ifdef INET
 		if (error == 0) {
 			if_ref((*tag)->ifp);
 			counter_u64_add(rate_limit_set_ok, 1);
 			counter_u64_add(rate_limit_active, 1);
 		} else
 			counter_u64_add(rate_limit_alloc_fail, 1);
+#endif
 	}
 	return (error);
 }



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