linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211-hwsim:  Don't enqueue pkts that do not want txstatus.
Date: Mon, 23 Feb 2015 09:38:17 -0800	[thread overview]
Message-ID: <54EB6589.6040803@candelatech.com> (raw)
In-Reply-To: <1424707739.3075.19.camel@sipsolutions.net>

On 02/23/2015 08:08 AM, Johannes Berg wrote:
> On Tue, 2015-02-10 at 10:25 -0800, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Otherwise, skb is not cleaned up until there is some timeout
>> and the tx-queue quickly becomes overly full.
> 
>> +++ b/drivers/net/wireless/mac80211_hwsim.c
>> @@ -928,10 +928,14 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
>>  	genlmsg_end(skb, msg_head);
>>  	genlmsg_unicast(&init_net, skb, dst_portid);
>>  
>> -	/* Enqueue the packet */
>> -	skb_queue_tail(&data->pending, my_skb);
>>  	data->tx_pkts++;
>>  	data->tx_bytes += my_skb->len;
>> +
>> +	/* Enqueue the packet if we are expecting a tx-status response */
>> +	if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)
>> +		skb_queue_tail(&data->pending, my_skb);
>> +	else
>> +		ieee80211_free_txskb(hw, my_skb);
> 
> This doesn't really seem right - essentially it means that whatever you
> just gave to userspace is now completely useless?
> 
> It seems skb_orphan() could/should be put here.

I don't understand your complaint, why is what I gave to user-space useless?

If we just orphan them, does that clean up the skb memory properly?

If not, what eventually frees the skb?

Thanks,
Ben

> 
> johannes
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2015-02-23 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 18:25 [PATCH] mac80211-hwsim: Don't enqueue pkts that do not want txstatus greearb
2015-02-23 16:08 ` Johannes Berg
2015-02-23 17:38   ` Ben Greear [this message]
2015-02-24 10:14     ` Johannes Berg
2015-02-24 14:28       ` Ben Greear
2015-02-24 14:34         ` Johannes Berg
2015-02-24 14:38           ` Ben Greear

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=54EB6589.6040803@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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 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).