From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2.tohojo.dk (mail2.tohojo.dk [77.235.48.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id C1B7D3B260 for ; Fri, 2 Sep 2016 05:27:15 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail2.tohojo.dk DKIM-Filter: OpenDKIM Filter v2.10.3 mail2.tohojo.dk CC1494161D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=201310; t=1472808433; bh=Tu4moJ2dzHDkXNXc1BeM1loS/CH/tcbmvZkDxOGjggM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=qpHRAQ8G1I3Oy4opGR+TeMQ7aSWpJ0mI42c8vdDKS0pMcyI03/IjkSMGW4L84XKQ5 xYsz9Kyv7JB+b3ys0iKONEAei9pEbCZTfRpCrbGlYK1pCbnJQV0F9Vg8Kew4jX89Vh U0XYNZEZ8icKQmfBPsN+YE8ElXq0Y0XEdVi6xwoQ= Sender: toke@toke.dk Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id E912DC40238; Fri, 2 Sep 2016 11:27:12 +0200 (CEST) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Jason Andryuk Cc: make-wifi-fast@lists.bufferbloat.net, "linux-wireless\@vger.kernel.org" References: <20160830131548.6014-1-toke@toke.dk> <20160901160312.31540-1-toke@toke.dk> Date: Fri, 02 Sep 2016 11:27:12 +0200 In-Reply-To: (Jason Andryuk's message of "Thu, 1 Sep 2016 22:48:50 -0400") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87mvjq649b.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v5] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue. X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 09:27:16 -0000 Jason Andryuk writes: > On Thu, Sep 1, 2016 at 12:03 PM, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> @@ -1481,33 +1506,57 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee= 80211_hw *hw, >> { >> struct ieee80211_local *local =3D hw_to_local(hw); >> struct txq_info *txqi =3D container_of(txq, struct txq_info, txq= ); >> - struct ieee80211_hdr *hdr; >> struct sk_buff *skb =3D NULL; >> struct fq *fq =3D &local->fq; >> struct fq_tin *tin =3D &txqi->tin; >> + struct ieee80211_tx_info *info; >> >> spin_lock_bh(&fq->lock); >> >> if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags)) >> goto out; >> >> +begin: >> skb =3D fq_tin_dequeue(fq, tin, fq_tin_dequeue_func); >> if (!skb) >> goto out; >> >> ieee80211_set_skb_vif(skb, txqi); >> >> - hdr =3D (struct ieee80211_hdr *)skb->data; >> - if (txq->sta && ieee80211_is_data_qos(hdr->frame_control)) { >> + info =3D IEEE80211_SKB_CB(skb); >> + if (txq->sta && info->control.flags & IEEE80211_TX_CTRL_FAST_XMI= T) { >> struct sta_info *sta =3D container_of(txq->sta, struct s= ta_info, >> sta); >> - struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(skb); >> + struct ieee80211_fast_tx *fast_tx; >> >> - hdr->seq_ctrl =3D ieee80211_tx_next_seq(sta, txq->tid); >> - if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags)) >> - info->flags |=3D IEEE80211_TX_CTL_AMPDU; >> - else >> - info->flags &=3D ~IEEE80211_TX_CTL_AMPDU; >> + fast_tx =3D rcu_dereference(sta->fast_tx); >> + if (WARN_ON(!fast_tx)) { >> + /* lost the fast_tx pointer while the packet was= queued */ >> + ieee80211_free_txskb(hw, skb); >> + goto begin; >> + } >> + ieee80211_xmit_fast_finish(sta->sdata, sta, fast_tx, skb= , false); >> + } else { >> + struct ieee80211_tx_data tx =3D { }; >> + >> + __skb_queue_head_init(&tx.skbs); >> + tx.local =3D local; >> + if (txq->sta) { >> + struct sta_info *sta =3D container_of(txq->sta, >> + struct sta_i= nfo, >> + sta); > > sta is unneeded give the assignment below? Yeah, you're right. Think that was left over from a previous version. Thanks for spotting it :) -Toke