Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440427
| From | sunil.kovvuri@gmail.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 15/15] net: thunderx: Don't set mac address for secondary Qset VFs |
| Date | 2016-07-11 12:10 +0200 |
| Message-ID | <rTGk3-5Co-43@gated-at.bofh.it> (permalink) |
| References | <rTGk1-5Co-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Sunil Goutham <sgoutham@cavium.com>
Set MAC addresses only for primary VF's and don't for
secondary VFs.
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c
index 6524cfc..69e329e 100644
--- a/drivers/net/ethernet/cavium/thunder/nic_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nic_main.c
@@ -174,7 +174,7 @@ static void nic_mbx_send_ready(struct nicpf *nic, int vf)
mbx.nic_cfg.tns_mode = NIC_TNS_BYPASS_MODE;
- if (vf < MAX_LMAC) {
+ if (vf < nic->num_vf_en) {
bgx_idx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]);
lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]);
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index 300416a..4a084ab 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -1209,7 +1209,7 @@ int nicvf_open(struct net_device *netdev)
}
/* Check if we got MAC address from PF or else generate a radom MAC */
- if (is_zero_ether_addr(netdev->dev_addr)) {
+ if (!nic->sqs_mode && is_zero_ether_addr(netdev->dev_addr)) {
eth_hw_addr_random(netdev);
nicvf_hw_set_mac_addr(nic, netdev);
}
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/15] net: thunderx: Add support for 81xx and 83xx sunil.kovvuri@gmail.com - 2016-07-11 12:10 +0200 [PATCH 15/15] net: thunderx: Don't set mac address for secondary Qset VFs sunil.kovvuri@gmail.com - 2016-07-11 12:10 +0200 [PATCH 02/15] net: thunderx: Add VNIC's PCI devid on future chips sunil.kovvuri@gmail.com - 2016-07-11 12:10 +0200 [PATCH 07/15] net: thunderx: Support for different LMAC types within BGX sunil.kovvuri@gmail.com - 2016-07-11 12:10 +0200
csiph-web