Skip to content
Commit 02a2b53e authored by Luigi Rizzo's avatar Luigi Rizzo Committed by Paul Gortmaker
Browse files

net-af_xdp: Use correct number of channels from ethtool



commit 3de88c91 upstream.

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 avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 35c02226
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment