Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 872709 Details for
Bug 1059532
ixgbe virtual function driver advertises vlan tagging offload when unavailable due to HV configuration
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
ixgbe/ixgbevf: add new reset parameter for vlan capability [test patch]
0001-ixgbe-ixgbevf-add-new-reset-parameter.patch (text/plain), 4.89 KB, created by
Nikolay Aleksandrov
on 2014-03-10 14:05:52 UTC
(
hide
)
Description:
ixgbe/ixgbevf: add new reset parameter for vlan capability [test patch]
Filename:
MIME Type:
Creator:
Nikolay Aleksandrov
Created:
2014-03-10 14:05:52 UTC
Size:
4.89 KB
patch
obsolete
>From b25049d5dbe42d90b471e1778c2df356345fbb91 Mon Sep 17 00:00:00 2001 >From: Nikolay Aleksandrov <nikolay@redhat.com> >Date: Mon, 10 Mar 2014 14:55:21 +0100 >Subject: [PATCH] ixgbe/ixgbevf: add new reset parameter > >Use one more word when sending the perm mac address to tell the VF if it >can create new vlans (i.e. if it's in a host vlan), so it can advertise >its vlan capabilities correctly. In case the VF is in a host vlan or >qos, then it'll advertise VLAN_CHALLENGED and deny the creation of new >vlans on top. >The logic is reversed in the bool vlancap (i.e. when 0, then we can create new >parameters and when 1 we can't) in order to be backwards compatible that >is to be able to load new ixgbevf driver on top of an old ixgbe driver >and still be able to use vlans as before. > >Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> >--- > drivers/net/ixgbe/ixgbe_mbx.h | 4 +++- > drivers/net/ixgbe/ixgbe_sriov.c | 8 +++++++- > drivers/net/ixgbevf/ixgbevf_main.c | 13 ++++++++----- > drivers/net/ixgbevf/mbx.h | 4 +++- > drivers/net/ixgbevf/vf.c | 1 + > drivers/net/ixgbevf/vf.h | 1 + > 6 files changed, 23 insertions(+), 8 deletions(-) > >diff --git a/drivers/net/ixgbe/ixgbe_mbx.h b/drivers/net/ixgbe/ixgbe_mbx.h >index e44ff47659b5..916e00fe94c3 100644 >--- a/drivers/net/ixgbe/ixgbe_mbx.h >+++ b/drivers/net/ixgbe/ixgbe_mbx.h >@@ -97,9 +97,11 @@ enum ixgbe_pfvf_api_rev { > #define IXGBE_VF_DEF_QUEUE 4 /* Default queue offset */ > > /* length of permanent address message returned from PF */ >-#define IXGBE_VF_PERMADDR_MSG_LEN 4 >+#define IXGBE_VF_PERMADDR_MSG_LEN 5 > /* word in permanent address message with the current multicast type */ > #define IXGBE_VF_MC_TYPE_WORD 3 >+/* word in permanent address message with the vlan capability */ >+#define IXGBE_VF_VLANCAP_WORD 4 > > #define IXGBE_PF_CONTROL_MSG 0x0100 /* PF control message */ > >diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c >index 882c34cf027c..04244174ac23 100644 >--- a/drivers/net/ixgbe/ixgbe_sriov.c >+++ b/drivers/net/ixgbe/ixgbe_sriov.c >@@ -635,7 +635,7 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf) > { > struct ixgbe_hw *hw = &adapter->hw; > unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses; >- u32 reg, msgbuf[4]; >+ u32 reg, msgbuf[5]; > u32 reg_offset, vf_shift; > u8 *addr = (u8 *)(&msgbuf[1]); > >@@ -694,6 +694,12 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf) > * correct vectors > */ > msgbuf[3] = hw->mac.mc_filter_type; >+ /* Tell the VF if it's VLAN capable */ >+ if (adapter->vfinfo[vf].pf_vlan || adapter->vfinfo[vf].pf_qos) >+ msgbuf[4] = 1; >+ else >+ msgbuf[4] = 0; >+ > ixgbe_write_mbx(hw, msgbuf, IXGBE_VF_PERMADDR_MSG_LEN, vf); > > return 0; >diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c >index 56b394621814..c9aa8afc5738 100644 >--- a/drivers/net/ixgbevf/ixgbevf_main.c >+++ b/drivers/net/ixgbevf/ixgbevf_main.c >@@ -3367,11 +3367,14 @@ static int ixgbevf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > } > > netdev->features = NETIF_F_SG | >- NETIF_F_IP_CSUM | >- NETIF_F_HW_VLAN_TX | >- NETIF_F_HW_VLAN_RX | >- NETIF_F_HW_VLAN_FILTER; >- >+ NETIF_F_IP_CSUM; >+ if (!hw->mac.vlancap) { >+ netdev->features |= NETIF_F_HW_VLAN_TX | >+ NETIF_F_HW_VLAN_RX | >+ NETIF_F_HW_VLAN_FILTER; >+ } else { >+ netdev->features |= NETIF_F_VLAN_CHALLENGED; >+ } > netdev->features |= NETIF_F_IPV6_CSUM; > netdev->features |= NETIF_F_TSO; > netdev->features |= NETIF_F_TSO6; >diff --git a/drivers/net/ixgbevf/mbx.h b/drivers/net/ixgbevf/mbx.h >index 0bc30058ff82..c164875480f0 100644 >--- a/drivers/net/ixgbevf/mbx.h >+++ b/drivers/net/ixgbevf/mbx.h >@@ -111,9 +111,11 @@ enum ixgbe_pfvf_api_rev { > #define IXGBE_VF_DEF_QUEUE 4 /* Default queue offset */ > > /* length of permanent address message returned from PF */ >-#define IXGBE_VF_PERMADDR_MSG_LEN 4 >+#define IXGBE_VF_PERMADDR_MSG_LEN 5 > /* word in permanent address message with the current multicast type */ > #define IXGBE_VF_MC_TYPE_WORD 3 >+/* word in permanent address message with the vlan capability */ >+#define IXGBE_VF_VLANCAP_WORD 4 > > #define IXGBE_PF_CONTROL_MSG 0x0100 /* PF control message */ > >diff --git a/drivers/net/ixgbevf/vf.c b/drivers/net/ixgbevf/vf.c >index 9a12d6df1140..83e842334f52 100644 >--- a/drivers/net/ixgbevf/vf.c >+++ b/drivers/net/ixgbevf/vf.c >@@ -119,6 +119,7 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw) > > memcpy(hw->mac.perm_addr, addr, ETH_ALEN); > hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD]; >+ hw->mac.vlancap = msgbuf[IXGBE_VF_VLANCAP_WORD]; > > return 0; > } >diff --git a/drivers/net/ixgbevf/vf.h b/drivers/net/ixgbevf/vf.h >index 7e567bb85a97..c6429120b310 100644 >--- a/drivers/net/ixgbevf/vf.h >+++ b/drivers/net/ixgbevf/vf.h >@@ -92,6 +92,7 @@ struct ixgbe_mac_info { > u32 max_tx_queues; > u32 max_rx_queues; > u32 max_msix_vectors; >+ bool vlancap; > }; > > struct ixgbe_mbx_operations { >-- >1.8.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1059532
:
872709
|
875517
|
879793
|
926073