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 1A601A0508; Wed, 13 Apr 2022 11:14:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9E6742856; Wed, 13 Apr 2022 11:12:32 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id C341C4285F for ; Wed, 13 Apr 2022 11:12:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649841151; x=1681377151; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6916rklRMOIDhdIxoTtjqeyYdrSxqKUKN4C0RUzgDyE=; b=SRXJvRjKrHTtF+G7BW/wxeAmr2/qNCXVIxH8kj76yy/cCDAQgYjoRvaU rThDvzbue33i0Vwbt326mBWBbsO+Kx0Hl1ckvdxLNbmyjRUP2pcpVVbYZ ouvcAEUS+jzuD2E5OzDY6mEnG3HMMNduWZ1QKO4ie2gqn5VGULpzL4Ng4 /lZXQzwRKK8f5/ANlohmq1QkMsG8+jQ6DAp4qv98+/aGXT+BPytxt5IZk oZtPi38vQyS7OtkDxEuJi44U0Kn/N9LGaqmbzLr9AG59mKU1/bo5zWA61 1PhvUr0Ovnc+vBjAFr2D9r88Co2wSHpGlgipEwluJcYOlAyTMaBkyLAKV Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="262058431" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="262058431" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 02:12:30 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="552122908" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 02:12:28 -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 v3 21/22] testpmd: force flow flush Date: Wed, 13 Apr 2022 17:10:29 +0000 Message-Id: <20220413171030.2231163-22-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220413171030.2231163-1-kevinx.liu@intel.com> References: <20220413160932.2074781-1-kevinx.liu@intel.com> <20220413171030.2231163-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