From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0A1381C52 for ; Wed, 23 Mar 2016 18:30:12 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 23 Mar 2016 10:30:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,383,1455004800"; d="scan'208";a="943565621" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 23 Mar 2016 10:30:10 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u2NHU9Zl016461; Wed, 23 Mar 2016 17:30:10 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u2NHU9wL011337; Wed, 23 Mar 2016 17:30:09 GMT Received: (from bairemon@localhost) by sivswdev01.ir.intel.com with id u2NHU9L9011333; Wed, 23 Mar 2016 17:30:09 GMT From: Bernard Iremonger To: dev@dpdk.org Cc: ferruh.yigit@intel.com, michalx.k.jastrzebski@intel.com, Bernard Iremonger Date: Wed, 23 Mar 2016 17:30:05 +0000 Message-Id: <1458754205-11261-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] bonding: fix initialisation of current_primary_port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 17:30:13 -0000 The current_primary_port is initialised to an invalid value during bonded device creation. It should be set to a valid value later. This fix sets it to a valid value when the first slave port is added to the bonding device. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Bernard Iremonger --- drivers/net/bonding/rte_eth_bond_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 3fca764..d473ac2 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -352,6 +352,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) /* Make primary slave */ internals->primary_port = slave_port_id; + internals->current_primary_port = slave_port_id; /* Inherit queues settings from first slave */ internals->nb_rx_queues = slave_eth_dev->data->nb_rx_queues; -- 2.6.3