aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@nvidia.com>2022-10-01 21:56:26 -0700
committerJakub Kicinski <kuba@kernel.org>2022-10-03 16:55:28 -0700
commitc2c9e31dfa4f23045f72f613c5809d5b030cd27f (patch)
tree05aea7a82729f0872dc732868c3320b9d64e0990 /drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
parentnet/mlx5e: xsk: Print a warning in slow configurations (diff)
downloadlinux-dev-c2c9e31dfa4f23045f72f613c5809d5b030cd27f.tar.xz
linux-dev-c2c9e31dfa4f23045f72f613c5809d5b030cd27f.zip
net/mlx5e: xsk: Optimize for unaligned mode with 3072-byte frames
When XSK frame size is 3072 (or another power of two multiplied by 3), KLM mechanism for NIC virtual memory page mapping can be optimized by replacing it with KSM. Before this change, two KLM entries were needed to map an XSK frame that is not a power of two: one entry maps the UMEM memory up to the frame length, the other maps the rest of the stride to the garbage page. When the frame length divided by 3 is a power of two, it can be mapped using 3 KSM entries, and the fourth will map the rest of the stride to the garbage page. All 4 KSM entries are of the same size, which allows for a much faster lookup. Frame size 3072 is useful in certain use cases, because it allows packing 4 frames into 3 pages. Generally speaking, other frame sizes equal to PAGE_SIZE minus a power of two can be optimized in a similar way, but it will require many more KSMs per frame, which slows down UMRs a little bit, but more importantly may hit the limit for the maximum number of KSM entries. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_stats.h')
0 files changed, 0 insertions, 0 deletions