From eeec7835546c0575001b8c1d50f89a6ed0d1870c Mon Sep 17 00:00:00 2001 From: gallatin Date: Tue, 22 May 2007 15:57:49 +0000 Subject: mxge cleanups: - Remove code to use the special wc_fifo. It has been disabled by default in our other drivers as it actually slows down transmit by a small amount - Dynamically determine the amount of space required for the rx_done ring rather than hardcoding it. - Compute the number of tx descriptors we are willing to transmit per frame as the minimum of 128 or 1/4 the tx ring size. - Fix a typo in the tx dma tag setup which could lead to unnecessary defragging of TSO packets (and potentially even dropping TSO packets due to EFBIG being returned). - Add a counter to keep track of how many times we've needed to defragment a frame. It should always be zero. - Export new extended f/w counters via sysctl Sponsored by: Myricom, Inc. --- sys/dev/mxge/if_mxge_var.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/dev/mxge/if_mxge_var.h') diff --git a/sys/dev/mxge/if_mxge_var.h b/sys/dev/mxge/if_mxge_var.h index 843c380..e3794ce 100644 --- a/sys/dev/mxge/if_mxge_var.h +++ b/sys/dev/mxge/if_mxge_var.h @@ -43,8 +43,7 @@ $FreeBSD$ #define MXGE_FW_OFFSET 1024*1024 #define MXGE_EEPROM_STRINGS_SIZE 256 -#define MXGE_MAX_SEND_DESC 64 /* should be large enough for - any TSO packet */ +#define MXGE_MAX_SEND_DESC 128 typedef struct { void *addr; @@ -59,6 +58,7 @@ typedef struct { mxge_dma_t dma; int cnt; int idx; + int mask; } mxge_rx_done_t; typedef struct @@ -82,7 +82,6 @@ struct mxge_tx_buffer_state { typedef struct { volatile mcp_kreq_ether_recv_t *lanai; /* lanai ptr for recv ring */ - volatile uint8_t *wc_fifo; /* w/c rx dma addr fifo address */ mcp_kreq_ether_recv_t *shadow; /* host shadow of recv ring */ struct mxge_rx_buffer_state *info; bus_dma_tag_t dmat; @@ -97,7 +96,6 @@ typedef struct typedef struct { volatile mcp_kreq_ether_send_t *lanai; /* lanai ptr for sendq */ - volatile uint8_t *wc_fifo; /* w/c send fifo address */ mcp_kreq_ether_send_t *req_list; /* host shadow of sendq */ char *req_bytes; bus_dma_segment_t *seg_list; @@ -108,6 +106,7 @@ typedef struct int done; /* transmits completed */ int pkt_done; /* packets completed */ int boundary; /* boundary transmits cannot cross*/ + int max_desc; /* max descriptors per xmit */ int stall; /* #times hw queue exhausted */ int wake; /* #times irq re-enabled xmit */ int watchdog_req; /* cache of req */ @@ -143,8 +142,7 @@ typedef struct { struct ifnet* ifp; struct mtx tx_mtx; int csum_flag; /* rx_csums? */ - uint8_t mac_addr[6]; /* eeprom mac address */ - mxge_tx_buf_t tx; /* transmit ring */ + mxge_tx_buf_t tx; /* transmit ring */ mxge_rx_buf_t rx_small; mxge_rx_buf_t rx_big; mxge_rx_done_t rx_done; @@ -197,9 +195,11 @@ typedef struct { int fw_multicast_support; int link_width; int max_mtu; + int tx_defrag; mxge_dma_t dmabench_dma; struct callout co_hdl; char *mac_addr_string; + uint8_t mac_addr[6]; /* eeprom mac address */ char product_code_string[64]; char serial_number_string[64]; char scratch[256]; -- cgit v1.1