[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLinGDs4FkPvyZ+2xiwQ9P=3LzovnwPXNVrrRFBTtTYxvFQ@mail.gmail.com>
Date: Tue, 24 Oct 2017 23:40:38 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Yuval Mintz <yuvalm@...lanox.com>
Cc: Steve Lin <steven.lin1@...adcom.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jiri Pirko <jiri@...lanox.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linville@...driver.com" <linville@...driver.com>,
"gospo@...adcom.com" <gospo@...adcom.com>
Subject: Re: [PATCH net-next v3 06/10] bnxt: Add devlink support for config get/set
On Tue, Oct 24, 2017 at 10:55 PM, Yuval Mintz <yuvalm@...lanox.com> wrote:
> ...
>
>> - if (!pci_find_ext_capability(bp->pdev, PCI_EXT_CAP_ID_SRIOV))
>> - return 0;
>> -
>> - if (bp->hwrm_spec_code < 0x10800) {
>> + if ((!pci_find_ext_capability(bp->pdev, PCI_EXT_CAP_ID_SRIOV)) ||
>> + bp->hwrm_spec_code < 0x10800) {
>> + /* eswitch switchdev mode not supported */
>> + bnxt_dl_ops.eswitch_mode_set = NULL;
>> + bnxt_dl_ops.eswitch_mode_get = NULL;
>
> Why would you need to tie this interface to the presence of SRIOV in PCIe?
> Also, Assuming the ability to disable sriov in #2 would cause this capability
> not to be exposed after reboot, isn't this a one-way ticket?
>
No, he is modifying the existing devlink logic for the switchdev
eswitch mode. That logic controls the SRIOV eswitch mode and depends
on SRIOV.
But I agree the patch makes it look cumbersome. It will be better to
check for SRIOV and proper firmware support and then setup the
eswitch_mode devlink methods.
Powered by blists - more mailing lists