All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ido@wizery.com" <ido@wizery.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC v2 0/3] add TSO / A-MSDU TX for iwlwifi
Date: Wed, 19 Aug 2015 17:56:20 +0000	[thread overview]
Message-ID: <0BA3FCBA62E2DC44AF3030971E174FB32E825252@hasmsx107.ger.corp.intel.com> (raw)
In-Reply-To: 1440004777.6610.23.camel@edumazet-glaptop2.roam.corp.google.com



On 08/19/2015 08:20 PM, Eric Dumazet wrote:
> On Wed, 2015-08-19 at 17:00 +0000, Grumbach, Emmanuel wrote:
>>
>> On 08/19/2015 07:08 PM, Eric Dumazet wrote:
>>> On Wed, 2015-08-19 at 15:07 +0000, Grumbach, Emmanuel wrote:
>>>
>>>> I'll look at it.
>>>> I was almost starting to implement that but then I thought with another
>>>> (good?) reason to use LSO. LSO gives me the guarantee that the packet is
>>>> directed to one peer, which might not be the case with xmit_more since
>>>> we have one Qdisc for several clients in case we are in AP mode.
>>>> Building an A-MSDU for several clients is not possible, at least not for
>>>> several client in the L2 (different MAC addresses).
>>>> LSO avoids this problem completely.
>>>
>>> Then, simply calling skb_gso_segment() from the driver might be enough,
>>> and less work for you.
>>>
>>> This would even support TSO on IPv6
>>>
>>
>> Well... I did take care of IPv6.
> 
> net/core/tso.c does not yet handle IPv6
> 

Yeah - I can see that now.
I can teach him - that's not a big deal. The bigger problem is that
net/core/tso.c doesn't do what I really need: it does only a small
portion. Since I need to add one frag to several skbs, I need to
refcount the frags' page. net/core/tso.c hides the page from me.

I can try to use tso_build_hdr but it will copy the entire header where
I need only SNAP / IP / TCP (and not 802.11).
I am getting the feeling that net/core/tso.c is close to what I need,
but not close enough to be usable without making changes that would make
the implementation too complicated and changing net/core/tso.c in a way
that would be much less readable for other users.
I know that our device is quite "unique" in the sense that most other
vendors do all the header twiddling in hardware. We unfortunately don't.
The A-MSDU's format is also somewhat unusual:

<802.11 HDR>
	<ETH><SNAP><IP><TCP><PAYLOAD><PAD (variable length)
	<ETH><SNAP><IP><TCP><PAYLOAD><PAD (variable length)
	<ETH><SNAP><IP><TCP><PAYLOAD><PAD (variable length)
	etc...

So I feel that making net/core/tso.c more complicated just because of
our craziness seems an overkill to me.
I'll try a bit harder to see how I can use net/core/tso.c, but I have to
say I am pessimistic.

WARNING: multiple messages have this Message-ID (diff)
From: "Grumbach, Emmanuel" <emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"ido-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org"
	<ido-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>,
	"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC v2 0/3] add TSO / A-MSDU TX for iwlwifi
Date: Wed, 19 Aug 2015 17:56:20 +0000	[thread overview]
Message-ID: <0BA3FCBA62E2DC44AF3030971E174FB32E825252@hasmsx107.ger.corp.intel.com> (raw)
In-Reply-To: 1440004777.6610.23.camel@edumazet-glaptop2.roam.corp.google.com



On 08/19/2015 08:20 PM, Eric Dumazet wrote:
> On Wed, 2015-08-19 at 17:00 +0000, Grumbach, Emmanuel wrote:
>>
>> On 08/19/2015 07:08 PM, Eric Dumazet wrote:
>>> On Wed, 2015-08-19 at 15:07 +0000, Grumbach, Emmanuel wrote:
>>>
>>>> I'll look at it.
>>>> I was almost starting to implement that but then I thought with another
>>>> (good?) reason to use LSO. LSO gives me the guarantee that the packet is
>>>> directed to one peer, which might not be the case with xmit_more since
>>>> we have one Qdisc for several clients in case we are in AP mode.
>>>> Building an A-MSDU for several clients is not possible, at least not for
>>>> several client in the L2 (different MAC addresses).
>>>> LSO avoids this problem completely.
>>>
>>> Then, simply calling skb_gso_segment() from the driver might be enough,
>>> and less work for you.
>>>
>>> This would even support TSO on IPv6
>>>
>>
>> Well... I did take care of IPv6.
> 
> net/core/tso.c does not yet handle IPv6
> 

