sfc: Eliminate indirect lookups of queue size constants
Move size and mask definitions into efx.h; calculate page orders in falcon.c. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
12d00cadcc
commit
3ffeabdd2b
@@ -526,7 +526,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
/* Determine how many packets to send */
|
||||
state->packet_count = (efx->type->txd_ring_mask + 1) / 3;
|
||||
state->packet_count = EFX_TXQ_SIZE / 3;
|
||||
state->packet_count = min(1 << (i << 2), state->packet_count);
|
||||
state->skbs = kzalloc(sizeof(state->skbs[0]) *
|
||||
state->packet_count, GFP_KERNEL);
|
||||
|
Reference in New Issue
Block a user