svn commit: r320517 - head/sys/dev/xen/netfront

Ryan Libby rlibby at FreeBSD.org
Fri Jun 30 22:14:23 UTC 2017


Author: rlibby
Date: Fri Jun 30 22:14:22 2017
New Revision: 320517
URL: https://svnweb.freebsd.org/changeset/base/320517

Log:
  netfront.c: avoid gcc variably-modified warning
  
  gcc produces a "variably modified X at file scope" warning for
  structures that use these size definitions.  I think the definitions are
  actually fine but can be rephrased with the __CONST_RING_SIZE macro more
  cleanly anyway.
  
  Reviewed by:	markj, royger
  Approved by:	markj (mentor)
  Sponsored by:	Dell EMC Isilon
  Differential revision:	https://reviews.freebsd.org/D11417

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c	Fri Jun 30 22:13:28 2017	(r320516)
+++ head/sys/dev/xen/netfront/netfront.c	Fri Jun 30 22:14:22 2017	(r320517)
@@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$");
 /* Features supported by all backends.  TSO and LRO can be negotiated */
 #define XN_CSUM_FEATURES	(CSUM_TCP | CSUM_UDP)
 
-#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
-#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
+#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE)
+#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE)
 
 #define NET_RX_SLOTS_MIN (XEN_NETIF_NR_SLOTS_MIN + 1)
 


More information about the svn-src-head mailing list