All of 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 V1 06/11] net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion
Date: Tue, 23 Jun 2015 17:14:17 +0300	[thread overview]
Message-ID: <1435068862-26488-7-git-send-email-ogerlitz@mellanox.com> (raw)
In-Reply-To: <1435068862-26488-1-git-send-email-ogerlitz@mellanox.com>

From: Achiad Shochat <achiad@mellanox.com>

NOP completion SKBs are always NULL.

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_tx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
index c0566b6..f5c7d78 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
@@ -294,7 +294,7 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq)
 		if (unlikely(!skb)) { /* nop */
 			sq->stats.nop++;
 			sqcc++;
-			goto free_skb;
+			continue;
 		}
 
 		for (j = 0; j < MLX5E_TX_SKB_CB(skb)->num_dma; j++) {
@@ -309,8 +309,6 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq)
 		npkts++;
 		nbytes += MLX5E_TX_SKB_CB(skb)->num_bytes;
 		sqcc += MLX5E_TX_SKB_CB(skb)->num_wqebbs;
-
-free_skb:
 		dev_kfree_skb(skb);
 	}
 
-- 
2.3.7

  parent reply	other threads:[~2015-06-23 14:15 UTC|newest]

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

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=1435068862-26488-7-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.