[RFC 00/19] Improve the qlge driver based on drivers/staging/qlge/TODO

Coiby Xu
2021-06-21T13:49:14Z

This patch set improves qlge driver based on drivers/staging/qlge/TODO
written by Benjamin.

For the testing, the kernel was build with KASAN, UBSAN,
DEBUG_ATOMIC_SLEEP, PROVE_LOCKING and DEBUG_KMEMLEAK enabled on a
machine from Red Hat. The machine happened to have two NICs managed by
this qlge driver. I put these two NICs into separate network namespaces
and no errors occurred for the following tests,
- with default MTU
- non TCP packet
- ping the other NIC from one NIC with different packet size, e.g.
200, 300, 2200
- TCP packets
- start a http server on one NIC
$ ip netns exec ns1 python -m http.server 8000 --bind 192.168.1.209
- download a file from the http server using the other NIC
curl -X GET --interface enp94s0f0 http://192.168.1.209:8000/kernel-5.11.3-300.fc34.src.rpm -L -O
- do the same tests with jumbo frame enabled (ip link set enp94s0f0 mtu 9000)

[1] https://lore.kernel.org/netdev/20200816025717.GA28176@f3/T/

Coiby Xu (19):
staging: qlge: fix incorrect truesize accounting
staging: qlge: change LARGE_BUFFER_MAX_SIZE to 4096
staging: qlge: alloc skb with only enough room for header when data is
put in the fragments
staging: qlge: add qlge_* prefix to avoid namespace clashes
staging: qlge: rename rx to completion queue and seperate rx_ring from
completion queue
staging: qlge: disable flow control by default
staging: qlge: remove the TODO item of unnecessary memset 0
staging: qlge: reorder members of qlge_adapter for optimization
staging: qlge: remove the TODO item of reorder struct
staging: qlge: remove the TODO item of avoid legacy/deprecated apis
staging: qlge: the number of pages to contain a buffer queue is
constant
staging: qlge: rewrite do while loops as for loops in
qlge_start_rx_ring
staging: qlge: rewrite do while loop as for loop in qlge_sem_spinlock
staging: qlge: rewrite do while loop as for loop in qlge_refill_bq
staging: qlge: remove the TODO item about rewriting while loops as
simple for loops
staging: qlge: remove deadcode in qlge_build_rx_skb
staging: qlge: fix weird line wrapping
staging: qlge: fix two indentation issues
staging: qlge: remove TODO item of unnecessary runtime checks

drivers/staging/qlge/TODO | 31 --
drivers/staging/qlge/qlge.h | 88 +++--
drivers/staging/qlge/qlge_dbg.c | 36 +-
drivers/staging/qlge/qlge_ethtool.c | 26 +-
drivers/staging/qlge/qlge_main.c | 586 ++++++++++++++--------------
drivers/staging/qlge/qlge_mpi.c | 11 +-
6 files changed, 373 insertions(+), 405 deletions(-)

--
2.32.0