Skip to contentSkip to conversation

ixgbe fixes

PATCH Superseded Bernard Iremonger 3 participants 19 messages Feb 24, 2016 – Mar 11, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

cover ixgbe fixes

This patch set implements the following:
Removes code which was duplicated in eth_ixgbevf_dev_init(). Adds more information to the error message in ixgbe_check_mq_mode(). Allows the MAC address of the VF to be set to zero.

Bernard Iremonger (3):
ixgbe: cleanup eth_ixgbevf_dev_uninit
ixgbe: add more information to the error message
ixgbe: allow use of zero MAC address with VF

 drivers/net/ixgbe/ixgbe_ethdev.c | 29 +++++++++++++----------------
 drivers/net/ixgbe/ixgbe_pf.c     |  4 ++--
 2 files changed, 15 insertions(+), 18 deletions(-)
Signature · 1 line
2.6.3
#1 lore raw

PATCH 1/3 ixgbe: cleanup eth_ixgbevf_dev_uninit

Releasing the rx and tx queues is already done in ixgbe_dev_close() so it does not need to be done in eth_ixgbevf_dev_uninit().

Fixes 2866c5f1b87e ("ixgbe: support port hotplug")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -14
index 3e6fe86..0db7f51 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -1390,7 +1390,6 @@ static int
 eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 {
 	struct ixgbe_hw *hw;
-	unsigned i;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1409,18 +1408,6 @@ eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 	/* Disable the interrupts for VF */
 	ixgbevf_intr_disable(hw);
 
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		ixgbe_dev_rx_queue_release(eth_dev->data->rx_queues[i]);
-		eth_dev->data->rx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_rx_queues = 0;
-
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		ixgbe_dev_tx_queue_release(eth_dev->data->tx_queues[i]);
-		eth_dev->data->tx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_tx_queues = 0;
-
 	rte_free(eth_dev->data->mac_addrs);
 	eth_dev->data->mac_addrs = NULL;
 
Signature · 1 line
2.6.3
#2 lore raw

PATCH 2/3 ixgbe: add more information to the error message

In reply to Bernard Iremonger

Add the nb_rx_q and nb_tx_q values to the error message to give details about the error.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +3 -1
index 0db7f51..759177a 100644
@@ -1835,7 +1835,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) ||
 		    (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool)) {
 			PMD_INIT_LOG(ERR, "SRIOV is active,"
-					" queue number must less equal to %d.",
+					" nb_rx_q=%d nb_tx_q=%d queue number"
+					" must be less than or equal to %d.",
+					nb_rx_q, nb_tx_q,
 					RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool);
 			return -EINVAL;
 		}
Signature · 1 line
2.6.3
#3 lore raw

PATCH 3/3 ixgbe: allow use of zero MAC address with VF

In reply to Bernard Iremonger

Reprogram the RAR[0] with a zero MAC address, to ensure that the VF traffic goes to the PF after stop, close and detach of the VF.

Fixes af75078fece3 ("first public release")
Fixes 00e30184daa0 ("ixgbe: add PF support")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++++-
 drivers/net/ixgbe/ixgbe_pf.c     |  4 ++--
 2 files changed, 11 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +9 -1
index 759177a..5608f67 100644
@@ -3902,6 +3902,7 @@ static void
 ixgbevf_dev_close(struct rte_eth_dev *dev)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ether_addr *addr = (struct ether_addr *)hw->mac.addr;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -3911,7 +3912,14 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
 
 	ixgbe_dev_free_queues(dev);
 
-	/* reprogram the RAR[0] in case user changed it. */
+	memset(addr->addr_bytes, 0, ETHER_ADDR_LEN);
+
+	/**
+	 * reprogram the RAR[0] with a zero mac address.
+	 * to ensure that the VF traffic goes to the PF
+	 * after stop, close and detach of the VF
+	 **/
+
 	ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
 }
 
drivers/net/ixgbe/ixgbe_pf.c +2 -2
index 2ffbd1f..db2dba4 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -445,7 +445,7 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
 	uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
 
