Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2017 02:49:28 +0000 (UTC)
From:      Stephen Hurd <shurd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325201 - head/sys/net
Message-ID:  <201710310249.v9V2nSHW014271@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <andrew@fubar.geek.nz>
  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)



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