From: Jan Kiszka Date: Tue, 2 Feb 2016 20:27:46 +0000 (+0100) Subject: inmates: e1000-demo: Ensure ring alignment requirements on newer NICs X-Git-Url: http://rtime.felk.cvut.cz/gitweb/jailhouse.git/commitdiff_plain/6ea63c4f39dc678592d4b8a85bdd44d0d1cf2154 inmates: e1000-demo: Ensure ring alignment requirements on newer NICs The Intel 82575 and newer NICs require 128-byte alignment of the RX and TX rings. Signed-off-by: Jan Kiszka --- diff --git a/inmates/demos/x86/e1000-demo.c b/inmates/demos/x86/e1000-demo.c index d7c2a66..7273f36 100644 --- a/inmates/demos/x86/e1000-demo.c +++ b/inmates/demos/x86/e1000-demo.c @@ -136,8 +136,8 @@ static const char *speed_info[] = { "10", "100", "1000", "1000" }; static void *mmiobar; static u8 buffer[RX_DESCRIPTORS * RX_BUFFER_SIZE]; -static struct e1000_rxd rx_ring[RX_DESCRIPTORS]; -static struct e1000_txd tx_ring[TX_DESCRIPTORS]; +static struct e1000_rxd rx_ring[RX_DESCRIPTORS] __attribute__((aligned(128))); +static struct e1000_txd tx_ring[TX_DESCRIPTORS] __attribute__((aligned(128))); static unsigned int rx_idx, tx_idx; static struct eth_header tx_packet; static unsigned int phyadd;