From 04c52c244ea83b18ff8cb921ff5ea3105f81cf6f Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 3 Nov 2009 21:41:43 +0000 Subject: Align each RX descriptor to a 4KB boundary; fixes poor RX performance (chip would stop RX operation if it had to cross a 4KB boundary during receive). --- sys/arch/sgi/dev/if_iec.c | 8 ++++---- sys/arch/sgi/dev/if_iecreg.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/arch/sgi') diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c index 9fad9e35e36..3cc4c4b0015 100644 --- a/sys/arch/sgi/dev/if_iec.c +++ b/sys/arch/sgi/dev/if_iec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iec.c,v 1.4 2009/11/03 18:48:38 miod Exp $ */ +/* $OpenBSD: if_iec.c,v 1.5 2009/11/03 21:41:42 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -194,9 +194,9 @@ struct iec_control_data { * 16KB boundaries (note layout of struct iec_control_data makes sure * the rx desc array starts 16KB after the tx desc array). * - each txdesc should be 128 byte aligned (this is also enforced by - * struct iec_control_data layout) - * - each rxdesc should be 128 byte aligned (this is enforced by - * struct iec_rxdesc layout). + * struct iec_control_data layout). + * - each rxdesc should be aligned on a 4KB boundary (this is enforced by + * struct iec_control_data and struct icd_rxdesc layouts). */ #define IEC_DMA_BOUNDARY 0x4000 diff --git a/sys/arch/sgi/dev/if_iecreg.h b/sys/arch/sgi/dev/if_iecreg.h index 4e4b8efbce2..c9d2326eb0d 100644 --- a/sys/arch/sgi/dev/if_iecreg.h +++ b/sys/arch/sgi/dev/if_iecreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iecreg.h,v 1.2 2009/11/03 18:46:00 miod Exp $ */ +/* $OpenBSD: if_iecreg.h,v 1.3 2009/11/03 21:41:42 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -26,7 +26,7 @@ #define IEC_NRXDESC_MAX 512 -#define IEC_RXDESCSIZE (13 * 128) /* should be 128byte aligned. */ +#define IEC_RXDESCSIZE (4096) #define IEC_RXD_BUFOFFSET (64 + 2) /* to align Ethernet header */ #define IEC_RXD_NRXPAD (IEC_RXD_BUFOFFSET - 2 * sizeof(uint32_t)) #define IEC_RXD_BUFSIZE (IEC_RXDESCSIZE - IEC_RXD_BUFOFFSET) -- cgit v1.2.3