Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327695
b: refs/heads/master
c: 14bf718
h: refs/heads/master
i:
  327693: 93fb130
  327691: b17cada
  327687: 504f910
  327679: 9dd685f
v: v3
  • Loading branch information
Ben Hutchings committed Aug 24, 2012
1 parent 8784246 commit 532576e
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 116 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7668ff9c2ad7d354655e23afa836a92d54d2ea63
refs/heads/master: 14bf718fb97efe9ff649c317e7d87a3617b13e7c
10 changes: 10 additions & 0 deletions trunk/drivers/net/ethernet/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,16 @@ static void efx_start_datapath(struct efx_nic *efx)
efx->rx_buffer_order = get_order(efx->rx_buffer_len +
sizeof(struct efx_rx_page_state));

/* We must keep at least one descriptor in a TX ring empty.
* We could avoid this when the queue size does not exactly
* match the hardware ring size, but it's not that important.
* Therefore we stop the queue when one more skb might fill
* the ring completely. We wake it when half way back to
* empty.
*/
efx->txq_stop_thresh = efx->txq_entries - efx_tx_max_skb_descs(efx);
efx->txq_wake_thresh = efx->txq_stop_thresh / 2;

/* Initialise the channels */
efx_for_each_channel(channel, efx) {
efx_for_each_channel_tx_queue(tx_queue, channel)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/ethernet/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ struct vfdi_status;
* should be allocated for this NIC
* @rxq_entries: Size of receive queues requested by user.
* @txq_entries: Size of transmit queues requested by user.
* @txq_stop_thresh: TX queue fill level at or above which we stop it.
* @txq_wake_thresh: TX queue fill level at or below which we wake it.
* @tx_dc_base: Base qword address in SRAM of TX queue descriptor caches
* @rx_dc_base: Base qword address in SRAM of RX queue descriptor caches
* @sram_lim_qw: Qword address limit of SRAM
Expand Down Expand Up @@ -775,6 +777,9 @@ struct efx_nic {

unsigned rxq_entries;
unsigned txq_entries;
unsigned int txq_stop_thresh;
unsigned int txq_wake_thresh;

unsigned tx_dc_base;
unsigned rx_dc_base;
unsigned sram_lim_qw;
Expand Down
Loading

0 comments on commit 532576e

Please sign in to comment.