From 6d237a5828f309ed3fb33b14411ac8770bb95367 Mon Sep 17 00:00:00 2001 From: erj Date: Thu, 1 Sep 2016 01:08:18 +0000 Subject: [PATCH] Fix linker warnings (errors on gcc) that resulted from r304510. The variables that are extern in the netmap header file should be defined in ixl_txrx.c (the file that is included in both ixl(4)/ixlv(4), not in the main driver source files. Reported by: ed@, dim@, ngie@ --- sys/dev/ixl/if_ixlv.c | 5 ----- sys/dev/ixl/ixl_txrx.c | 1 + sys/dev/netmap/if_ixl_netmap.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/dev/ixl/if_ixlv.c b/sys/dev/ixl/if_ixlv.c index c230338bbbec..c447c34689ee 100644 --- a/sys/dev/ixl/if_ixlv.c +++ b/sys/dev/ixl/if_ixlv.c @@ -217,11 +217,6 @@ TUNABLE_INT("hw.ixlv.tx_itr", &ixlv_tx_itr); SYSCTL_INT(_hw_ixlv, OID_AUTO, tx_itr, CTLFLAG_RDTUN, &ixlv_tx_itr, 0, "TX Interrupt Rate"); -/* Fix when building as a standalone module when netmap is enabled */ -#if defined(DEV_NETMAP) && !defined(NETMAP_IXL_MAIN) -int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip; -#endif - /********************************************************************* * Device identification routine * diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c index 5cf54fa9410a..9a7fae3b055f 100644 --- a/sys/dev/ixl/ixl_txrx.c +++ b/sys/dev/ixl/ixl_txrx.c @@ -69,6 +69,7 @@ static inline u32 ixl_get_tx_head(struct ixl_queue *que); #ifdef DEV_NETMAP #include +int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1; #endif /* DEV_NETMAP */ /* diff --git a/sys/dev/netmap/if_ixl_netmap.h b/sys/dev/netmap/if_ixl_netmap.h index f7e7baaf6bc2..2c7f9be541b3 100644 --- a/sys/dev/netmap/if_ixl_netmap.h +++ b/sys/dev/netmap/if_ixl_netmap.h @@ -71,7 +71,6 @@ SYSCTL_DECL(_dev_netmap); /* * The xl driver by default strips CRCs and we do not override it. */ -int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1; #if 0 SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_crcstrip, CTLFLAG_RW, &ixl_crcstrip, 1, "strip CRC on rx frames");