linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: greearb@candelatech.com
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 17:08:59 +0100	[thread overview]
Message-ID: <1424707739.3075.19.camel@sipsolutions.net> (raw)
In-Reply-To: <1423592732-17256-1-git-send-email-greearb@candelatech.com>

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.

johannes


  reply	other threads:[~2015-02-23 16:09 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 [this message]
2015-02-23 17:38   ` Ben Greear
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=1424707739.3075.19.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=greearb@candelatech.com \
    --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).