Commit 523384a
bnxt_en: Fix RSS table entries calculation for P5_PLUS chips
The existing formula used in the driver to calculate the number of RSS
table entries is to round up the number of RX rings to the next integer
multiples of 64 (e.g. 64, 128, 192, ..). This is incorrect. The valid
values supported by the chip are 64, 128, 256, 512 only (power of 2
starting from 64). When the number of RX rings is greater than 128, the
entry size will likely be wrong. Firmware will round down the invalid
value (e.g. 192 rounded down to 128) provided by the driver, causing some
RSS rings to not receive any packets.
We already have an existing function bnxt_calc_nr_ring_pages() to
do this calculation. Use it in bnxt_get_nr_rss_ctxs() to calculate the
number of RSS contexts correctly for P5_PLUS chips.
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Fixes: 7b3af4f ("bnxt_en: Add RSS support for 57500 chips.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20240117234515.226944-4-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 2ad8e57 commit 523384a
2 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5935 | 5935 | | |
5936 | 5936 | | |
5937 | 5937 | | |
5938 | | - | |
5939 | | - | |
| 5938 | + | |
| 5939 | + | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
5940 | 5944 | | |
5941 | 5945 | | |
5942 | 5946 | | |
| |||
7001 | 7005 | | |
7002 | 7006 | | |
7003 | 7007 | | |
| 7008 | + | |
| 7009 | + | |
7004 | 7010 | | |
7005 | 7011 | | |
7006 | | - | |
7007 | | - | |
| 7012 | + | |
7008 | 7013 | | |
7009 | 7014 | | |
7010 | 7015 | | |
| |||
7051 | 7056 | | |
7052 | 7057 | | |
7053 | 7058 | | |
| 7059 | + | |
| 7060 | + | |
7054 | 7061 | | |
7055 | | - | |
| 7062 | + | |
7056 | 7063 | | |
7057 | 7064 | | |
7058 | 7065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1574 | 1574 | | |
1575 | 1575 | | |
1576 | 1576 | | |
1577 | | - | |
| 1577 | + | |
| 1578 | + | |
1578 | 1579 | | |
1579 | 1580 | | |
1580 | 1581 | | |
| |||
0 commit comments