From patchwork Mon Apr 8 18:06:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2410741 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 09BA03FC71 for ; Mon, 8 Apr 2013 18:08:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934984Ab3DHSH7 (ORCPT ); Mon, 8 Apr 2013 14:07:59 -0400 Received: from mail-da0-f42.google.com ([209.85.210.42]:55003 "EHLO mail-da0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934675Ab3DHSH6 (ORCPT ); Mon, 8 Apr 2013 14:07:58 -0400 Received: by mail-da0-f42.google.com with SMTP id n15so2713531dad.15 for ; Mon, 08 Apr 2013 11:07:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=NaVieUMHXXwoRv3lvqihyY9CB5Y6G0BHDWZMJ1BeK8k=; b=PpuOBL4Kv/fRZEpAHUWbMcMeHZyWHvn1+b60mCJzrlKmLQKE3SF4FSD2RXA8sfbZPj LTEs517vfzVDD0ybV8G6uYx5t7JAH4JDFptgdfbjRiPGMYwOIymwxD/2m8U+LGpgdgD7 yDIbrIu1WJpDMpzAjkvtEnwCCgSpgINo41I+AmiTpveI7MfLDxoQYV1Oe6DbUkXb5cdr dSrXppJeYoGIpD9FWz64zvkCJU7c03BiuSOqtAmjjzKta431Qv9W5N0LeASXJGMe+uPg EOsQe8fmvgSUs/n+V9iYkBQpKoQSFA9bU8OmNThJ5BP7rZWGnfEZqlFNabK84w0UDd8x uxdw== X-Received: by 10.66.190.104 with SMTP id gp8mr39795719pac.84.1365444477716; Mon, 08 Apr 2013 11:07:57 -0700 (PDT) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id pa2sm40603095pac.9.2013.04.08.11.07.55 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Apr 2013 11:07:56 -0700 (PDT) From: Thomas Pedersen To: Johannes Berg Cc: linux-wirelss , open80211s , Thomas Pedersen Subject: [PATCH 4/6] mac80211: limit mesh forwarding drops Date: Mon, 8 Apr 2013 11:06:15 -0700 Message-Id: <1365444377-9959-4-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1365444377-9959-1-git-send-email-thomas@cozybit.com> References: <1365444377-9959-1-git-send-email-thomas@cozybit.com> X-Gm-Message-State: ALoCoQmzlH6DszW71UBxFIAjJPsPPRGpFVU3oc/Ijwc9C1yQpSE6Ac/CdXa/wop2/kGeXkmd1MXm Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In case of the HW asking mac80211 to back off, the queues would be stopped with reason DRIVER. Limit dropping forwarded mesh data frames by putting them on the pending queue anyway if the outgoing HW queues appear to be only momentarily stopped. Signed-off-by: Thomas Pedersen --- net/mac80211/rx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index cb55ef0..8c7f80c 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1997,6 +1997,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; __le16 reason = cpu_to_le16(WLAN_REASON_MESH_PATH_NOFORWARD); u16 q, hdrlen; + unsigned long qreason; hdr = (struct ieee80211_hdr *) skb->data; hdrlen = ieee80211_hdrlen(hdr->frame_control); @@ -2064,7 +2065,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) return RX_CONTINUE; q = ieee80211_select_queue_80211(sdata, skb, hdr); - if (ieee80211_queue_stopped(&local->hw, q)) { + qreason = ieee80211_queue_stopped(&local->hw, q); + if (qreason & ~(IEEE80211_QUEUE_STOP_REASON_SKB_ADD | + IEEE80211_QUEUE_STOP_REASON_AGGREGATION)) { IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_congestion); return RX_DROP_MONITOR; }