netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/3] add TSO / A-MSDU TX for iwlwifi
@ 2015-08-19 12:59 Emmanuel Grumbach
  2015-08-19 12:59 ` [RFC v2 1/3] iwlwifi: mvm: add real TSO implementation Emmanuel Grumbach
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Emmanuel Grumbach @ 2015-08-19 12:59 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: ido-Ix1uc/W3ht7QT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA,
	Emmanuel Grumbach

We enable TSO to get a lot of data at once to build A-MSDUs.
Our hardware doesn't have (yet) TCP CSUM offload, so we do
it manually. TSO won't be enabled on hardware that don't
support CSUM offload in release code, computing TCP CSUM
in the driver is just a way to start coding the flows.
This is why the "CSUM offload" implementation in the driver
in so bad in terms of efficiency. I preferred to have the
flows as close as they will be when the hardware will be
able to the CSUM than to try to seek efficiency.
The hardware that will have CSUM offload will still require
the driver to split the skb in software including the
IP / TCP header copy and update etc...

We could have enabled A-MSDU based on xmit-more, but the
rationale of using LSO is that when using pfifo-fast,
the Qdisc gets one packet and dequeues is straight away
which limits the possibility to get a lot of packets at
once. (Am I right here?).

A note about A-MSDUs for non-wireless people:
*********************************************
An A-MSDU is a aggregated frame. It is one big 802.11
packet that contains several subframes. Each subframe
is a TCP segment. One A-MSDU is represented by one single
skb which means that we need to copy / duplicate the TCP
/ IP / SNAP headers in one single skb. This is why those
headers are copied to a separate page: that page is added
multiple times to the skb with different offsets. Each
subframes needs at least 2 frags: 1 for the headers, 1 (or
more) for the payload.

I am quite a newbie in skb handling, so I guess that this
code can be improved. I have tested it decently using iperf,
but this doesn't mean that there are no issues using other
applications. We are enabling pktgen on TCP (using patches
that were sent a year ago or so) to test the different
layouts of the skb (payload partition amongst the header
and the different frags).

I'll be very happy to get comments on that code, this is
why I am sending it to netdev as well since the TSO experts
are there :)

Emmanuel Grumbach (3):
  iwlwifi: mvm: add real TSO implementation
  iwlwifi: mvm: allow to create A-MSDUs from a large send
  iwlwifi: mvm: transfer the truesize to the last TSO segment

 drivers/net/wireless/iwlwifi/mvm/mac80211.c |   3 +-
 drivers/net/wireless/iwlwifi/mvm/sta.c      |   4 +-
 drivers/net/wireless/iwlwifi/mvm/sta.h      |   6 +-
 drivers/net/wireless/iwlwifi/mvm/tx.c       | 669 ++++++++++++++++++++++++++--
 4 files changed, 647 insertions(+), 35 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-08-20 19:55 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 12:59 [RFC v2 0/3] add TSO / A-MSDU TX for iwlwifi Emmanuel Grumbach
2015-08-19 12:59 ` [RFC v2 1/3] iwlwifi: mvm: add real TSO implementation Emmanuel Grumbach
     [not found]   ` <1439989181-4444-2-git-send-email-emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-08-19 14:17     ` Eric Dumazet
     [not found]       ` <1439993864.6610.11.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-08-19 14:22         ` Eric Dumazet
2015-08-19 17:05       ` Grumbach, Emmanuel
2015-08-19 12:59 ` [RFC v2 2/3] iwlwifi: mvm: allow to create A-MSDUs from a large send Emmanuel Grumbach
     [not found] ` <1439989181-4444-1-git-send-email-emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-08-19 12:59   ` [RFC v2 3/3] iwlwifi: mvm: transfer the truesize to the last TSO segment Emmanuel Grumbach
     [not found]     ` <1439989181-4444-4-git-send-email-emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-08-19 14:24       ` Eric Dumazet
2015-08-19 19:17         ` Grumbach, Emmanuel
2015-08-19 20:39           ` Eric Dumazet
2015-08-20  6:21             ` Grumbach, Emmanuel
2015-08-20 13:11               ` Eric Dumazet
2015-08-20 13:53                 ` Grumbach, Emmanuel
     [not found]                   ` <0BA3FCBA62E2DC44AF3030971E174FB32E82654B-Jy8z56yoSI9wl47ZQwxUxrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-20 14:13                     ` Eric Dumazet
2015-08-20 19:34                   ` Grumbach, Emmanuel
     [not found]                     ` <0BA3FCBA62E2DC44AF3030971E174FB32E8266E6-Jy8z56yoSI9wl47ZQwxUxrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-20 19:55                       ` Eric Dumazet
2015-08-20  7:21             ` Grumbach, Emmanuel
2015-08-20  7:40               ` Grumbach, Emmanuel
2015-08-19 19:10     ` Sergei Shtylyov
2015-08-19 19:12       ` Grumbach, Emmanuel
     [not found]         ` <0BA3FCBA62E2DC44AF3030971E174FB32E8253B0-Jy8z56yoSI9wl47ZQwxUxrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-19 19:16           ` Sergei Shtylyov
2015-08-19 14:14 ` [RFC v2 0/3] add TSO / A-MSDU TX for iwlwifi Eric Dumazet
2015-08-19 15:07   ` Grumbach, Emmanuel
2015-08-19 16:08     ` Eric Dumazet
2015-08-19 17:00       ` Grumbach, Emmanuel
2015-08-19 17:19         ` Eric Dumazet
2015-08-19 17:56           ` Grumbach, Emmanuel
     [not found]             ` <0BA3FCBA62E2DC44AF3030971E174FB32E825252-Jy8z56yoSI9wl47ZQwxUxrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-19 18:01               ` Eric Dumazet
2015-08-19 18:09                 ` Grumbach, Emmanuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).