Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 22:14:22 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320517 - head/sys/dev/xen/netfront
Message-ID:  <201706302214.v5UMEMe0048792@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 



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