Message ID | 1455106400-16330-1-git-send-email-ivecera@redhat.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Feb 10, 2016 at 1:13 PM, Ivan Vecera <ivecera@redhat.com> wrote: > > The EVB (virtual bridge) functionality should be disabled on older BE3 > and Lancer chips if SR-IOV is disabled in the NIC's BIOS. This setting > is identified by the zero value of total VFs reported by the card. > The GET_HSW_CONFIG command cannot be used as it is not supported > by these older chipset's FW. > .. > --- > drivers/net/ethernet/emulex/benet/be_main.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c > index 9c1fc9d..886fe95 100644 > --- a/drivers/net/ethernet/emulex/benet/be_main.c > +++ b/drivers/net/ethernet/emulex/benet/be_main.c > @@ -4588,6 +4588,8 @@ static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, > > /* BE and Lancer chips support VEB mode only */ > if (BEx_chip(adapter) || lancer_chip(adapter)) { > + if (!pci_sriov_get_totalvfs(adapter->pdev)) > + return 0; Ivan, could you add a one line comment above this check that says "On BE3/Lancer the VEB is disabled in non-SRIOV profiles". This is to differentiate this behavior from Skyhawk, where the VEB may be enabled even in non-SRIOV profiles, like nPAR... thanks, -Sathya
On 11.2.2016 10:56, Sathya Perla wrote: > On Wed, Feb 10, 2016 at 1:13 PM, Ivan Vecera <ivecera@redhat.com> wrote: >> >> The EVB (virtual bridge) functionality should be disabled on older BE3 >> and Lancer chips if SR-IOV is disabled in the NIC's BIOS. This setting >> is identified by the zero value of total VFs reported by the card. >> The GET_HSW_CONFIG command cannot be used as it is not supported > by these older chipset's FW. >> > .. >> --- >> drivers/net/ethernet/emulex/benet/be_main.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c >> index 9c1fc9d..886fe95 100644 >> --- a/drivers/net/ethernet/emulex/benet/be_main.c >> +++ b/drivers/net/ethernet/emulex/benet/be_main.c >> @@ -4588,6 +4588,8 @@ static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, >> >> /* BE and Lancer chips support VEB mode only */ >> if (BEx_chip(adapter) || lancer_chip(adapter)) { >> + if (!pci_sriov_get_totalvfs(adapter->pdev)) >> + return 0; > > Ivan, could you add a one line comment above this check that says "On > BE3/Lancer the VEB is disabled in non-SRIOV profiles". This is to > differentiate this behavior from Skyhawk, where the VEB may be enabled > even in non-SRIOV profiles, like nPAR... > > thanks, > -Sathya > Sure Sathya, will send v2. Ivan
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 9c1fc9d..886fe95 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -4588,6 +4588,8 @@ static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, /* BE and Lancer chips support VEB mode only */ if (BEx_chip(adapter) || lancer_chip(adapter)) { + if (!pci_sriov_get_totalvfs(adapter->pdev)) + return 0; hsw_mode = PORT_FWD_TYPE_VEB; } else { status = be_cmd_get_hsw_config(adapter, NULL, 0,
The EVB (virtual bridge) functionality should be disabled on older BE3 and Lancer chips if SR-IOV is disabled in the NIC's BIOS. This setting is identified by the zero value of total VFs reported by the card. The GET_HSW_CONFIG command cannot be used as it is not supported by these older chipset's FW. Cc: Sathya Perla <sathya.perla@broadcom.com> Cc: Ajit Khaparde <ajit.khaparde@broadcom.com> Cc: Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Cc: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> --- drivers/net/ethernet/emulex/benet/be_main.c | 2 ++ 1 file changed, 2 insertions(+)