-	if (is_valid_assigned_ether_addr((struct ether_addr*)new_mac)) {
+	if (is_unicast_ether_addr((struct ether_addr *)new_mac)) {
 		rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
 		return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV);
 	}
Signature · 1 line
2.6.3
#4 lore raw

v2 cover ixgbe fixes

In reply to Bernard Iremonger

This patch set implements the following:
Removes code which was duplicated in eth_ixgbevf_dev_init(). Adds more information to the error message in ixgbe_check_mq_mode(). Allows the MAC address of the VF to be set to zero.

Changes in v2:
Do not overwrite the VF perm_add with zero.

Bernard Iremonger (3):
ixgbe: cleanup eth_ixgbevf_dev_uninit
ixgbe: add more information to the error message
ixgbe: fix setting of VF MAC address

 drivers/net/ixgbe/ixgbe_ethdev.c | 29 +++++++++++++----------------
 drivers/net/ixgbe/ixgbe_pf.c     |  7 ++++---
 2 files changed, 17 insertions(+), 19 deletions(-)
Signature · 1 line
2.6.3
#5 lore raw

PATCH v2 1/3 ixgbe: cleanup eth_ixgbevf_dev_uninit

Releasing the rx and tx queues is already done in ixgbe_dev_close() so it does not need to be done in eth_ixgbevf_dev_uninit().

Fixes 2866c5f1b87e ("ixgbe: support port hotplug")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -14
index 3e6fe86..0db7f51 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -1390,7 +1390,6 @@ static int
 eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 {
 	struct ixgbe_hw *hw;
-	unsigned i;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1409,18 +1408,6 @@ eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 	/* Disable the interrupts for VF */
 	ixgbevf_intr_disable(hw);
 
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		ixgbe_dev_rx_queue_release(eth_dev->data->rx_queues[i]);
-		eth_dev->data->rx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_rx_queues = 0;
-
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		ixgbe_dev_tx_queue_release(eth_dev->data->tx_queues[i]);
-		eth_dev->data->tx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_tx_queues = 0;
-
 	rte_free(eth_dev->data->mac_addrs);
 	eth_dev->data->mac_addrs = NULL;
 
Signature · 1 line
2.6.3
#7 lore raw

PATCH v2 3/3 ixgbe: fix setting of VF MAC address

In reply to Bernard Iremonger

Fix setting of VF MAC address to allow a zero address. Reprogram the RAR[0] with a zero MAC address, to ensure ensure that the VF traffic goes to the PF after stop, close and detach of the VF.

Fixes af75078fece3 ("first public release")
Fixes 00e30184daa0 ("ixgbe: add PF support")

ixgbe: don't overwrite perm addr

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++++-
 drivers/net/ixgbe/ixgbe_pf.c     |  7 ++++---
 2 files changed, 13 insertions(+), 4 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +9 -1
index 759177a..5608f67 100644
@@ -3902,6 +3902,7 @@ static void
 ixgbevf_dev_close(struct rte_eth_dev *dev)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ether_addr *addr = (struct ether_addr *)hw->mac.addr;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -3911,7 +3912,14 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
 
 	ixgbe_dev_free_queues(dev);
 
-	/* reprogram the RAR[0] in case user changed it. */
+	memset(addr->addr_bytes, 0, ETHER_ADDR_LEN);
+
+	/**
+	 * reprogram the RAR[0] with a zero mac address.
+	 * to ensure that the VF traffic goes to the PF
+	 * after stop, close and detach of the VF
+	 **/
+
 	ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
 }
 
drivers/net/ixgbe/ixgbe_pf.c +4 -3
index 2ffbd1f..e5cfd05 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -445,8 +445,9 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
 	uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
 
-	if (is_valid_assigned_ether_addr((struct ether_addr*)new_mac)) {
-		rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
+	if (is_unicast_ether_addr((struct ether_addr *)new_mac)) {
+		if (!is_zero_ether_addr((struct ether_addr *)new_mac))
+			rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
 		return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV);
 	}
 	return -1;
