Search Linux Wireless

Re: [RFC 4/5] wifi: mac80211: mesh fast xmit support

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

 



On Mon, 2023-02-27 at 12:07 +0100, Felix Fietkau wrote:
> 
> +	/* If the skb is shared we need to obtain our own copy */
> +	if (skb_shared(skb)) {
> +		struct sk_buff *oskb = skb;
> +
> +		skb = skb_clone(skb, GFP_ATOMIC);
> +		if (!skb)
> +			return false;
> +
> +		kfree_skb(oskb);
> +	}

Use skb_share_check()?

>  	next_hop = rcu_dereference(mpath->next_hop);
>  	if (next_hop) {
>  		memcpy(hdr->addr1, next_hop->sta.addr, ETH_ALEN);
>  		memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
>  		ieee80211_mps_set_frame_flags(sdata, next_hop, hdr);
> +		if (ieee80211_hw_check(&sdata->local->hw, SUPPORT_FAST_XMIT))
> +			mesh_fast_tx_cache(sdata, skb, mpath);


I wondered briefly if it's worth moving that check into the function,
but not sure.

> +	/* rate limit, in case fast xmit can't be enabled */
> +	if (mppath->fast_tx_check == jiffies)
> +		return;
> +
> +	mppath->fast_tx_check = jiffies;

once every jiffies seems pretty frequent though?

> +	spin_lock_bh(&cache->walk_lock);

you could just spin_lock() the inner lock, _bh already taken care of by
the outer?

> @@ -3686,7 +3690,7 @@ static void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
>  #endif
>  
>  	if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
> -		tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
> +		u8 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
>  		*ieee80211_get_qos_ctl(hdr) = tid;

That's ... interesting, why wss there an argument in the first place?

but maybe add a blank line now :)

johannes




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

  Powered by Linux