From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 2CDCE8D36 for ; Wed, 7 Sep 2016 09:02:50 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id b187so99376049wme.1 for ; Wed, 07 Sep 2016 00:02:50 -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; bh=9EfhJQG2Con7EClW2oEeI0lJmTTVJqrVsZTmnU+ADz8=; b=TA4iV1qRis1znchhKm6ELF4hm+8aWIR9muCG7OB/LI5WOH5BaOFY7TvbNxh7jxEUlw Nf2yxWaFJDu/BYP0kT8RHlP/iFNND8KmdZsKixf38IUE7ctCTqy/OpBLr97YB7lvSRyX tVOrQqIRDCxdBIMiY/IXHbhxaFAc531NUeP92GGHSGyfv4ujIp6Elvm67wq0aPmn3EP6 Y2BWm9VZjKuNPdpfd6Xjm68G2PPVMEmR4XNd3hBFas2YSGeUyiznanhINcdyF+4K+aHX IGZlqNTJmw2V8ada2dme26YyOxTx5VnTfZiEvEWrQt7w7nUVUObkp6sBJ7T28rIdGXZt h+aw== 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; bh=9EfhJQG2Con7EClW2oEeI0lJmTTVJqrVsZTmnU+ADz8=; b=l5nPNIgwYOtcnZG1WVBeQrTmu0XdAo6vLcCwpw/G5Aoq1y4I/9lX6VqQzR4G4ZVvLG zDyRBSMDPqmxjWgFk3Iwqdh0UYDgoplrE3kpnvMcQlbIWaxWrcin6hv0wuF0EAzAZhg9 GXT2WaeEJVhCpm4SjcWnQZjQjhB702Qd1MGICH4l/eo4fmpUNfbIHCqQ/lnNCCci4zaF DAUkkblwn7UYpa5pBQAWfNNF7vXObZd1F89+5176YrcdXwEBHa3HcONdjGKc0H2D+K0v AA1KEKaCRn9EJtjJL6KwyXMsg/zNLstjLOFIoo4Ha/ww+6IAS2xDUDAoAVvdRzR81ie4 XpJA== X-Gm-Message-State: AE9vXwNNZAF7IM0VcUF8W4Qw+onqa0t0Y5BFxe2SCv0CrE/kuCWptG656SqR7GPqmDP15Nx+ X-Received: by 10.28.61.87 with SMTP id k84mr2346542wma.98.1473231769974; Wed, 07 Sep 2016 00:02:49 -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 z17sm2556475wmz.23.2016.09.07.00.02.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 00:02:49 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Raslan Darawsheh Date: Wed, 7 Sep 2016 09:02:21 +0200 Message-Id: <9370a2536e1bd07c0ad3be29e9d3498d66d9ef42.1473230641.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH 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, 07 Sep 2016 07:02:52 -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