summaryrefslogtreecommitdiff
path: root/drivers/net/nfp
diff options
context:
space:
mode:
authorAlejandro Lucero <alejandro.lucero@netronome.com>2018-08-24 15:25:36 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-08-28 15:27:39 +0200
commit7712a1c660661005225c3f7ccbca09a6296e2751 (patch)
tree31ec912c0f6335ea3e1decab9c2e616becb2b46f /drivers/net/nfp
parent1e5e3d2e72c6bfdb3553be26015b7ee5bbf745c1 (diff)
downloaddpdk-next-eventdev-7712a1c660661005225c3f7ccbca09a6296e2751.zip
dpdk-next-eventdev-7712a1c660661005225c3f7ccbca09a6296e2751.tar.gz
dpdk-next-eventdev-7712a1c660661005225c3f7ccbca09a6296e2751.tar.xz
net/nfp: fix live MAC changes not supported
Some NFP firmwares support live changes to the MAC address, but this is not always true and the firmware advertises it accordingly. This patch checks if firmware does not support live changes and sets RTE_ETH_DEV_NOLIVE_MAC_ADDR in that case. Cc: stable@dpdk.org Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Diffstat (limited to 'drivers/net/nfp')
-rw-r--r--drivers/net/nfp/nfp_net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 6e5e305..ee743e9 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2886,6 +2886,9 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
ether_addr_copy((struct ether_addr *)hw->mac_addr,
&eth_dev->data->mac_addrs[0]);
+ if (!(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_NOLIVE_MAC_ADDR;
+
PMD_INIT_LOG(INFO, "port %d VendorID=0x%x DeviceID=0x%x "
"mac=%02x:%02x:%02x:%02x:%02x:%02x",
eth_dev->data->port_id, pci_dev->id.vendor_id,