diff options
| author | Amit Cohen <[email protected]> | 2024-06-25 13:47:34 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-06-26 14:43:57 +0000 |
| commit | 8f8cea8f3ddbd8f64d4f08c2d8525989c4fb44d4 (patch) | |
| tree | 2fb3d77bdb30f2a5adc711b5bb081a0f21839c79 /tools/testing/selftests/net/lib/py/utils.py | |
| parent | net: Drop explicit initialization of struct i2c_device_id::driver_data to 0 (diff) | |
| download | kernel-8f8cea8f3ddbd8f64d4f08c2d8525989c4fb44d4.tar.gz kernel-8f8cea8f3ddbd8f64d4f08c2d8525989c4fb44d4.zip | |
mlxsw: pci: Store number of scatter/gather entries for maximum packet size
A previous patch-set used page pool for Rx buffers allocations. To
simplify the change, we first used page pool for one allocation per
packet - one continuous buffer is allocated for each packet. This can be
improved by using fragmented buffers, then memory consumption will be
significantly reduced.
WQE (Work Queue Element) includes up to 3 scatter/gather entries for
data. As preparation for fragmented buffer usage, calculate number of
scatter/gather entries which are required for packet according to
maximum MTU and store it for future use. For now use PAGE_SIZE for each
entry, which means that maximum buffer size is 3 * PAGE_SIZE. This is
enough for the maximum MTU which is supported in the driver now (10K).
Warn in an unlikely case of maximum MTU which requires more than 3 pages,
for now this warn should not happen with standard page size (>=4K) and
maximum MTU (10K).
Signed-off-by: Amit Cohen <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Link: https://patch.msgid.link/98c3e3adb7e727e571ac538faf67cef262cec4fc.1719321422.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
