net/idpf: fix port start

Message ID 20221117030744.45460-1-beilei.xing@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/idpf: fix port start |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Xing, Beilei Nov. 17, 2022, 3:07 a.m. UTC
  From: Beilei Xing <beilei.xing@intel.com>

Port can't start successfully if stopping port and starting port
again.
This patch fixes port start by initialization.

Fixes: e9ff6df15b9a ("net/idpf: stop before closing device")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/idpf/idpf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Qi Zhang Nov. 17, 2022, 4:19 a.m. UTC | #1
> -----Original Message-----
> From: beilei.xing@intel.com <beilei.xing@intel.com>
> Sent: Thursday, November 17, 2022 11:08 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Peng, Yuan <yuan.peng@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH] net/idpf: fix port start
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> Port can't start successfully if stopping port and starting port again.
> This patch fixes port start by initialization.
> 
> Fixes: e9ff6df15b9a ("net/idpf: stop before closing device")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Peng, Yuan Nov. 17, 2022, 8:33 a.m. UTC | #2
Tested-by: Peng, Yuan <yuan.peng@intel.com>

> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Thursday, November 17, 2022 11:08 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Peng, Yuan <yuan.peng@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH] net/idpf: fix port start
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> Port can't start successfully if stopping port and starting port again.
> This patch fixes port start by initialization.
> 
> Fixes: e9ff6df15b9a ("net/idpf: stop before closing device")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
  

Patch

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index 0b90f885a8..20f088eb80 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -552,6 +552,8 @@  idpf_dev_start(struct rte_eth_dev *dev)
 	uint16_t req_vecs_num;
 	int ret;
 
+	vport->stopped = 0;
+
 	if (dev->data->mtu > vport->max_mtu) {
 		PMD_DRV_LOG(ERR, "MTU should be less than %d", vport->max_mtu);
 		ret = -EINVAL;