All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Amir Vadai <amirv@mellanox.com>,
	Tal Alon <talal@mellanox.com>,
	Achiad Shochat <achiad@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>
Subject: [PATCH net-next 05/12] net/mlx5e: Poll rx cq before tx cq to improve round-trip latency
Date: Wed, 17 Jun 2015 18:26:22 +0300	[thread overview]
Message-ID: <1434554789-13758-6-git-send-email-ogerlitz@mellanox.com> (raw)
In-Reply-To: <1434554789-13758-1-git-send-email-ogerlitz@mellanox.com>

From: Achiad Shochat <achiad@mellanox.com>

For better round trip latency, handle rx completions before
tx completions.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
index 088bc42..9f31572 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
@@ -60,13 +60,13 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
 
 	clear_bit(MLX5E_CHANNEL_NAPI_SCHED, &c->flags);
 
-	for (i = 0; i < c->num_tc; i++)
-		busy |= mlx5e_poll_tx_cq(&c->sq[i].cq);
-
 	busy |= mlx5e_poll_rx_cq(&c->rq.cq, budget);
 
 	busy |= mlx5e_post_rx_wqes(c->rq.cq.sqrq);
 
+	for (i = 0; i < c->num_tc; i++)
+		busy |= mlx5e_poll_tx_cq(&c->sq[i].cq);
+
 	if (busy)
 		return budget;
 
-- 
2.3.7

  parent reply	other threads:[~2015-06-17 15:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 15:26 [PATCH net-next 00/12] Mellanox NIC drivers update, Jun 17 2015 Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 01/12] net/mlx4_en: Fix off-by-four in ethtool Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 02/12] net/mlx4_en: Use HW counters for rx/tx bytes/packets in PF device Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 03/12] net/mlx5e: Static mapping of netdev priv resources to/from netdev TX queues Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 04/12] net/mlx5e: Use skb_shinfo(skb)->gso_segs rather than counting them Or Gerlitz
2015-06-17 15:26 ` Or Gerlitz [this message]
2015-06-21 17:21   ` [PATCH net-next 05/12] net/mlx5e: Poll rx cq before tx cq to improve round-trip latency David Miller
2015-06-21 21:35     ` achiad shochat
2015-06-22 13:35       ` David Miller
2015-06-23 14:12         ` Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 06/12] net/mlx5e: Remove re-assignment of wq type in mlx5e_enable_rq() Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 07/12] net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 08/12] net/mlx5e: Avoid TX CQE generation if more xmit packets expected Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 09/12] net/mlx5e: Remove extra spaces Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 10/12] net/mlx5e: Remove mlx5e_cq.sqrq back-pointer Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 11/12] net/mlx5e: Pop cq outside mlx5e_get_cqe Or Gerlitz
2015-06-17 15:26 ` [PATCH net-next 12/12] net/mlx5e: Prefetch skb data on RX Or Gerlitz

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=1434554789-13758-6-git-send-email-ogerlitz@mellanox.com \
    --to=ogerlitz@mellanox.com \
    --cc=achiad@mellanox.com \
    --cc=amirv@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=talal@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.