lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 3 Apr 2019 12:15:44 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Huazhong Tan <tanhuazhong@...wei.com>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        salil.mehta@...wei.com, yisen.zhuang@...wei.com,
        linuxarm@...wei.com, Peng Li <lipeng321@...wei.com>
Subject: Re: [PATCH net-next 04/12] net: hns3: return 0 and print warning when
 hit duplicate MAC

On 03.04.2019 6:07, Huazhong Tan wrote:

> From: Peng Li <lipeng321@...wei.com>
> 
> When set 2 same MAC to different function of one port, IMP
> will return error as the later one may modify the origin one.
> This will cause bond fail for 2 VFs of one port.
> 
> Driver just print warning and return 0 with this patch, so
> if set same MAC address, it will return 0 but do not really
> configure to HW.

    "To" not needed here.

> Signed-off-by: Peng Li <lipeng321@...wei.com>
> Signed-off-by: Huazhong Tan <tanhuazhong@...wei.com>
> ---
>   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index e742a05..d45789e 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -5962,8 +5962,11 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport,
>   	}
>   
>   	/* check if we just hit the duplicate */
> -	if (!ret)
> -		ret = -EINVAL;
> +	if (!ret) {
> +		dev_warn(&hdev->pdev->dev, "VF %d mac(%pM) has been existed\n",

    Maybe just "exists"? The grammar is certainly wrong as is. :-)

> +			 vport->vport_id, addr);
> +		return 0;
> +	}
>   
>   	dev_err(&hdev->pdev->dev,
>   		"PF failed to add unicast entry(%pM) in the MAC table\n",

MBR, Sergei

Powered by blists - more mailing lists