From: Robin Zhang <robinx.zhang@intel.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, jia.guo@intel.com, qiming.yang@intel.com,
stevex.yang@intel.com, Robin Zhang <robinx.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v2 1/2] net/iavf: fix missing set primary MAC type when start port
Date: Wed, 28 Apr 2021 08:04:51 +0000 [thread overview]
Message-ID: <20210428080452.542274-1-robinx.zhang@intel.com> (raw)
In-Reply-To: <20210427092243.391908-1-robinx.zhang@intel.com>
When start port, all MAC addresses will be set. We should set the MAC
type of default MAC address as VIRTCHNL_ETHER_ADDR_PRIMARY.
Fixes: b335e7203475 ("net/iavf: fix lack of MAC type when set MAC address")
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
v2:
-fix commit message typo
---
drivers/net/iavf/iavf_vchnl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 0026120cf4..5d57e8b541 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -1172,7 +1172,9 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
continue;
rte_memcpy(list->list[j].addr, addr->addr_bytes,
sizeof(addr->addr_bytes));
- list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA;
+ list->list[j].type = (j == 0 ?
+ VIRTCHNL_ETHER_ADDR_PRIMARY :
+ VIRTCHNL_ETHER_ADDR_EXTRA);
PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x",
addr->addr_bytes[0], addr->addr_bytes[1],
addr->addr_bytes[2], addr->addr_bytes[3],
--
2.25.1
next prev parent reply other threads:[~2021-04-28 8:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-27 9:22 [dpdk-dev] [PATCH 0/2] fix missing set primary mac " Robin Zhang
2021-04-27 9:22 ` [dpdk-dev] [PATCH 1/2] net/iavf: " Robin Zhang
2021-04-28 7:45 ` Yang, Qiming
2021-04-27 9:22 ` [dpdk-dev] [PATCH 2/2] net/i40e: " Robin Zhang
2021-04-28 8:04 ` Robin Zhang [this message]
2021-04-28 8:04 ` [dpdk-dev] [PATCH v2 2/2] net/i40e: fix missing set primary MAC " Robin Zhang
2021-04-29 8:35 ` Zhang, Qi Z
2021-04-29 8:35 ` [dpdk-dev] [PATCH v2 1/2] net/iavf: " Zhang, Qi Z
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=20210428080452.542274-1-robinx.zhang@intel.com \
--to=robinx.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=qiming.yang@intel.com \
--cc=stevex.yang@intel.com \
/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).