Signature · 1 line
2.6.3
#6 lore raw

PATCH v2 2/3 ixgbe: add more information to the error message

In reply to Bernard Iremonger

Add the nb_rx_q and nb_tx_q values to the error message to give details about the error.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +3 -1
index 0db7f51..759177a 100644
@@ -1835,7 +1835,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) ||
 		    (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool)) {
 			PMD_INIT_LOG(ERR, "SRIOV is active,"
-					" queue number must less equal to %d.",
+					" nb_rx_q=%d nb_tx_q=%d queue number"
+					" must be less than or equal to %d.",
+					nb_rx_q, nb_tx_q,
 					RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool);
 			return -EINVAL;
 		}
Signature · 1 line
2.6.3
Acked-by on the v2 series
#8 lore raw
In reply to Bernard Iremonger
Quoted 22 lines

-----Original Message-----
From: Iremonger, Bernard
Sent: Friday, February 26, 2016 2:49 PM
To: [email protected]
Cc: Ananyev, Konstantin; Zhang, Helin; Iremonger, Bernard
Subject: [PATCH 0/3 v2] ixgbe fixes

This patch set implements the following:
Removes code which was duplicated in eth_ixgbevf_dev_init(). Adds more information to the error message in ixgbe_check_mq_mode(). Allows the MAC address of the VF to be set to zero.

Changes in v2:
Do not overwrite the VF perm_add with zero.

Bernard Iremonger (3):
ixgbe: cleanup eth_ixgbevf_dev_uninit
ixgbe: add more information to the error message
ixgbe: fix setting of VF MAC address

Quoted 5 lines
 drivers/net/ixgbe/ixgbe_ethdev.c | 29 +++++++++++++----------------
 drivers/net/ixgbe/ixgbe_pf.c     |  7 ++++---
 2 files changed, 17 insertions(+), 19 deletions(-)

--

Quoted 1 line

2.6.3

#9 lore raw

v3 cover ixgbe fixes

In reply to Bernard Iremonger

This patch set implements the following:
Removes code which was duplicated in eth_ixgbevf_dev_init(). Adds more information to the error message in ixgbe_check_mq_mode(). Removes the VF MAC address in ixgbevf_dev_close().

Changes in v3:
Revised patch 3 to remove the VF MAC address in dev_close().

Changes in v2:
Do not overwrite the VF perm_add with zero.

Bernard Iremonger (3):
ixgbe: cleanup eth_ixgbevf_dev_uninit
ixgbe: add more information to the error message
ixgbe: fix dev_close to remove VF MAC address.

 drivers/net/ixgbe/ixgbe_ethdev.c | 27 ++++++++++-----------------
 drivers/net/ixgbe/ixgbe_pf.c     |  7 ++++---
 2 files changed, 14 insertions(+), 20 deletions(-)
Signature · 1 line
2.6.3
#10 lore raw

PATCH v3 1/3 ixgbe: cleanup eth_ixgbevf_dev_uninit

Releasing the rx and tx queues is already done in ixgbe_dev_close() so it does not need to be done in eth_ixgbevf_dev_uninit().

Fixes 2866c5f1b87e ("ixgbe: support port hotplug")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -14
index 3e6fe86..0db7f51 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -1390,7 +1390,6 @@ static int
 eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 {
 	struct ixgbe_hw *hw;
-	unsigned i;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1409,18 +1408,6 @@ eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 	/* Disable the interrupts for VF */
 	ixgbevf_intr_disable(hw);
 
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		ixgbe_dev_rx_queue_release(eth_dev->data->rx_queues[i]);
-		eth_dev->data->rx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_rx_queues = 0;
-
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		ixgbe_dev_tx_queue_release(eth_dev->data->tx_queues[i]);
-		eth_dev->data->tx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_tx_queues = 0;
-
 	rte_free(eth_dev->data->mac_addrs);
 	eth_dev->data->mac_addrs = NULL;
 
Signature · 1 line
2.6.3
#11 lore raw

PATCH v3 2/3 ixgbe: add more information to the error message

In reply to Bernard Iremonger

Add the nb_rx_q and nb_tx_q values to the error message to give details about the error.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +3 -1
index 0db7f51..759177a 100644
@@ -1835,7 +1835,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) ||
 		    (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool)) {
 			PMD_INIT_LOG(ERR, "SRIOV is active,"
-					" queue number must less equal to %d.",
+					" nb_rx_q=%d nb_tx_q=%d queue number"
+					" must be less than or equal to %d.",
+					nb_rx_q, nb_tx_q,
 					RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool);
 			return -EINVAL;
 		}
