From owner-svn-src-all@freebsd.org Tue Oct 31 02:49:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C00CEE4A4D0; Tue, 31 Oct 2017 02:49:29 +0000 (UTC) (envelope-from shurd@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 mx1.freebsd.org (Postfix) with ESMTPS id 8DA1E82ECE; Tue, 31 Oct 2017 02:49:29 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9V2nSKQ014272; Tue, 31 Oct 2017 02:49:28 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9V2nSHW014271; Tue, 31 Oct 2017 02:49:28 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201710310249.v9V2nSHW014271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 31 Oct 2017 02:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325201 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 325201 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.23 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: Tue, 31 Oct 2017 02:49:29 -0000 Author: shurd Date: Tue Oct 31 02:49:28 2017 New Revision: 325201 URL: https://svnweb.freebsd.org/changeset/base/325201 Log: Fix build with nodevice netmap iru_init() was declared and used outside the DEV_NETMAP conditional blocks, but was implemented inside one. Move the implementation out of the DEV_NETMAP block to allow building with netmap disabled. Reported by: Andrew Turner Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12842 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Oct 31 02:46:36 2017 (r325200) +++ head/sys/net/iflib.c Tue Oct 31 02:49:28 2017 (r325201) @@ -790,20 +790,6 @@ iflib_netmap_register(struct netmap_adapter *na, int o return (status); } -static void -iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid) -{ - iflib_fl_t fl; - - fl = &rxq->ifr_fl[flid]; - iru->iru_paddrs = fl->ifl_bus_addrs; - iru->iru_vaddrs = &fl->ifl_vm_addrs[0]; - iru->iru_idxs = fl->ifl_rxd_idxs; - iru->iru_qsidx = rxq->ifr_id; - iru->iru_buf_size = fl->ifl_buf_size; - iru->iru_flidx = fl->ifl_id; -} - static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, uint32_t nm_i, bool init) { @@ -1235,6 +1221,20 @@ prefetch2cachelines(void *x) #define prefetch(x) #define prefetch2cachelines(x) #endif + +static void +iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid) +{ + iflib_fl_t fl; + + fl = &rxq->ifr_fl[flid]; + iru->iru_paddrs = fl->ifl_bus_addrs; + iru->iru_vaddrs = &fl->ifl_vm_addrs[0]; + iru->iru_idxs = fl->ifl_rxd_idxs; + iru->iru_qsidx = rxq->ifr_id; + iru->iru_buf_size = fl->ifl_buf_size; + iru->iru_flidx = fl->ifl_id; +} static void _iflib_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err)