From 6ea63c4f39dc678592d4b8a85bdd44d0d1cf2154 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 2 Feb 2016 21:27:46 +0100 Subject: [PATCH] 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 --- inmates/demos/x86/e1000-demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2