[dpdk-stable] patch 'net/qede: fix unicast MAC address handling in VF' has been queued to stable release 18.05.1
Christian Ehrhardt
christian.ehrhardt at canonical.com
Mon Jul 30 18:11:36 CEST 2018
Hi,
FYI, your patch has been queued to stable release 18.05.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/18. So please
shout if anyone has objections.
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From f8c8284593655a60bc2b5b32113f35ee500f772a Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shahed.shaikh at cavium.com>
Date: Sat, 23 Jun 2018 14:20:31 -0700
Subject: [PATCH] net/qede: fix unicast MAC address handling in VF
[ upstream commit c7641841af2aaf05bca987a5a0eff5a7fe96caeb ]
We did not register unicast mac configuration handlers
for VF causing failure in bonding of VFs.
Also, mac_addr_set operation requires mac_remove followed
by mac_add.
Fixes: 86a2265e59d7 ("qede: add SRIOV support")
Signed-off-by: Shahed Shaikh <shahed.shaikh at cavium.com>
---
drivers/net/qede/qede_ethdev.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 7a63d0564..1cae47424 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -957,7 +957,11 @@ qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr,
struct ecore_filter_ucast ucast;
int re;
+ if (!is_valid_assigned_ether_addr(mac_addr))
+ return -EINVAL;
+
qede_set_ucast_cmn_params(&ucast);
+ ucast.opcode = ECORE_FILTER_ADD;
ucast.type = ECORE_FILTER_MAC;
ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
re = (int)qede_mac_int_ops(eth_dev, &ucast, 1);
@@ -979,6 +983,9 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
return;
}
+ if (!is_valid_assigned_ether_addr(ð_dev->data->mac_addrs[index]))
+ return;
+
qede_set_ucast_cmn_params(&ucast);
ucast.opcode = ECORE_FILTER_REMOVE;
ucast.type = ECORE_FILTER_MAC;
@@ -1002,8 +1009,9 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
return -EPERM;
}
- qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
- return 0;
+ qede_mac_addr_remove(eth_dev, 0);
+
+ return qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
}
static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool flg)
@@ -3024,6 +3032,9 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.mtu_set = qede_set_mtu,
.udp_tunnel_port_add = qede_udp_dst_port_add,
.udp_tunnel_port_del = qede_udp_dst_port_del,
+ .mac_addr_add = qede_mac_addr_add,
+ .mac_addr_remove = qede_mac_addr_remove,
+ .mac_addr_set = qede_mac_addr_set,
};
static void qede_update_pf_params(struct ecore_dev *edev)
@@ -3188,7 +3199,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
ECORE_LEADING_HWFN(edev),
vf_mac,
&is_mac_forced);
- if (is_mac_exist && is_mac_forced) {
+ if (is_mac_exist) {
DP_INFO(edev, "VF macaddr received from PF\n");
ether_addr_copy((struct ether_addr *)&vf_mac,
ð_dev->data->mac_addrs[0]);
--
2.17.1
More information about the stable
mailing list