Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263887
b: refs/heads/master
c: c218895
h: refs/heads/master
i:
  263885: d1a3eb8
  263883: a07d35d
  263879: ffab23c
  263871: ff48cdc
v: v3
  • Loading branch information
Vladislav Zolotarov authored and David S. Miller committed Sep 15, 2011
1 parent a692433 commit 43268ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 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: 5f837363457a2280530373267f86092625d15a4d
refs/heads/master: c2188952fc7d2ca54bb8aca1bc502618a7488baf
17 changes: 11 additions & 6 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3091,15 +3091,20 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index)
struct bnx2x_fastpath *fp = &bp->fp[index];
int ring_size = 0;
u8 cos;
int rx_ring_size = 0;

/* if rx_ring_size specified - use it */
int rx_ring_size = bp->rx_ring_size ? bp->rx_ring_size :
MAX_RX_AVAIL/BNX2X_NUM_RX_QUEUES(bp);
if (!bp->rx_ring_size) {

/* allocate at least number of buffers required by FW */
rx_ring_size = max_t(int, bp->disable_tpa ? MIN_RX_SIZE_NONTPA :
MIN_RX_SIZE_TPA,
rx_ring_size);
rx_ring_size = MAX_RX_AVAIL/BNX2X_NUM_RX_QUEUES(bp);

/* allocate at least number of buffers required by FW */
rx_ring_size = max_t(int, bp->disable_tpa ? MIN_RX_SIZE_NONTPA :
MIN_RX_SIZE_TPA, rx_ring_size);

bp->rx_ring_size = rx_ring_size;
} else
rx_ring_size = bp->rx_ring_size;

/* Common */
sb = &bnx2x_fp(bp, index, status_blk);
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/net/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,10 +1310,7 @@ static void bnx2x_get_ringparam(struct net_device *dev,
if (bp->rx_ring_size)
ering->rx_pending = bp->rx_ring_size;
else
if (bp->state == BNX2X_STATE_OPEN && bp->num_queues)
ering->rx_pending = MAX_RX_AVAIL/bp->num_queues;
else
ering->rx_pending = MAX_RX_AVAIL;
ering->rx_pending = MAX_RX_AVAIL;

ering->rx_mini_pending = 0;
ering->rx_jumbo_pending = 0;
Expand Down

0 comments on commit 43268ac

Please sign in to comment.