svn commit: r350547 - head/sys/netinet
Xin LI
delphij at FreeBSD.org
Fri Aug 2 22:43:10 UTC 2019
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, ¶ms, &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, ¶ms, 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);
}
More information about the svn-src-head
mailing list