Make the SSLOTS, MSLOTS and JSLOTS tunable (redefineable).
Bump the default values for these to the values used by FreeBSD, and also adjust ti_init_rx_ring_jumbo() to use the same constant that FreeBSD uses. Yes, this consumes more kernel memory. The effect of this is that you can use jumbo frames in a back-to-back setup with TCP windows up to about 250KB and get ~930Mbit/s throughput, while we were earlier limited to around 3-400Mbit/s, and trying to push above that mark by widening the TCP window caused ti0: jumbo buffer allocation failed messages to be logged and a corresponding stall in the traffic.
This commit is contained in:
parent
047e7ad434
commit
00e7d35ef0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ti.c,v 1.60 2004/03/18 23:20:32 bouyer Exp $ */
|
||||
/* $NetBSD: if_ti.c,v 1.61 2004/07/27 07:59:51 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
@ -81,7 +81,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.60 2004/03/18 23:20:32 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.61 2004/07/27 07:59:51 he Exp $");
|
||||
|
||||
#include "bpfilter.h"
|
||||
#include "opt_inet.h"
|
||||
@ -983,7 +983,7 @@ static int ti_init_rx_ring_jumbo(sc)
|
||||
int i;
|
||||
struct ti_cmd_desc cmd;
|
||||
|
||||
for (i = 0; i < (TI_JSLOTS - 20); i++) {
|
||||
for (i = 0; i < TI_JUMBO_RX_RING_CNT; i++) {
|
||||
if (ti_newbuf_jumbo(sc, i, NULL) == ENOBUFS)
|
||||
return(ENOBUFS);
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_tireg.h,v 1.13 2004/03/18 23:20:32 bouyer Exp $ */
|
||||
/* $NetBSD: if_tireg.h,v 1.14 2004/07/27 07:59:51 he Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
@ -996,9 +996,15 @@ struct ti_event_desc {
|
||||
* allocated for the standard, mini and jumbo receive rings.
|
||||
*/
|
||||
|
||||
#define TI_SSLOTS 64 /* 256 */
|
||||
#define TI_MSLOTS 64 /* 256 */
|
||||
#define TI_JSLOTS 64 /* 256 */
|
||||
#ifndef TI_SSLOTS
|
||||
#define TI_SSLOTS 256
|
||||
#endif
|
||||
#ifndef TI_MSLOTS
|
||||
#define TI_MSLOTS 256
|
||||
#endif
|
||||
#ifndef TI_JSLOTS
|
||||
#define TI_JSLOTS 384
|
||||
#endif
|
||||
#define TI_RSLOTS 128
|
||||
|
||||
#define TI_JRAWLEN (ETHER_MAX_LEN_JUMBO + ETHER_ALIGN + sizeof(u_int64_t))
|
||||
|
Loading…
Reference in New Issue
Block a user