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: <bb228f63-26f6-b5f1-e9a0-eac2e27eedd8@nvidia.com>
Date:   Wed, 20 Oct 2021 11:58:57 +0300
From:   Yishai Hadas <yishaih@...dia.com>
To:     Max Gurtovoy <mgurtovoy@...dia.com>, <alex.williamson@...hat.com>,
        <bhelgaas@...gle.com>, <jgg@...dia.com>, <saeedm@...dia.com>
CC:     <linux-pci@...r.kernel.org>, <kvm@...r.kernel.org>,
        <netdev@...r.kernel.org>, <kuba@...nel.org>, <leonro@...dia.com>,
        <kwankhede@...dia.com>, <maorg@...dia.com>
Subject: Re: [PATCH V2 mlx5-next 06/14] vdpa/mlx5: Use mlx5_vf_get_core_dev()
 to get PF device

On 10/19/2021 2:16 PM, Max Gurtovoy wrote:
>
> On 10/19/2021 1:58 PM, Yishai Hadas wrote:
>> Use mlx5_vf_get_core_dev() to get PF device instead of accessing
>> directly the PF data structure from the VF one.
>>
>> The mlx5_vf_get_core_dev() API in its turn uses the generic PCI API
>> (i.e. pci_iov_get_pf_drvdata) to get it.
>>
>> Signed-off-by: Yishai Hadas <yishaih@...dia.com>
>> Signed-off-by: Leon Romanovsky <leonro@...dia.com>
>> ---
>>   drivers/vdpa/mlx5/net/mlx5_vnet.c | 27 +++++++++++++++++++++------
>>   1 file changed, 21 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c 
>> b/drivers/vdpa/mlx5/net/mlx5_vnet.c
>> index 5c7d2a953dbd..97b8917bc34d 100644
>> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
>> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
>> @@ -1445,7 +1445,10 @@ static virtio_net_ctrl_ack 
>> handle_ctrl_mac(struct mlx5_vdpa_dev *mvdev, u8 cmd)
>>       size_t read;
>>       u8 mac[ETH_ALEN];
>>   -    pfmdev = pci_get_drvdata(pci_physfn(mvdev->mdev->pdev));
>> +    pfmdev = mlx5_vf_get_core_dev(mvdev->mdev->pdev);
>> +    if (!pfmdev)
>> +        return status;
>> +
>>       switch (cmd) {
>
> Yishai/Jason,
>
> I think this patch breaks VPDA over SF.
>
> Did you verify it ?
>

It seems that you are right, the SF use case requires some different 
handling/path compared to VF.

As this patch is orthogonal to what we try to achieve in this series, we 
may apparently drop it from V3 and let vdpa/mlx5 people come with a 
complete tested patch for both cases on top.

Thanks,
Yishai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