DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v2 2/3] net/nfp: fix live MAC changes not supported
Date: Fri, 24 Aug 2018 12:15:58 +0100	[thread overview]
Message-ID: <1535109359-48584-3-git-send-email-alejandro.lucero@netronome.com> (raw)
In-Reply-To: <1535109359-48584-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.

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 6e5e305..ee743e9 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2886,6 +2886,9 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
 	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,
-- 
1.9.1

  parent reply	other threads:[~2018-08-24 11:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 11:15 [dpdk-dev] support MAC changes when no live changes allowed Alejandro Lucero
2018-08-24 11:15 ` [dpdk-dev] [PATCH v2 1/3] ethdev: fix MAC changes when live change not supported Alejandro Lucero
2018-08-24 12:27   ` Ferruh Yigit
2018-08-24 12:45     ` Alejandro Lucero
2018-08-24 12:29   ` Ferruh Yigit
2018-08-24 11:15 ` Alejandro Lucero [this message]
2018-08-24 11:15 ` [dpdk-dev] [PATCH v2 3/3] doc: comment rte_eth_dev_start change Alejandro Lucero
2018-08-24 12:28   ` 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=1535109359-48584-3-git-send-email-alejandro.lucero@netronome.com \
    --to=alejandro.lucero@netronome.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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).