diff mbox series

[2/2] net/nfp: fix live MAC changes not supported

Message ID 1531156496-1702-3-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers show
Series support MAC changes when no live changes allowed | expand


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Alejandro Lucero July 9, 2018, 5:14 p.m. UTC
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.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
 drivers/net/nfp/nfp_net.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series


diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 3658696..fbe74fc 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2883,6 +2883,9 @@  uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
 	ether_addr_copy((struct ether_addr *)hw->mac_addr,
+	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 "
 		     eth_dev->data->port_id, pci_dev->id.vendor_id,