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]
Message-ID: <7694a726-d294-a700-f021-03370d761139@huawei.com>
Date:   Wed, 18 Jan 2023 20:36:25 +0800
From:   "wangjie (L)" <wangjie125@...wei.com>
To:     Paolo Abeni <pabeni@...hat.com>, Hao Lan <lanhao@...wei.com>,
        <kuba@...nel.org>, Leon Romanovsky <leon@...nel.org>
CC:     <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
        <edumazet@...gle.com>, <richardcochran@...il.com>,
        <shenjian15@...wei.com>, <netdev@...r.kernel.org>,
        <davem@...emloft.net>
Subject: Re: [PATCH net-next 2/2] net: hns3: add vf fault process in hns3 ras



On 2023/1/17 16:04, Paolo Abeni wrote:
> Hello,
>
> On Fri, 2023-01-13 at 10:08 +0800, Hao Lan wrote:
> [...]
>
>> +static void hclge_get_vf_fault_bitmap(struct hclge_desc *desc,
>> +				      unsigned long *bitmap)
>> +{
>> +#define HCLGE_FIR_FAULT_BYTES	24
>> +#define HCLGE_SEC_FAULT_BYTES	8
>> +
>> +	u8 *buff;
>> +
>> +	memcpy(bitmap, desc[0].data, HCLGE_FIR_FAULT_BYTES);
>> +	buff = (u8 *)bitmap + HCLGE_FIR_FAULT_BYTES;
>> +	memcpy(buff, desc[1].data, HCLGE_SEC_FAULT_BYTES);
>> +}
>
> The above works under the assumption that:
>
> 	HCLGE_FIR_FAULT_BYTES + HCLGE_SEC_FAULT_BYTES == BITS_TO_BYTES(HCLGE_VPORT_NUM)
>
> I think it's better to enforce such condition at build time with a
> BUILD_BUG_ON(), to avoid future issues.
>
> Also I think Leon still deserve a reply to one of his questions,
> specifically: What will happen (at recovery time) with driver bound to
> this VF?
>
> Thanks!
>
> Paolo
>
As discussed in reply to Leon, it missed to notify VF driver to prepare for
the reset in V1, So I will add notify to VF driver in v2 to make sure the
VF driver will init to normal at recovery time.

Thanks!
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