From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C0B0A0508; Wed, 13 Apr 2022 10:14:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D29542823; Wed, 13 Apr 2022 10:12:09 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id A4DFB42855 for ; Wed, 13 Apr 2022 10:12:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649837525; x=1681373525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6916rklRMOIDhdIxoTtjqeyYdrSxqKUKN4C0RUzgDyE=; b=lysNo3xc1qtKvY5qV4mlGf4NuJAJxzLAWTXZr7vO91i8m2I1/zKse6nh YXhapsi/yKMQqokQIKanrArbjrZcwfN+tYhz2dtwq5f1JUB9h455AqqAd Gy5XKsiFhq0Ii2VrpbfzRoK271huL+SGuUyTPMAMaalwjYj26EPsOWpZo /Gmys+oI5mppoeT9T+LVA766YilmLWVbmBP9NpFiRSjUHBmCyLLEhbVxX KD2uEslw3ZPStYdy59kKOsj1E9zyN89RMffPiE7sWc+q7FSwvvvJcgLl0 fkaeiHEk3hJ/fjucJ00jZKZOSSmBQ6AVppc/2jmU/cqU5rHGKsWKeXc6F A==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="287630159" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="287630159" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:12:05 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="526847943" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:12:03 -0700 From: Kevin Liu To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, Kevin Liu Subject: [PATCH v2 32/33] testpmd: force flow flush Date: Wed, 13 Apr 2022 16:09:31 +0000 Message-Id: <20220413160932.2074781-33-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220413160932.2074781-1-kevinx.liu@intel.com> References: <20220407105706.18889-1-kevinx.liu@intel.com> <20220413160932.2074781-1-kevinx.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Qi Zhang For mdcf, rte_flow_flush is still need to be invoked even there are no flows be created in current instance. Signed-off-by: Qi Zhang Signed-off-by: Kevin Liu --- app/test-pmd/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index cc8e7aa138..3d40e3e43d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2923,15 +2923,15 @@ port_flow_flush(portid_t port_id) port = &ports[port_id]; - if (port->flow_list == NULL) - return ret; - /* Poisoning to make sure PMDs update it in case of error. */ memset(&error, 0x44, sizeof(error)); if (rte_flow_flush(port_id, &error)) { port_flow_complain(&error); } + if (port->flow_list == NULL) + return ret; + while (port->flow_list) { struct port_flow *pf = port->flow_list->next; -- 2.33.1