Signature · 1 line
2.6.3
#12 lore raw

PATCH v3 3/3 ixgbe: fix dev_close to remove VF MAC address.

In reply to Bernard Iremonger

Call the ixgbevf_remove_mac_addr() function in the ixgbevf_dev_close() function to ensure that the VF traffic goes to the PF after stop, close and detach of the VF.

Fixes af75078fece3 ("first public release")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++--
 drivers/net/ixgbe/ixgbe_pf.c     | 7 ++++---
 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +6 -2
index 759177a..96b42f8 100644
@@ -3911,8 +3911,12 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
 
 	ixgbe_dev_free_queues(dev);
 
-	/* reprogram the RAR[0] in case user changed it. */
-	ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
+	/**
+	 * Remove the VF MAC address ro ensure
+	 * that the VF traffic goes to the PF
+	 * after stop, close and detach of the VF
+	 **/
+	ixgbevf_remove_mac_addr(dev, 0);
 }
 
 static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
drivers/net/ixgbe/ixgbe_pf.c +4 -3
index 2ffbd1f..e5cfd05 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -445,8 +445,9 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
 	uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
 
-	if (is_valid_assigned_ether_addr((struct ether_addr*)new_mac)) {
-		rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
+	if (is_unicast_ether_addr((struct ether_addr *)new_mac)) {
+		if (!is_zero_ether_addr((struct ether_addr *)new_mac))
+			rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
 		return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV);
 	}
 	return -1;
Signature · 1 line
2.6.3
#14 lore raw

PATCH v4 1/3 ixgbe: cleanup eth_ixgbevf_dev_uninit

In reply to Bernard Iremonger

Releasing the rx and tx queues is already done in ixgbe_dev_close() so it does not need to be done in eth_ixgbevf_dev_uninit().

Fixes 2866c5f1b87e ("ixgbe: support port hotplug")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -14
index 3e6fe86..0db7f51 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -1390,7 +1390,6 @@ static int
 eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 {
 	struct ixgbe_hw *hw;
-	unsigned i;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1409,18 +1408,6 @@ eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 	/* Disable the interrupts for VF */
 	ixgbevf_intr_disable(hw);
 
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		ixgbe_dev_rx_queue_release(eth_dev->data->rx_queues[i]);
-		eth_dev->data->rx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_rx_queues = 0;
-
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		ixgbe_dev_tx_queue_release(eth_dev->data->tx_queues[i]);
-		eth_dev->data->tx_queues[i] = NULL;
-	}
-	eth_dev->data->nb_tx_queues = 0;
-
 	rte_free(eth_dev->data->mac_addrs);
 	eth_dev->data->mac_addrs = NULL;
 
Signature · 1 line
2.6.3
#16 lore raw

PATCH v4 3/3 ixgbe: fix dev_close to remove VF MAC address.

In reply to Bernard Iremonger

Call the ixgbevf_remove_mac_addr() function in the ixgbevf_dev_close() function to ensure that the VF traffic goes to the PF after stop, close and detach of the VF.

Fixes af75078fece3 ("first public release")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +6 -2
index 759177a..96b42f8 100644
@@ -3911,8 +3911,12 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
 
 	ixgbe_dev_free_queues(dev);
 
