From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 7435D8E58 for ; Wed, 14 Sep 2016 13:54:31 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id i130so44280030wmf.0 for ; Wed, 14 Sep 2016 04:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=9EfhJQG2Con7EClW2oEeI0lJmTTVJqrVsZTmnU+ADz8=; b=b1O62CP37KcrxKN6BQchn2b5vnJ5bmUN5Y6OunxcFJq/cZmSNrhCJ3yRzRA+r6I/bC +eds69l3iw+IJMJk616MKjhJ1ON9dENibPNqSK3JhPkugSgr6lgL5dFZpWrw/8wD9efu ALXLUXSQ7VmPFB9/QytruN4n7fTT+JHMSB4TnBPka3l01iuh63TzIqG2stE6CnkeYaxh 6oWx33NjBkYiDMqOULbCVXgtnWP5noH3F5oAKPX2LYBX5TyZ7/EDC4FCWI5azsRegYeI IB9/jT0l7/mIGREKX/SX5RcDz3zNcbRWzW/ClHvrBj5heP6xh6rvCeqXo+tgirNNiLbZ Wxsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=9EfhJQG2Con7EClW2oEeI0lJmTTVJqrVsZTmnU+ADz8=; b=jTHzFhfi4s9L68ImNkHgjPQ06MFG/7/KtKu+G4W6XZ5ZHNZprfxhjLaIK+89xMOF2I /tbT13FdxKxIHmPveIlvJLH/kar1APy9bVxItDLlQ2AFp5zoUBT2f8qK1TpU3AwUkdhO L6mPotf0Ob0CAvZzLNf6GGH7MltjZMZXPyJxty6Bf3oIc5WENOXyjX8j0m1fTGDk7Uas R3z/lBUVjgJ4hug/pIX2MJUy3Wa+pNCywnxDqktfLmIh4B9M321w9ssjZxc94D2F/Tew +orBTg9KHN0ZBZNTPhZYNcGvQIuaspy9uP4L3shfhu3cAuu8oWXEK3b3cBXOMwvxYsnE s7Cg== X-Gm-Message-State: AE9vXwPXzr/PeevCN5atbTReafQqudD+8eNe3+PSq9CibETS2EnumVzM60E2eEl2UvSt5AdW X-Received: by 10.194.102.132 with SMTP id fo4mr2622236wjb.157.1473854071040; Wed, 14 Sep 2016 04:54:31 -0700 (PDT) Received: from ping.vm.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id m133sm10417332wmg.0.2016.09.14.04.54.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 04:54:30 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Raslan Darawsheh Date: Wed, 14 Sep 2016 13:53:50 +0200 Message-Id: <6e526cd21d8e4ce963dba08519c7a81a4e9b1679.1473851528.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH V2 3/8] net/mlx5: fix removing VLAN filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2016 11:54:31 -0000 From: Raslan Darawsheh 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 --- 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