net: mvneta: fix improper tx queue usage in mvneta_tx()
mvneta_tx() was using a static tx queue number causing crashes as
soon as a little bit of traffic was sent via the interface, because
it is normally expected that the same queue should be used as in
As suggested by Ben Hutchings, let's use skb_get_queue_mapping() to
get the proper Tx queue number, and use alloc_etherdev_mqs() instead
of alloc_etherdev_mq() to create the queues.
Both my Mirabox and my OpenBlocks AX3 used to crash without this patch
and don't anymore with it. The issue appeared in 3.8 but became more
visible after the fix allowing GSO to be enabled.
Original work was done by Dmitri Epshtein and Thomas Petazzoni. I
just adapted it to take care of Ben's comments.
Signed-off-by: Willy Tarreau <email@example.com>
Cc: Dmitri Epshtein <firstname.lastname@example.org>
Cc: Thomas Petazzoni <email@example.com>
Cc: Gregory CLEMENT <firstname.lastname@example.org>
Cc: Ben Hutchings <email@example.com>
Tested-by: Gregory CLEMENT <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>
1 file changed