From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1D5A916E for ; Mon, 30 Apr 2018 15:43:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2018 06:43:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,346,1520924400"; d="scan'208";a="51142504" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by fmsmga001.fm.intel.com with ESMTP; 30 Apr 2018 06:43:57 -0700 From: Bernard Iremonger To: dev@dpdk.org, thomas@monjalon.net Cc: Bernard Iremonger Date: Mon, 30 Apr 2018 14:43:54 +0100 Message-Id: <1525095834-10386-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] examples/flow_classify: fix failure in port_init function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 13:44:00 -0000 The port_init function calls the rte_eth_dev_is_valid_port function. This function now returns 1 if the port state is attached. A return value of 1 now means a valid port. Fixes: a9dbe1802226 ("fix ethdev port id validation") Signed-off-by: Bernard Iremonger --- examples/flow_classify/flow_classify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c index 3b087ce..6412fe4 100644 --- a/examples/flow_classify/flow_classify.c +++ b/examples/flow_classify/flow_classify.c @@ -200,7 +200,7 @@ struct rte_flow_query_count count = { struct rte_eth_dev_info dev_info; struct rte_eth_txconf txconf; - if (rte_eth_dev_is_valid_port(port)) + if (!rte_eth_dev_is_valid_port(port)) return -1; rte_eth_dev_info_get(port, &dev_info); -- 1.9.1