All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-7.2 v3 0/3] rtl8139: honor large send MSS value
@ 2022-11-17 16:55 Stefan Hajnoczi
  2022-11-17 16:55 ` [PATCH for-7.2 v3 1/3] rtl8139: avoid clobbering tx descriptor bits Stefan Hajnoczi
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Stefan Hajnoczi @ 2022-11-17 16:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Tobias Fiebig, Jason Wang, qemu-stable, Stefan Hajnoczi

v3:
- Add Patch 1 to avoid clobbering tx descriptor bits
- Add Patch 2 to avoid confusing tx command modes
- Exclude IP and TCP headers from large send MSS value

The rtl8139 large send offload currently does not honor the MSS value provided
by the driver. This is a problem especially when the MTU is small because IP
fragmentation occurs and leads to poor performance.

These patches make use of the large send MSS value.

I have done basic testing by running the following Python code inside the
guest:

  import socket
  s = socket.socket()
  s.connect(('10.0.2.2', 1234))
  buf = b'A' * 4096
  s.send(buf)

The device sees a 4150 byte tx descriptor that results in the transmission of 3
Ethernet frames with sizes of 1514, 1514, and 1230 bytes when the large send
MSS value is 1460 bytes.

Stefan Hajnoczi (3):
  rtl8139: avoid clobbering tx descriptor bits
  rtl8139: keep Tx command mode 0 and 1 separate
  rtl8139: honor large send MSS value

 hw/net/rtl8139.c | 47 ++++++++++++++++++++++++-----------------------
 1 file changed, 24 insertions(+), 23 deletions(-)

-- 
2.38.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-04-13 17:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 16:55 [PATCH for-7.2 v3 0/3] rtl8139: honor large send MSS value Stefan Hajnoczi
2022-11-17 16:55 ` [PATCH for-7.2 v3 1/3] rtl8139: avoid clobbering tx descriptor bits Stefan Hajnoczi
2022-11-18  7:18   ` Philippe Mathieu-Daudé
2022-11-21  4:16   ` Jason Wang
2022-11-21 12:31     ` Stefan Hajnoczi
2022-11-17 16:55 ` [PATCH for-7.2 v3 2/3] rtl8139: keep Tx command mode 0 and 1 separate Stefan Hajnoczi
2022-11-18  7:25   ` Philippe Mathieu-Daudé
2022-11-21  4:16   ` Jason Wang
2022-11-17 16:55 ` [PATCH for-7.2 v3 3/3] rtl8139: honor large send MSS value Stefan Hajnoczi
2022-11-17 17:51   ` Russell King (Oracle)
2022-11-17 18:05     ` Stefan Hajnoczi
2022-11-18  7:24   ` Philippe Mathieu-Daudé
2022-11-21  4:16   ` Jason Wang
2023-04-13 15:38   ` Peter Maydell
2023-04-13 17:24     ` Stefan Hajnoczi
2022-11-18  7:27 ` [PATCH for-7.2 v3 0/3] " Philippe Mathieu-Daudé
2022-11-21 15:55 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.