netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: "Grumbach,
	Emmanuel"
	<emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: "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 3/3] iwlwifi: mvm: transfer the truesize to the last TSO segment
Date: Wed, 19 Aug 2015 22:16:33 +0300	[thread overview]
Message-ID: <55D4D611.1060201@cogentembedded.com> (raw)
In-Reply-To: <0BA3FCBA62E2DC44AF3030971E174FB32E8253B0-Jy8z56yoSI9wl47ZQwxUxrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On 08/19/2015 10:12 PM, Grumbach, Emmanuel wrote:

>>> This allows to release the backpressure on the socket only
>>> when the last segment is released.
>>> Now the truesize looks like this:
>>> if the truesize of the original skb is 65420, all the
>>> segments will have a truesize of 704 (skb itself) and the
>>> last one will have 65420.
>>>
>>> Change-Id: I3c894cf2afc0aedfe7b2a5b992ba41653ff79c0e
>>> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>>> ---
>>>    drivers/net/wireless/iwlwifi/mvm/tx.c | 17 ++++++++++++++++-
>>>    1 file changed, 16 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
>>> index 5046833..046e50d 100644
>>> --- a/drivers/net/wireless/iwlwifi/mvm/tx.c
>>> +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
>> [...]
>>> @@ -1034,6 +1035,20 @@ static int iwl_mvm_tx_tso(struct iwl_mvm *mvm, struct sk_buff *skb_gso,
>>>    		}
>>>
>>>    		__skb_queue_tail(mpdus_skb, skb);
>>> +		sum_truesize += skb->truesize;
>>> +	}
>>> +
>>> +	/* Release the backpressure on the socket only when
>>> +	 * the last segment is released.
>>> +	 */
>>> +	if (skb_gso->destructor == sock_wfree) {
>
> I need to change the destructor function here as per Eric's comment.
>
>>> +		struct sk_buff *tail = mpdus_skb->prev;
>>> +
>>> +		swap(tail->truesize, skb_gso->truesize);
>>> +		swap(tail->destructor, skb_gso->destructor);
>>> +		swap(tail->sk, skb_gso->sk);
>>> +                atomic_add(sum_truesize - skb_gso->truesize,
>>
>>      Please indent using tabs, not spaces.
>
> I am happy this is the only flaw you found ;)

    It just jumped into my eyes. :-)

> Sure - I'll fix. And I'll remove the Change-ID and checkpatch will be
> happy.

    DaveM allows that tag in the networking patches, IIRC.

> No worries ;)

>>
>>> +                           &skb_gso->sk->sk_wmem_alloc);
>>>    	}
>>>
>>>    	ret = 0;

MBR, Sergei

--
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

  parent reply	other threads:[~2015-08-19 19:16 UTC|newest]

Thread overview: 29+ 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 ` [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 [this message]
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

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=55D4D611.1060201@cogentembedded.com \
    --to=sergei.shtylyov-m4dtvfq/zs1mrggop+s0pdbpr1lh4cv8@public.gmane.org \
    --cc=emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ido-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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).