Skip to contentSkip to conversation

fix missing set primary mac type when start port

PATCH Superseded Robin Zhang 3 participants 8 messages Apr 27, 2021 – Apr 29, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

cover fix missing set primary mac type when start port

When start port, all mac addresses will be set. We should set the mac type of default MAC address as VIRTCHNL_ETHER_ADDR_PRIMARY.

Robin Zhang (2):
net/iavf: fix missing set primary mac type when start port net/i40e: fix missing set primary mac type when start port

 drivers/net/i40e/i40e_ethdev_vf.c | 4 +++-
 drivers/net/iavf/iavf_vchnl.c     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 net/iavf: fix missing set primary mac type when start port

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")
---
 drivers/net/iavf/iavf_vchnl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_vchnl.c +3 -1
index 0026120cf4..5d57e8b541 100644
@@ -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],
Signature · 1 line
2.25.1
#2 lore raw

Re: [dpdk-dev] [PATCH 1/2] net/iavf: fix missing set primary mac type when start port

Hi,

Quoted 11 lines

-----Original Message-----
From: Zhang, RobinX <[email protected]>
Sent: Tuesday, April 27, 2021 17:23
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [PATCH 1/2] net/iavf: fix missing set primary mac type when start port

Quoted 1 line

When start port, all mac addresses will be set. We should set the mac type of

Please use MAC.

Quoted 31 lines

default MAC address as VIRTCHNL_ETHER_ADDR_PRIMARY.

Fixes b335e7203475 ("net/iavf: fix lack of MAC type when set MAC address")
---
 drivers/net/iavf/iavf_vchnl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_vchnl.c index renamed from drivers/net/iavf/iavf_vchnl.c +0 -0

0026120cf4..5d57e8b541 100644

drivers/net/iavf/iavf_vchnl.c +2 -1
@@ -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 :

drivers/net/iavf/iavf_vchnl.c +1 -0
+					      VIRTCHNL_ETHER_ADDR_EXTRA);
 			PMD_DRV_LOG(DEBUG, "add/rm

mac:%x:%x:%x:%x:%x:%x",
addr->addr_bytes[0], addr-

Quoted 1 line

addr_bytes[1],

addr->addr_bytes[2], addr-

Quoted 1 line

addr_bytes[3],

--
2.25.1

#3 lore raw

PATCH 2/2 net/i40e: fix missing set primary mac type when start port

In reply to Robin Zhang

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 3f604ddf33cf ("net/i40e: fix lack of MAC type when set MAC address")
---
 drivers/net/i40e/i40e_ethdev_vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +3 -1
index aeb6816b9f..8f3b152b6c 100644
@@ -2127,7 +2127,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, 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],
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 1/2 net/iavf: fix missing set primary MAC type when start port

In reply to Robin Zhang

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")

---
v2:
-fix commit message typo

---
 drivers/net/iavf/iavf_vchnl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_vchnl.c +3 -1
index 0026120cf4..5d57e8b541 100644
@@ -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],
Signature · 1 line
2.25.1
#5 lore raw

PATCH v2 2/2 net/i40e: fix missing set primary MAC type when start port

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 3f604ddf33cf ("net/i40e: fix lack of MAC type when set MAC address")

---
v2:
-fix commit message typo

---
 drivers/net/i40e/i40e_ethdev_vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev_vf.c +3 -1
index aeb6816b9f..8f3b152b6c 100644
@@ -2127,7 +2127,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, 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],
Signature · 1 line
2.25.1
Acked-by on v2 2/2 Applied
#6 lore raw

Re: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix missing set primary MAC type when start port

Quoted 12 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Wednesday, April 28, 2021 4:05 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix missing set primary MAC type when start port

Quoted 6 lines

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 3f604ddf33cf ("net/i40e: fix lack of MAC type when set MAC address")

Applied to dpdk-next-net-intel.

Thanks
Qi

Acked-by on v2 1/2 Applied
#7 lore raw

Re: [dpdk-dev] [PATCH v2 1/2] net/iavf: fix missing set primary MAC type when start port

In reply to Robin Zhang
Quoted 12 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Wednesday, April 28, 2021 4:05 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH v2 1/2] net/iavf: fix missing set primary MAC type when start port

Quoted 6 lines

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")

Applied to dpdk-next-net-intel.

Thanks
Qi