linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maya Erez <merez@codeaurora.org>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Dedy Lansky <dlansky@codeaurora.org>,
	linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com,
	Maya Erez <merez@codeaurora.org>
Subject: [PATCH v2 05/12] wil6210: add option to drop Tx packets when tx ring is full
Date: Mon, 28 Jan 2019 17:36:19 +0200	[thread overview]
Message-ID: <1548689786-23288-6-git-send-email-merez@codeaurora.org> (raw)
In-Reply-To: <1548689786-23288-1-git-send-email-merez@codeaurora.org>

From: Dedy Lansky <dlansky@codeaurora.org>

In AP mode with multiple clients, driver stops net queue
(netif_tx_stop_queue) upon first ring (serving specific client)
becoming full. This can have negative effect on transmission to
other clients which may still have room in their corresponding rings.

Implement new policy in which stop/wake net queue are not used. In
case there is no room in the ring for a transmitted packet, drop the
packet.
New policy is disabled by default and can be enabled with new
drop_if_ring_full module param.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/txrx.c         | 6 ++++++
 drivers/net/wireless/ath/wil6210/wil_platform.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index 51ff242..00996f1 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -2064,6 +2064,10 @@ static inline void __wil_update_net_queues(struct wil6210_priv *wil,
 		wil_dbg_txrx(wil, "check_stop=%d, mid=%d, stopped=%d",
 			     check_stop, vif->mid, vif->net_queue_stopped);
 
+	if (ring && wil->config.drop_if_ring_full)
+		/* no need to stop/wake net queues */
+		return;
+
 	if (ring && WIL_Q_PER_STA_USED(vif)) {
 		__wil_update_net_queues_per_sta(wil, vif, ring, check_stop);
 		return;
@@ -2227,6 +2231,8 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 		dev_kfree_skb_any(skb);
 		return NETDEV_TX_OK;
 	case -ENOMEM:
+		if (wil->config.drop_if_ring_full)
+			goto drop;
 		return NETDEV_TX_BUSY;
 	default:
 		break; /* goto drop; */
diff --git a/drivers/net/wireless/ath/wil6210/wil_platform.h b/drivers/net/wireless/ath/wil6210/wil_platform.h
index aca5d0d..986985c 100644
--- a/drivers/net/wireless/ath/wil6210/wil_platform.h
+++ b/drivers/net/wireless/ath/wil6210/wil_platform.h
@@ -64,6 +64,8 @@ struct wil_platform_config {
 	u8 ac_queues;
 	/* enable allocating tx queue(s) per station, default - no */
 	u8 q_per_sta;
+	/* drop Tx packets in case tx ring is full, default - no */
+	u8 drop_if_ring_full;
 };
 
 /**
-- 
1.9.1


  parent reply	other threads:[~2019-01-28 15:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 15:36 [PATCH v2 00/12] wil6210 patches Maya Erez
2019-01-28 15:36 ` [PATCH v2 01/12] wil6210: remove rtap_include_phy_info module param Maya Erez
2019-02-13 16:40   ` Kalle Valo
2019-02-14 16:54     ` merez
2019-01-28 15:36 ` [PATCH v2 02/12] wil6210: use platform specific configuration Maya Erez
2019-01-28 15:36 ` [PATCH v2 03/12] wil6210: support ndo_select_queue in net_device_ops Maya Erez
2019-01-28 15:36 ` [PATCH v2 04/12] wil6210: add support for AC queues per station Maya Erez
2019-01-28 15:36 ` Maya Erez [this message]
2019-01-28 15:36 ` [PATCH v2 06/12] wil6210: support up to 20 stations in AP mode Maya Erez
2019-01-28 15:36 ` [PATCH v2 07/12] wil6210: accessing 802.3 addresses via utility functions Maya Erez
2019-01-28 15:36 ` [PATCH v2 08/12] wil6210: fix invalid sta statistics update Maya Erez
2019-01-28 15:36 ` [PATCH v2 09/12] wil6210: ignore HALP ICR if already handled Maya Erez
2019-01-28 15:36 ` [PATCH v2 10/12] wil6210: check null pointer in _wil_cfg80211_merge_extra_ies Maya Erez
2019-01-28 15:36 ` [PATCH v2 11/12] wil6210: align to latest auto generated wmi.h Maya Erez
2019-01-28 15:36 ` [PATCH v2 12/12] wil6210: prevent device memory access while in reset or suspend Maya Erez
2019-02-22 14:29 ` [PATCH v2 00/12] wil6210 patches merez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548689786-23288-6-git-send-email-merez@codeaurora.org \
    --to=merez@codeaurora.org \
    --cc=dlansky@codeaurora.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wil6210@qti.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).