From owner-svn-src-all@freebsd.org Fri Aug 2 22:43:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79F0DBDC5E; Fri, 2 Aug 2019 22:43:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 460hyQ2fWMz4bhs; Fri, 2 Aug 2019 22:43:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C8599926; Fri, 2 Aug 2019 22:43:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x72MhAqj094906; Fri, 2 Aug 2019 22:43:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x72Mh9ZS094904; Fri, 2 Aug 2019 22:43:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201908022243.x72Mh9ZS094904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 2 Aug 2019 22:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350547 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 350547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2019 22:43:10 -0000 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); }