From patchwork Thu Nov 17 03:07:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 119907 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6DCDEA00C2; Thu, 17 Nov 2022 04:07:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A0EE40DDA; Thu, 17 Nov 2022 04:07:57 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 884A340141 for ; Thu, 17 Nov 2022 04:07:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668654475; x=1700190475; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cEiiz7uMBJL1FEnmxc/sg6yl9vi/b/2QnN7uUprxYNM=; b=LKqAfUZVfE7CqBID2c8jANQaaxCgZV/GfYlyfNhuQaegEibuiypixc3Z dnxyT8vHvMYi7QGJMVPhJ9IYqwq58oWgxrrHTIt8j0BHs/lZrqRAmeUu+ aEK6ShyYbUDd4E1Q2M/Kj15yuZsSCugXRFpMsQGnHaU7r7P/rUJUEaUZx lrOPWXw/yr0kfRIUGsupnjCOD47QSqo9ROOYBggOvwHdv82wYdGgOVabx W94oUf5m+2qFEdgAn/5op62tJ5HNg6Q5WfBi8NFCGTowV7BlLXNUSrFer CtsZ/2oTbHYM4g85Z+RTwmqLy4tkExlvnoTcEdS3iUhe2JycVZURF33uA Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="300271482" X-IronPort-AV: E=Sophos;i="5.96,169,1665471600"; d="scan'208";a="300271482" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 19:07:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="764583961" X-IronPort-AV: E=Sophos;i="5.96,169,1665471600"; d="scan'208";a="764583961" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by orsmga004.jf.intel.com with ESMTP; 16 Nov 2022 19:07:53 -0800 From: beilei.xing@intel.com To: jingjing.wu@intel.com Cc: dev@dpdk.org, yuan.peng@intel.com, Beilei Xing Subject: [PATCH] net/idpf: fix port start Date: Thu, 17 Nov 2022 03:07:44 +0000 Message-Id: <20221117030744.45460-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Beilei Xing 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 Acked-by: Qi Zhang Tested-by: Peng, Yuan --- drivers/net/idpf/idpf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) 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;