Skip to content

Commit 1aec6e1

Browse files
bcreeley13Jeff Kirsher
authored andcommitted
ice: Set minimum default Rx descriptor count to 512
Currently we set the default number of Rx descriptors per queue to the system's page size divided by the number of bytes per descriptor. For 4K page size systems this is resulting in 128 Rx descriptors per queue. This is causing more dropped packets than desired in the default configuration. Fix this by setting the minimum default Rx descriptor count per queue to 512. Signed-off-by: Brett Creeley <[email protected]> Signed-off-by: Anirudh Venkataramanan <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent e65e9e1 commit 1aec6e1

File tree

1 file changed

+13
-6
lines changed
  • drivers/net/ethernet/intel/ice

1 file changed

+13
-6
lines changed

drivers/net/ethernet/intel/ice/ice.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,20 @@ extern const char ice_drv_ver[];
4646
#define ICE_REQ_DESC_MULTIPLE 32
4747
#define ICE_MIN_NUM_DESC ICE_REQ_DESC_MULTIPLE
4848
#define ICE_MAX_NUM_DESC 8160
49-
/* set default number of Rx/Tx descriptors to the minimum between
50-
* ICE_MAX_NUM_DESC and the number of descriptors to fill up an entire page
49+
#define ICE_DFLT_MIN_RX_DESC 512
50+
/* if the default number of Rx descriptors between ICE_MAX_NUM_DESC and the
51+
* number of descriptors to fill up an entire page is greater than or equal to
52+
* ICE_DFLT_MIN_RX_DESC set it based on page size, otherwise set it to
53+
* ICE_DFLT_MIN_RX_DESC
54+
*/
55+
#define ICE_DFLT_NUM_RX_DESC \
56+
min_t(u16, ICE_MAX_NUM_DESC, \
57+
max_t(u16, ALIGN(PAGE_SIZE / sizeof(union ice_32byte_rx_desc), \
58+
ICE_REQ_DESC_MULTIPLE), \
59+
ICE_DFLT_MIN_RX_DESC))
60+
/* set default number of Tx descriptors to the minimum between ICE_MAX_NUM_DESC
61+
* and the number of descriptors to fill up an entire page
5162
*/
52-
#define ICE_DFLT_NUM_RX_DESC min_t(u16, ICE_MAX_NUM_DESC, \
53-
ALIGN(PAGE_SIZE / \
54-
sizeof(union ice_32byte_rx_desc), \
55-
ICE_REQ_DESC_MULTIPLE))
5663
#define ICE_DFLT_NUM_TX_DESC min_t(u16, ICE_MAX_NUM_DESC, \
5764
ALIGN(PAGE_SIZE / \
5865
sizeof(struct ice_tx_desc), \

0 commit comments

Comments
 (0)