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 8EB89A0508; Thu, 7 Apr 2022 05:02:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9A66428C4; Thu, 7 Apr 2022 05:00:01 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id EDD45428DD for ; Thu, 7 Apr 2022 04:59:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649300400; x=1680836400; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6916rklRMOIDhdIxoTtjqeyYdrSxqKUKN4C0RUzgDyE=; b=YEICs3ziRITT99lmAGtTLSupT8689bJK3NXcHFFEJjbkM4GoGp3KzNj7 ZbhD/8LTSGskutja3zeB6DIj0SyRghzXyytKXQppsRs4/2USGvLkgW69T s2/vbSVI1C77tzUbsWj8HN2FL/R+WMx1Aole6X+02mBJWhf+MP1hGZ4YZ sVFZdVH8ZbAZ1nYzIm4l+PCT9SmGoycrnj7rIOAXjmqyqfOSkXfnd7QCV cfnQWdCM63hIja4+HHpeJqpV2AjKiTuhBDjCz9iVc5VHZPsAK6YG7u07m 7aGBTym9zg88m2e+2DyhEUWfl8qSFylIZzljGu62/xf2lLgUC0P2KHzfO Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="248738521" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="248738521" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:59:59 -0700 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="570850872" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:59:57 -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 38/39] testpmd: force flow flush Date: Thu, 7 Apr 2022 10:57:05 +0000 Message-Id: <20220407105706.18889-39-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220407105706.18889-1-kevinx.liu@intel.com> References: <20220407105706.18889-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