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 25BBDA0C4B; Tue, 2 Nov 2021 19:39:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12BA7410E5; Tue, 2 Nov 2021 19:39:04 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 020D94069F for ; Tue, 2 Nov 2021 19:39:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635878342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NXqL+hH9I8ksTCshnkYZR3eB40JBrJiOdKZ5Jx1HICw=; b=VbeB4TXWFNKBGq/Jc0TMLqVgVspUPnm8QFHX1+gIuXbWTy6aAFMizgUsw+IjjPGbB21qCX 0PRO2qM6Ayc9hAXxu65EbCjxAyf0P0lRFDfcdbISFn0xDdO9pDjtW0rYDUqpfPXHYOy/Sv aitkNzKA6INh4ySq7bzuIUGuWTRc9+M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-ZdMtP8ZxOIa3P5xYFGm0CA-1; Tue, 02 Nov 2021 14:38:59 -0400 X-MC-Unique: ZdMtP8ZxOIa3P5xYFGm0CA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C252A8066EB; Tue, 2 Nov 2021 18:38:57 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB1875F4F7; Tue, 2 Nov 2021 18:38:55 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: getelson@nvidia.com, ferruh.yigit@intel.com, thomas@monjalon.net, Xiaoyun Li , Viacheslav Ovsiienko Date: Tue, 2 Nov 2021 19:38:48 +0100 Message-Id: <20211102183848.32422-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH] app/testpmd: remove warning on flex flow flush 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 Sender: "dev" Building DPDK without JSON, warnings get displayed when stopping testpmd without entering any flex flow rule. Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands") Signed-off-by: David Marchand --- app/test-pmd/cmd_flex_item.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c index 45103e45a8..337dcdd565 100644 --- a/app/test-pmd/cmd_flex_item.c +++ b/app/test-pmd/cmd_flex_item.c @@ -415,6 +415,8 @@ port_flex_item_flush(portid_t port_id) uint16_t i; for (i = 0; i < FLEX_MAX_PARSERS_NUM; i++) { + if (flex_items[port_id][i] == NULL) + continue; flex_item_destroy(port_id, i); flex_items[port_id][i] = NULL; } -- 2.23.0