From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: dev@dpdk.org
Cc: stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] net/nfp: fix live MAC changes not supported
Date: Mon, 9 Jul 2018 18:14:56 +0100 [thread overview]
Message-ID: <1531156496-1702-3-git-send-email-alejandro.lucero@netronome.com> (raw)
In-Reply-To: <1531156496-1702-1-git-send-email-alejandro.lucero@netronome.com>
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 --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,
ð_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,
--
1.9.1
next prev parent reply other threads:[~2018-07-09 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 17:14 [dpdk-dev] [PATCH 0/2] support MAC changes when no live changes allowed Alejandro Lucero
2018-07-09 17:14 ` [dpdk-dev] [PATCH 1/2] ethdev: fix MAC changes when live change not supported Alejandro Lucero
2018-07-09 17:14 ` Alejandro Lucero [this message]
2018-07-18 8:58 ` [dpdk-dev] [dpdk-stable] [PATCH 0/2] support MAC changes when no live changes allowed Ferruh Yigit
2018-08-22 16:00 ` Ferruh Yigit
2018-08-23 9:22 ` Alejandro Lucero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531156496-1702-3-git-send-email-alejandro.lucero@netronome.com \
--to=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).