From owner-svn-src-all@freebsd.org Sat May 19 05:27:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22DADEEF875; Sat, 19 May 2018 05:27:51 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C779B7FBEA; Sat, 19 May 2018 05:27:50 +0000 (UTC) (envelope-from mmacy@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 A8AE822B9E; Sat, 19 May 2018 05:27:50 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4J5Roqv063391; Sat, 19 May 2018 05:27:50 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4J5RncB063385; Sat, 19 May 2018 05:27:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805190527.w4J5RncB063385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 19 May 2018 05:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333864 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 333864 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.26 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: Sat, 19 May 2018 05:27:51 -0000 Author: mmacy Date: Sat May 19 05:27:49 2018 New Revision: 333864 URL: https://svnweb.freebsd.org/changeset/base/333864 Log: net: fix set but not used Modified: head/sys/net/if_clone.c head/sys/net/if_epair.c head/sys/net/if_lagg.c head/sys/net/if_stf.c head/sys/net/if_vxlan.c head/sys/net/iflib.c Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_clone.c Sat May 19 05:27:49 2018 (r333864) @@ -416,7 +416,7 @@ if_clone_simple(const char *name, ifcs_create_t create for (unit = 0; unit < minifs; unit++) { char name[IFNAMSIZ]; - int error; + int error __unused; snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit); error = if_clone_createif(ifc, name, IFNAMSIZ, NULL); Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_epair.c Sat May 19 05:27:49 2018 (r333864) @@ -251,7 +251,7 @@ static void epair_nh_sintr(struct mbuf *m) { struct ifnet *ifp; - struct epair_softc *sc; + struct epair_softc *sc __unused; ifp = m->m_pkthdr.rcvif; (*ifp->if_input)(ifp, m); @@ -296,7 +296,7 @@ epair_nh_drainedcpu(u_int cpuid) IFQ_LOCK(&ifp->if_snd); if (IFQ_IS_EMPTY(&ifp->if_snd)) { - struct epair_softc *sc; + struct epair_softc *sc __unused; STAILQ_REMOVE(&epair_dpcpu->epair_ifp_drain_list, elm, epair_ifp_drain, ifp_next); @@ -337,7 +337,7 @@ epair_remove_ifp_from_draining(struct ifnet *ifp) STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next, tvar) { if (ifp == elm->ifp) { - struct epair_softc *sc; + struct epair_softc *sc __unused; STAILQ_REMOVE( &epair_dpcpu->epair_ifp_drain_list, elm, Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_lagg.c Sat May 19 05:27:49 2018 (r333864) @@ -1641,10 +1641,7 @@ static int lagg_transmit(struct ifnet *ifp, struct mbuf *m) { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; - int error, len, mcast; - - len = m->m_pkthdr.len; - mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0; + int error; LAGG_RLOCK(); /* We need a Tx algorithm and at least one port */ Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_stf.c Sat May 19 05:27:49 2018 (r333864) @@ -272,7 +272,7 @@ static int stf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) { struct stf_softc *sc = ifp->if_softc; - int err; + int err __unused; err = encap_detach(sc->encap_cookie); KASSERT(err == 0, ("Unexpected error detaching encap_cookie")); Modified: head/sys/net/if_vxlan.c ============================================================================== --- head/sys/net/if_vxlan.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/if_vxlan.c Sat May 19 05:27:49 2018 (r333864) @@ -588,7 +588,7 @@ vxlan_ftable_update_locked(struct vxlan_softc *sc, struct rm_priotracker *tracker) { struct vxlan_ftable_entry *fe; - int error; + int error __unused; VXLAN_LOCK_ASSERT(sc); @@ -863,8 +863,9 @@ static void vxlan_socket_destroy(struct vxlan_socket *vso) { struct socket *so; - struct vxlan_socket_mc_info *mc; +#ifdef INVARIANTS int i; + struct vxlan_socket_mc_info *mc; for (i = 0; i < VXLAN_SO_MC_MAX_GROUPS; i++) { mc = &vso->vxlso_mc[i]; @@ -878,7 +879,7 @@ vxlan_socket_destroy(struct vxlan_socket *vso) ("%s: socket %p vni_hash[%d] not empty", __func__, vso, i)); } - +#endif so = vso->vxlso_sock; if (so != NULL) { vso->vxlso_sock = NULL; @@ -2505,7 +2506,7 @@ vxlan_rcv_udp_packet(struct mbuf *m, int offset, struc struct vxlan_socket *vso; struct vxlan_header *vxh, vxlanhdr; uint32_t vni; - int error; + int error __unused; M_ASSERTPKTHDR(m); vso = xvso; Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat May 19 05:14:05 2018 (r333863) +++ head/sys/net/iflib.c Sat May 19 05:27:49 2018 (r333864) @@ -1270,7 +1270,6 @@ static void iflib_gen_mac(if_ctx_t ctx) { struct thread *td; - struct ifnet *ifp; MD5_CTX mdctx; char uuid[HOSTUUIDLEN+1]; char buf[HOSTUUIDLEN+16]; @@ -1278,7 +1277,6 @@ iflib_gen_mac(if_ctx_t ctx) unsigned char digest[16]; td = curthread; - ifp = ctx->ifc_ifp; mac = ctx->ifc_mac; uuid[HOSTUUIDLEN] = 0; bcopy(td->td_ucred->cr_prison->pr_hostuuid, uuid, HOSTUUIDLEN); @@ -4281,10 +4279,7 @@ iflib_reset_qvalues(if_ctx_t ctx) if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; if_shared_ctx_t sctx = ctx->ifc_sctx; device_t dev = ctx->ifc_dev; - int i, main_txq, main_rxq; - - main_txq = (sctx->isc_flags & IFLIB_HAS_TXCQ) ? 1 : 0; - main_rxq = (sctx->isc_flags & IFLIB_HAS_RXCQ) ? 1 : 0; + int i; scctx->isc_txrx_budget_bytes_max = IFLIB_MAX_TX_BYTES; scctx->isc_tx_qdepth = IFLIB_DEFAULT_TX_QDEPTH;