From patchwork Wed Jul 18 11:12:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 43183 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 48F1B2B9D; Wed, 18 Jul 2018 13:19:00 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D5087160; Wed, 18 Jul 2018 13:18:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2018 04:18:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,370,1526367600"; d="scan'208";a="67992458" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by fmsmga002.fm.intel.com with ESMTP; 18 Jul 2018 04:18:52 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: declan.doherty@intel.com, chas3@att.com, thomas@monjalon.net, Radu Nicolau , stable@dpdk.org Date: Wed, 18 Jul 2018 12:12:01 +0100 Message-Id: <1531912321-19544-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] net/bonding: fix invalid port id error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" setting up the bonding options before calling rte_eth_dev_probing_finish triggers an invalid port id error because of port state not set, or set unused Fixes: fbe90cdd776c ("ethdev: add probing finish function") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau Signed-off-by: Chas Williams Acked-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fc4d4fd..1320cfd 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3238,6 +3238,7 @@ bond_probe(struct rte_vdev_device *dev) internals = rte_eth_devices[port_id].data->dev_private; internals->kvlist = kvlist; + rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) { if (rte_kvargs_process(kvlist, @@ -3257,7 +3258,6 @@ bond_probe(struct rte_vdev_device *dev) rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE); } - rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on " "socket %u.", name, port_id, bonding_mode, socket_id); return 0;