DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: Raslan Darawsheh <rdarawsheh@asaltech.com>
Subject: [dpdk-dev] [PATCH V2 3/8] net/mlx5: fix removing VLAN filter
Date: Wed, 14 Sep 2016 13:53:50 +0200	[thread overview]
Message-ID: <6e526cd21d8e4ce963dba08519c7a81a4e9b1679.1473851528.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1473851528.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <cover.1473851528.git.nelio.laranjeiro@6wind.com>

From: Raslan Darawsheh <rdarawsheh@asaltech.com>

memmove was moving bytes as the number of elements next to i, while it
should move the number of elements multiplied by the size of each element.

Fixes: e9086978 ("mlx5: support VLAN filtering")

Signed-off-by: Raslan Darawsheh <rdarawsheh@asaltech.com>
---
 drivers/net/mlx5/mlx5_vlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c
index 4719e69..fb730e5 100644
--- a/drivers/net/mlx5/mlx5_vlan.c
+++ b/drivers/net/mlx5/mlx5_vlan.c
@@ -87,7 +87,8 @@ vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 		--priv->vlan_filter_n;
 		memmove(&priv->vlan_filter[i],
 			&priv->vlan_filter[i + 1],
-			priv->vlan_filter_n - i);
+			sizeof(priv->vlan_filter[i]) *
+			(priv->vlan_filter_n - i));
 		priv->vlan_filter[priv->vlan_filter_n] = 0;
 	} else {
 		assert(i == priv->vlan_filter_n);
-- 
2.1.4

  parent reply	other threads:[~2016-09-14 11:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  7:02 [dpdk-dev] [PATCH 0/8] net/mlx5: various fixes Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 1/8] net/mlx5: fix inconsistent return value in Flow Director Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 2/8] net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 3/8] net/mlx5: fix removing VLAN filter Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 4/8] net/mlx5: refactor allocation of flow director queues Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 5/8] net/mlx5: fix support for flow director drop mode Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 6/8] net/mlx5: force inline for completion function Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 7/8] net/mlx5: re-factorize functions Nelio Laranjeiro
2016-09-07  7:02 ` [dpdk-dev] [PATCH 8/8] net/mlx5: fix inline logic Nelio Laranjeiro
2016-09-14 10:43   ` Ferruh Yigit
2016-09-14 11:07     ` Nélio Laranjeiro
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 0/8] net/mlx5: various fixes Nelio Laranjeiro
2016-09-14 12:21   ` Nélio Laranjeiro
2016-09-19 15:30   ` Bruce Richardson
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 1/8] net/mlx5: fix inconsistent return value in Flow Director Nelio Laranjeiro
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 2/8] net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro
2016-09-14 11:53 ` Nelio Laranjeiro [this message]
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 4/8] net/mlx5: refactor allocation of flow director queues Nelio Laranjeiro
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 5/8] net/mlx5: fix support for flow director drop mode Nelio Laranjeiro
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 6/8] net/mlx5: force inline for completion function Nelio Laranjeiro
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 7/8] net/mlx5: re-factorize functions Nelio Laranjeiro
2016-09-14 11:53 ` [dpdk-dev] [PATCH V2 8/8] net/mlx5: fix inline logic Nelio Laranjeiro

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=6e526cd21d8e4ce963dba08519c7a81a4e9b1679.1473851528.git.nelio.laranjeiro@6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=dev@dpdk.org \
    --cc=rdarawsheh@asaltech.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).