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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200508144956.19d2af7c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 8 May 2020 14:49:56 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Luo bin <luobin9@...wei.com>
Cc:     <davem@...emloft.net>, <linux-kernel@...r.kernel.org>,
        <netdev@...r.kernel.org>, <luoxianjun@...wei.com>,
        <yin.yinshi@...wei.com>, <cloud.wangxiaoyun@...wei.com>
Subject: Re: [PATCH net-next v1] hinic: add three net_device_ops of vf

On Thu, 7 May 2020 18:21:19 +0000 Luo bin wrote:
> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c
> index 564fb2294a29..bc2f87e6cb5d 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c
> @@ -627,7 +627,7 @@ wait_for_mbox_seg_completion(struct hinic_mbox_func_to_func *func_to_func,
>  	struct hinic_hwdev *hwdev = func_to_func->hwdev;
>  	struct completion *done = &send_mbox->send_done;
>  	u32 cnt = 0;
> -	ulong jif;
> +	unsigned long jif;
>  
>  	if (poll) {
>  		while (cnt < MBOX_MSG_POLLING_TIMEOUT) {
> @@ -869,7 +869,7 @@ int hinic_mbox_to_func(struct hinic_mbox_func_to_func *func_to_func,
>  {
>  	struct hinic_recv_mbox *mbox_for_resp;
>  	struct mbox_msg_info msg_info = {0};
> -	ulong timeo;
> +	unsigned long timeo;
>  	int err;
>  
>  	mbox_for_resp = &func_to_func->mbox_resp[dst_func];

Unrelated cleanup.

> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
> index b66bb86cff96..3d6569d7bac8 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
> @@ -427,10 +427,6 @@ static int hinic_open(struct net_device *netdev)
>  		goto err_func_port_state;
>  	}
>  
> -	if (!HINIC_IS_VF(nic_dev->hwdev->hwif))
> -		/* Wait up to 3 sec between port enable to link state */
> -		msleep(3000);

Why is this no longer needed?

>  	down(&nic_dev->mgmt_lock);
>  
>  	err = hinic_port_link_state(nic_dev, &link_state);

> +	if (link_state == HINIC_LINK_STATE_DOWN) {
> +		netif_err(nic_dev, drv, netdev,
> +			  "Link status must be up when setting vf tx rate\n");
> +		return -EPERM;
> +	}

Does this also mean the configuration is lost if link goes down?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