net/hns3: fix residual MAC address entry
authorChengchang Tang <tangchengchang@huawei.com>
Sat, 17 Jul 2021 02:02:49 +0000 (10:02 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Jul 2021 12:14:32 +0000 (14:14 +0200)
commit976ddf2f5a7aa1ade4300de394cdd481a5e79f1c
tree8bd02655e91a43799039299bd9a960452a83b7af
parent8089aa75c513e76a0afc029389a52e545786a9d1
net/hns3: fix residual MAC address entry

Currently, even if we fail to remove the origin MAC address from the HW,
the set_default_mac will go on, and add the new MAC address to the HW.
Eventually cause the original MAC address entry to remain in the HW, and
users may receive unexpected packets.

This patch make set_default_mac return directly to failure if deleting
the original MAC address fails, simplifying the behavior of the driver
and solving the problem of residual MAC address entry.

Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_ethdev.c