Yeah - I can see that now.
I can teach him - that's not a big deal. The bigger problem is that
net/core/tso.c doesn't do what I really need: it does only a small
portion. Since I need to add one frag to several skbs, I need to
refcount the frags' page. net/core/tso.c hides the page from me.

I can try to use tso_build_hdr but it will copy the entire header where
I need only SNAP / IP / TCP (and not 802.11).
I am getting the feeling that net/core/tso.c is close to what I need,
but not close enough to be usable without making changes that would make
the implementation too complicated and changing net/core/tso.c in a way
that would be much less readable for other users.
I know that our device is quite "unique" in the sense that most other
vendors do all the header twiddling in hardware. We unfortunately don't.
The A-MSDU's format is also somewhat unusual:

<802.11 HDR>
	<ETH><SNAP><IP><TCP><PAYLOAD><PAD (variable length)
	<ETH><SNAP><IP><TCP><PAYLOAD><PAD (variable length)
	<ETH><SNAP><IP><TCP><PAYLOAD><PAD (variable length)
	etc...

So I feel that making net/core/tso.c more complicated just because of
our craziness seems an overkill to me.
I'll try a bit harder to see how I can use net/core/tso.c, but I have to
say I am pessimistic.
--
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

  reply	other threads:[~2015-08-19 17:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 12:59 [RFC v2 0/3] add TSO / A-MSDU TX for iwlwifi Emmanuel Grumbach
2015-08-19 12:59 ` Emmanuel Grumbach
2015-08-19 12:59 ` [RFC v2 1/3] iwlwifi: mvm: add real TSO implementation Emmanuel Grumbach
2015-08-19 14:17   ` Eric Dumazet
2015-08-19 14:17     ` Eric Dumazet
2015-08-19 14:22     ` Eric Dumazet
2015-08-19 14:22       ` Eric Dumazet
2015-08-19 17:05     ` Grumbach, Emmanuel
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
2015-08-19 12:59 ` [RFC v2 3/3] iwlwifi: mvm: transfer the truesize to the last TSO segment Emmanuel Grumbach
2015-08-19 12:59   ` Emmanuel Grumbach
2015-08-19 14:24   ` Eric Dumazet
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  6:21           ` Grumbach, Emmanuel
2015-08-20 13:11           ` Eric Dumazet
2015-08-20 13:53             ` Grumbach, Emmanuel
2015-08-20 14:13               ` Eric Dumazet
2015-08-20 14:13                 ` Eric Dumazet
2015-08-20 19:34               ` Grumbach, Emmanuel
2015-08-20 19:34                 ` Grumbach, Emmanuel
2015-08-20 19:55                 ` Eric Dumazet
2015-08-20 19:55                   ` Eric Dumazet
2015-08-20  7:21         ` Grumbach, Emmanuel
2015-08-20  7:21           ` Grumbach, Emmanuel
2015-08-20  7:40           ` Grumbach, Emmanuel
2015-08-20  7:40             ` Grumbach, Emmanuel
2015-08-19 19:10   ` Sergei Shtylyov
2015-08-19 19:12     ` Grumbach, Emmanuel
2015-08-19 19:16       ` Sergei Shtylyov
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 [this message]
2015-08-19 17:56             ` Grumbach, Emmanuel
2015-08-19 18:01             ` Eric Dumazet
2015-08-19 18:01               ` Eric Dumazet
2015-08-19 18:09               ` Grumbach, Emmanuel
2015-08-19 18:09                 ` Grumbach, Emmanuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0BA3FCBA62E2DC44AF3030971E174FB32E825252@hasmsx107.ger.corp.intel.com \
    --to=emmanuel.grumbach@intel.com \
    --cc=eric.dumazet@gmail.com \
    --cc=ido@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.