net/hns3: fix duplicated VLAN entry
authorMin Hu (Connor) <humin29@huawei.com>
Fri, 22 Nov 2019 12:06:24 +0000 (20:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 26 Nov 2019 17:05:15 +0000 (18:05 +0100)
commit4c5b16999074a8b4d61a2564220147548afe959a
treedd048398003f0ebd8875082f905422ebee052c83
parent958edf6627d55e5ffe27731f4e1030e7e718458f
net/hns3: fix duplicated VLAN entry

When setting vlan, hns3 driver will add vlan entry to vlan linked list
each time, and this is unreasonable.

This patch adds a check whether the VLAN to be added already exists
in the linked list and prevents adding duplicated vlan.

Fixes: 411d23b9eafb ("net/hns3: support VLAN")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_ethdev.c