Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5225f32 authored by Luigi Rizzo's avatar Luigi Rizzo Committed by Greg Kroah-Hartman
Browse files

net-af_xdp: Use correct number of channels from ethtool



[ Upstream commit 3de88c9113f88c04abda339f1aa629397bf89e02 ]

Drivers use different fields to report the number of channels, so take
the maximum of all data channels (rx, tx, combined) when determining the
size of the xsk map. The current code used only 'combined' which was set
to 0 in some drivers e.g. mlx4.

Tested: compiled and run xdpsock -q 3 -r -S on mlx4

Signed-off-by: default avatarLuigi Rizzo <lrizzo@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20191119001951.92930-1-lrizzo@google.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c1efcafe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment