All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, kernel-team@fb.com,
	Tariq Toukan <tariqt@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net-next 04/17] net/mlx5e: Use memset to init skbs_frags array to zeros
Date: Sun,  3 Sep 2017 07:21:04 +0300	[thread overview]
Message-ID: <20170903042117.28923-5-saeedm@mellanox.com> (raw)
In-Reply-To: <20170903042117.28923-1-saeedm@mellanox.com>

From: Tariq Toukan <tariqt@mellanox.com>

In RX data-path, use memset() instead of loop assignment
to init the whole skbs_frags array.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index aa5cc1590859..db372dcecbe0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -391,9 +391,9 @@ static int mlx5e_alloc_rx_umr_mpwqe(struct mlx5e_rq *rq,
 			goto err_unmap;
 		wi->umr.mtt[i] = cpu_to_be64(dma_info->addr | MLX5_EN_WR);
 		page_ref_add(dma_info->page, pg_strides);
-		wi->skbs_frags[i] = 0;
 	}
 
+	memset(wi->skbs_frags, 0, sizeof(*wi->skbs_frags) * MLX5_MPWRQ_PAGES_PER_WQE);
 	wi->consumed_strides = 0;
 	wqe->data.addr = cpu_to_be64(dma_offset);
 
-- 
2.13.0

  parent reply	other threads:[~2017-09-03  4:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03  4:21 [pull request][net-next 00/17] Mellanox, mlx5 updates 2017-09-03 Saeed Mahameed
2017-09-03  4:21 ` [net-next 01/17] net/mlx5e: Reorganize struct mlx5e_rq Saeed Mahameed
2017-09-03  4:21 ` [net-next 02/17] net/mlx5e: Replace multiplication by stride size with a shift Saeed Mahameed
2017-09-03  4:21 ` [net-next 03/17] net/mlx5e: Remove unnecessary wqe_sz field from RQ buffer Saeed Mahameed
2017-09-03  4:21 ` Saeed Mahameed [this message]
2017-09-03  4:21 ` [net-next 05/17] net/mlx5e: Small enhancements for RX MPWQE allocation and free Saeed Mahameed
2017-09-03  4:21 ` [net-next 06/17] net/mlx5e: NAPI busy-poll when UMR post is in progress Saeed Mahameed
2017-09-03  4:21 ` [net-next 07/17] net/mlx5e: Early-return on empty completion queues Saeed Mahameed
2017-09-03  4:21 ` [net-next 08/17] net/mlx5e: Refactor data-path lro header function Saeed Mahameed
2017-09-03  4:21 ` [net-next 09/17] net/mlx5e: Non-atomic indicator for ring enabled state Saeed Mahameed
2017-09-03  4:21 ` [net-next 10/17] net/mlx5e: Non-atomic RQ state indicator for UMR WQE in progress Saeed Mahameed
2017-09-03  4:21 ` [net-next 11/17] net/mlx5e: Type-specific optimizations for RX post WQEs function Saeed Mahameed
2017-09-03  4:21 ` [net-next 12/17] net/mlx5e: Remove unnecessary fields in ICO SQ Saeed Mahameed
2017-09-03  4:21 ` [net-next 13/17] net/mlx5e: Don't recycle page if moved to far NUMA Saeed Mahameed
2017-09-03  4:21 ` [net-next 14/17] net/mlx5e: Slightly increase RX page-cache size Saeed Mahameed
2017-09-03  4:21 ` [net-next 15/17] net/mlx5e: Use kernel's mechanism to avoid missing NAPIs Saeed Mahameed
2017-09-03  4:21 ` [net-next 16/17] net/mlx5e: Stop NAPI when irq balancer changes affinity Saeed Mahameed
2017-09-03  4:21 ` [net-next 17/17] net/mlx5e: Distribute RSS table among all RX rings Saeed Mahameed
2017-09-04  4:19 ` [pull request][net-next 00/17] Mellanox, mlx5 updates 2017-09-03 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=20170903042117.28923-5-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@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.