From 2e2b8cdbbc19775f98c49adad57c6c7e5cdeb4ba Mon Sep 17 00:00:00 2001 From: gallatin Date: Mon, 27 Apr 2009 15:45:54 +0000 Subject: Updates to mxge for multiple tx/rx rings: - Update mxge to use if_transmit(), and the new buf_ring interfaces, so as to enable multiple transmit queues. Use of if_transmit() is conditional on IFNET_BUF_RING, and is enabled by default (as in if_em). - Record a flow id on receive if receive hashing is active. I currently only record the rx ring id (0..8) rather than the 32-bit topelitz hash result, as doing the latter would require shifting the driver to use a larger rx return ring. Sponsored by: Myricom, Inc. --- sys/dev/mxge/if_mxge_var.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (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 d30f1b2..8ba82a5 100644 --- a/sys/dev/mxge/if_mxge_var.h +++ b/sys/dev/mxge/if_mxge_var.h @@ -125,7 +125,12 @@ typedef struct typedef struct { struct mtx mtx; +#ifdef IFNET_MULTIQUEUE + struct buf_ring *br; +#endif volatile mcp_kreq_ether_send_t *lanai; /* lanai ptr for sendq */ + volatile uint32_t *send_go; /* doorbell for sendq */ + volatile uint32_t *send_stop; /* doorbell for sendq */ mcp_kreq_ether_send_t *req_list; /* host shadow of sendq */ char *req_bytes; bus_dma_segment_t *seg_list; @@ -136,6 +141,9 @@ typedef struct int done; /* transmits completed */ int pkt_done; /* packets completed */ int max_desc; /* max descriptors per xmit */ + int queue_active; /* fw currently polling this queue*/ + int activate; + int deactivate; int stall; /* #times hw queue exhausted */ int wake; /* #times irq re-enabled xmit */ int watchdog_req; /* cache of req */ @@ -182,6 +190,11 @@ struct mxge_slice_state { mcp_irq_data_t *fw_stats; volatile uint32_t *irq_claim; u_long ipackets; + u_long opackets; + u_long obytes; + u_long omcasts; + u_long oerrors; + int if_drv_flags; struct lro_head lro_active; struct lro_head lro_free; int lro_queued; -- cgit v1.1