patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ixgbe: fix setting VF MAC address
@ 2020-03-10  2:58 Guinan Sun
  2020-03-11  7:29 ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
  2020-03-11  9:06 ` [dpdk-stable] [PATCH v2] " Guinan Sun
  0 siblings, 2 replies; 4+ messages in thread
From: Guinan Sun @ 2020-03-10  2:58 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, Qiming Yang, Guinan Sun, stable

This problem occurs because clear_rar is executed at the wrong time,
 so PF cannot receive data normally.
This patch is used to modify the calling logic of clear_rar.

Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index afae21f81..67b5bef44 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
 				new_mac, vf, IXGBE_RAH_AV);
 	} else {
-		hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
-		vf_info[vf].mac_count = 0;
+		if (vf_info[vf].mac_count) {
+			hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
+			vf_info[vf].mac_count = 0;
+		}
 	}
 	return 0;
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix setting VF MAC address
  2020-03-10  2:58 [dpdk-stable] [PATCH] net/ixgbe: fix setting VF MAC address Guinan Sun
@ 2020-03-11  7:29 ` Ye Xiaolong
  2020-03-11  9:06 ` [dpdk-stable] [PATCH v2] " Guinan Sun
  1 sibling, 0 replies; 4+ messages in thread
From: Ye Xiaolong @ 2020-03-11  7:29 UTC (permalink / raw)
  To: Guinan Sun; +Cc: dev, Wenzhuo Lu, Qiming Yang, stable

Hi, Guinan

On 03/10, Guinan Sun wrote:
>This problem occurs because clear_rar is executed at the wrong time,
> so PF cannot receive data normally.

Could you elaborate what problem you've encountered, and how this patch solves it?

Thanks,
Xiaolong

>This patch is used to modify the calling logic of clear_rar.
>
>Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
>Cc: stable@dpdk.org
>
>Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
>---
> drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
>index afae21f81..67b5bef44 100644
>--- a/drivers/net/ixgbe/ixgbe_pf.c
>+++ b/drivers/net/ixgbe/ixgbe_pf.c
>@@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
> 		hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
> 				new_mac, vf, IXGBE_RAH_AV);
> 	} else {
>-		hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
>-		vf_info[vf].mac_count = 0;
>+		if (vf_info[vf].mac_count) {
>+			hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
>+			vf_info[vf].mac_count = 0;
>+		}
> 	}
> 	return 0;
> }
>-- 
>2.17.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-stable] [PATCH v2] net/ixgbe: fix setting VF MAC address
  2020-03-10  2:58 [dpdk-stable] [PATCH] net/ixgbe: fix setting VF MAC address Guinan Sun
  2020-03-11  7:29 ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
@ 2020-03-11  9:06 ` Guinan Sun
  2020-03-13  1:09   ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
  1 sibling, 1 reply; 4+ messages in thread
From: Guinan Sun @ 2020-03-11  9:06 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, Qiming Yang, Guinan Sun, stable

The reason why PF cannot receive data normally is that
vf performed the clear_rar operation through dev close
without adding a mac address. 
This will cause the association between the index and
rx address set by VMDq to be cancelled,thus affecting
the data reception of PF.
The correction method is to add a check action, and do
not perform the set_rar operation without adding a mac
address to prevent affecting the reception of data.

Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
v2 changes:
* Modify commit log
---
 drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index afae21f81..67b5bef44 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
 				new_mac, vf, IXGBE_RAH_AV);
 	} else {
-		hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
-		vf_info[vf].mac_count = 0;
+		if (vf_info[vf].mac_count) {
+			hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
+			vf_info[vf].mac_count = 0;
+		}
 	}
 	return 0;
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/ixgbe: fix setting VF MAC address
  2020-03-11  9:06 ` [dpdk-stable] [PATCH v2] " Guinan Sun
@ 2020-03-13  1:09   ` Ye Xiaolong
  0 siblings, 0 replies; 4+ messages in thread
From: Ye Xiaolong @ 2020-03-13  1:09 UTC (permalink / raw)
  To: Guinan Sun; +Cc: dev, Wenzhuo Lu, Qiming Yang, stable

On 03/11, Guinan Sun wrote:
>The reason why PF cannot receive data normally is that
>vf performed the clear_rar operation through dev close
>without adding a mac address. 
>This will cause the association between the index and
>rx address set by VMDq to be cancelled,thus affecting
>the data reception of PF.
>The correction method is to add a check action, and do
>not perform the set_rar operation without adding a mac
>address to prevent affecting the reception of data.
>
>Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
>Cc: stable@dpdk.org
>
>Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
>---
>v2 changes:
>* Modify commit log
>---
> drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
>index afae21f81..67b5bef44 100644
>--- a/drivers/net/ixgbe/ixgbe_pf.c
>+++ b/drivers/net/ixgbe/ixgbe_pf.c
>@@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
> 		hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
> 				new_mac, vf, IXGBE_RAH_AV);
> 	} else {
>-		hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
>-		vf_info[vf].mac_count = 0;
>+		if (vf_info[vf].mac_count) {
>+			hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
>+			vf_info[vf].mac_count = 0;
>+		}
> 	}
> 	return 0;
> }
>-- 
>2.17.1
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel, Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-13  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  2:58 [dpdk-stable] [PATCH] net/ixgbe: fix setting VF MAC address Guinan Sun
2020-03-11  7:29 ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2020-03-11  9:06 ` [dpdk-stable] [PATCH v2] " Guinan Sun
2020-03-13  1:09   ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong

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