From patchwork Wed Jul 13 11:57:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Machani, Yaniv" X-Patchwork-Id: 9227441 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A014C60572 for ; Wed, 13 Jul 2016 11:54:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85FC2272AA for ; Wed, 13 Jul 2016 11:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AC6927C8F; Wed, 13 Jul 2016 11:54:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0728A272AA for ; Wed, 13 Jul 2016 11:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbcGMLyN (ORCPT ); Wed, 13 Jul 2016 07:54:13 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:34883 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750956AbcGMLyL (ORCPT ); Wed, 13 Jul 2016 07:54:11 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u6DBq12u010845; Wed, 13 Jul 2016 06:52:01 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u6DBs8Me010536; Wed, 13 Jul 2016 06:54:08 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Wed, 13 Jul 2016 06:54:07 -0500 Received: from wlsrv.emea.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u6DBs5M5018301; Wed, 13 Jul 2016 06:54:06 -0500 From: Yaniv Machani To: CC: Meirav Kama , Yaniv Machani , Johannes Berg , "David S. Miller" , , Subject: [PATCH v2] mac80211: rx: frames received out of order Date: Wed, 13 Jul 2016 14:57:56 +0300 Message-ID: <20160713115758.25395-1-yanivma@ti.com> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Meirav Kama Upon forwarding frames from Rx to Tx in mesh, driver clones the skb. It zeros the tx_info and doesn't set hw_queue correctly. It then enqueues the frame in queue 0 (VOICE) instead of the correct queue. Upon re-queue of this frame, driver inserts it to the correct queue (e.g. BE). After that, driver dequeue frames from 2 different queues and sends them out of order. To fix this, driver will set the tx_info->hw_queue to the correct queue when cloning the skb. Signed-off-by: Meirav Kama Signed-off-by: Yaniv Machani --- V2 - Revised comment net/mac80211/rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 9a1eb70..88dc744 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2392,6 +2392,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; info->control.vif = &rx->sdata->vif; info->control.jiffies = jiffies; + info->hw_queue = q; if (is_multicast_ether_addr(fwd_hdr->addr1)) { IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast); memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);