Search Linux Wireless

Re: [PATCH] mac80211-hwsim: Don't enqueue pkts that do not want txstatus.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/23/2015 08:08 AM, Johannes Berg wrote:
> On Tue, 2015-02-10 at 10:25 -0800, greearb@xxxxxxxxxxxxxxx wrote:
>> From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
>>
>> 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@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux