From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/nfp: write PF MAC to config BAR
Date: Wed, 13 Sep 2017 21:55:45 +0100 [thread overview]
Message-ID: <1505336145-41273-1-git-send-email-alejandro.lucero@netronome.com> (raw)
VFs rely on config BAR for getting the MAC address, although a
random one is created a valid address is not found.
A PF port has a fixed MAC which is currently acquired using the NSPU
interface. Some NFP firmwares require the MAC being writing back
to the config BAR for doing proper MAC filtering.
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
drivers/net/nfp/nfp_net.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 000d339..fe41e61 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2810,10 +2810,12 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
return -ENOMEM;
}
- if (hw->is_pf)
+ if (hw->is_pf) {
nfp_net_pf_read_mac(hwport0, port);
- else
+ nfp_net_write_mac(hw, (uint8_t *)&hw->mac_addr);
+ } else {
nfp_net_vf_read_mac(hw);
+ }
if (!is_valid_assigned_ether_addr((struct ether_addr *)&hw->mac_addr)) {
/* Using random mac addresses for VFs */
--
1.9.1
next reply other threads:[~2017-09-13 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 20:55 Alejandro Lucero [this message]
2017-09-18 19:14 ` Ferruh Yigit
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=1505336145-41273-1-git-send-email-alejandro.lucero@netronome.com \
--to=alejandro.lucero@netronome.com \
--cc=dev@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).