-	/* reprogram the RAR[0] in case user changed it. */
-	ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
+	/**
+	 * Remove the VF MAC address ro ensure
+	 * that the VF traffic goes to the PF
+	 * after stop, close and detach of the VF
+	 **/
+	ixgbevf_remove_mac_addr(dev, 0);
 }
 
 static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
Signature · 1 line
2.6.3
#15 lore raw

PATCH v4 2/3 ixgbe: add more information to the error message

In reply to Bernard Iremonger

Add the nb_rx_q and nb_tx_q values to the error message to give details about the error.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +3 -1
index 0db7f51..759177a 100644
@@ -1835,7 +1835,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) ||
 		    (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool)) {
 			PMD_INIT_LOG(ERR, "SRIOV is active,"
-					" queue number must less equal to %d.",
+					" nb_rx_q=%d nb_tx_q=%d queue number"
+					" must be less than or equal to %d.",
+					nb_rx_q, nb_tx_q,
 					RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool);
 			return -EINVAL;
 		}
Signature · 1 line
2.6.3
#13 lore raw

v4 cover ixgbe fixes

In reply to Bernard Iremonger

This patch set implements the following:
Removes code which was duplicated in eth_ixgbevf_dev_init(). Adds more information to the error message in ixgbe_check_mq_mode(). Removes the VF MAC address in ixgbevf_dev_close().

Changes in v4:
rebase
revert changes to ixgbe_pf.c

Changes in v3:
Revised patch 3 to remove the VF MAC address in dev_close().

Changes in v2:
Do not overwrite the VF perm_add with zero.

Bernard Iremonger (3):
ixgbe: cleanup eth_ixgbevf_dev_uninit
ixgbe: add more information to the error message
ixgbe: fix dev_close to remove VF MAC address.

 drivers/net/ixgbe/ixgbe_ethdev.c | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)
Signature · 1 line
2.6.3
Acked-by on v4 3/3
#17 lore raw

Re: [PATCH v4 3/3] ixgbe: fix dev_close to remove VF MAC address.

In reply to Bernard Iremonger
Quoted 29 lines

-----Original Message-----
From: Iremonger, Bernard
Sent: Tuesday, March 08, 2016 5:10 PM
To: [email protected]
Cc: Ananyev, Konstantin; Lu, Wenzhuo; Wu, Jingjing; Iremonger, Bernard
Subject: [PATCH v4 3/3] ixgbe: fix dev_close to remove VF MAC address.

Call the ixgbevf_remove_mac_addr() function in the ixgbevf_dev_close() function to ensure that the VF traffic goes to the PF after stop, close and detach of the VF.

Fixes af75078fece3 ("first public release")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
index 759177a..96b42f8 100644
@@ -3911,8 +3911,12 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
 
 	ixgbe_dev_free_queues(dev);
 
-	/* reprogram the RAR[0] in case user changed it. */
-	ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);

drivers/net/ixgbe/ixgbe_ethdev.c ixgbevf_dev_close(struct rte_eth_dev *dev)

Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +6 -1
+	/**
+	 * Remove the VF MAC address ro ensure
+	 * that the VF traffic goes to the PF
+	 * after stop, close and detach of the VF
+	 **/
+	ixgbevf_remove_mac_addr(dev, 0);
 }
 
 static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
--
Quoted 1 line

2.6.3

#18 lore raw
In reply to Bernard Iremonger
Quoted 12 lines · Bernard Iremonger

This patch set implements the following:
Removes code which was duplicated in eth_ixgbevf_dev_init(). Adds more information to the error message in ixgbe_check_mq_mode(). Removes the VF MAC address in ixgbevf_dev_close().

Changes in v4:
rebase
revert changes to ixgbe_pf.c

Changes in v3:
Revised patch 3 to remove the VF MAC address in dev_close().

Quoted 8 lines

Changes in v2:
Do not overwrite the VF perm_add with zero.

Bernard Iremonger (3):
ixgbe: cleanup eth_ixgbevf_dev_uninit
ixgbe: add more information to the error message
ixgbe: fix dev_close to remove VF MAC address.

Applied to dpdk-next-net/rel_16_04

/Bruce