linux_dsm_epyc7002/drivers/net/ethernet/cavium/thunder
Dean Nelson 88c991a917 net: thunder: change q_len's type to handle max ring size
The Cavium thunder nicvf driver supports rx/tx rings of up to 65536 entries per.
The number of entires are stored in the q_len member of struct q_desc_mem. The
problem is that q_len being a u16, results in 65536 becoming 0.

In getting pointers to descriptors in the rings, the driver uses q_len minus 1
as a mask after incrementing the pointer, in order to go back to the beginning
and not go past the end of the ring.

With the q_len set to 0 the mask is no longer correct and the driver does go
beyond the end of the ring, causing various ills. Usually the first thing that
shows up is a "NETDEV WATCHDOG: enP2p1s0f1 (nicvf): transmit queue 7 timed out"
warning.

This patch remedies the problem by changing q_len to a u32.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-08 15:34:23 -05:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nic_main.c net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name 2018-01-29 12:22:06 -05:00
nic_reg.h net: thunderx: add timestamping support 2018-01-16 14:31:14 -05:00
nic.h net: thunderx: add timestamping support 2018-01-16 14:31:14 -05:00
nicvf_ethtool.c net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name 2018-01-29 12:22:06 -05:00
nicvf_main.c net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name 2018-01-29 12:22:06 -05:00
nicvf_queues.c net: thunderx: add timestamping support 2018-01-16 14:31:14 -05:00
nicvf_queues.h net: thunder: change q_len's type to handle max ring size 2018-02-08 15:34:23 -05:00
q_struct.h net: thunderx: Optimize RBDR descriptor handling 2017-05-02 15:41:20 -04:00
thunder_bgx.c net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name 2018-01-29 12:22:06 -05:00
thunder_bgx.h net: thunderx: add timestamping support 2018-01-16 14:31:14 -05:00
thunder_xcv.c net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name 2018-01-29 12:22:06 -05:00