From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D51621B2EE for ; Wed, 1 Nov 2017 18:23:16 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 01 Nov 2017 10:23:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,329,1505804400"; d="scan'208";a="167935932" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga005.jf.intel.com with ESMTP; 01 Nov 2017 10:23:12 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.28]) by irsmsx105.ger.corp.intel.com ([163.33.3.28]) with mapi id 14.03.0319.002; Wed, 1 Nov 2017 17:20:20 +0000 From: "Jastrzebski, MichalX K" To: "Mrzyglod, DanielX T" , "Doherty, Declan" CC: "dev@dpdk.org" , "Mrzyglod, DanielX T" , "Jain, Deepak K" Thread-Topic: [dpdk-dev] [PATCH] net/bonding: fix setting default aggregator mode to stable Thread-Index: AQHTSbEF2fGetQ6SZk2RNup8bybK1qL/18rQ Date: Wed, 1 Nov 2017 17:20:19 +0000 Message-ID: <60ABE07DBB3A454EB7FAD707B4BB158213C4C20F@IRSMSX109.ger.corp.intel.com> References: <20171020143254.100505-1-danielx.t.mrzyglod@intel.com> In-Reply-To: <20171020143254.100505-1-danielx.t.mrzyglod@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2NhOThhYjAtNWViOS00MmEyLWE5MDgtYjJhZDQxYzVhMzZhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InBCd2VnRDdsZ1I0aFZDXC9iTXBJd0ZhMm9aR0FHVFpcLzNORnpGdXQyMmNHYz0ifQ== x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix setting default aggregator mode to stable 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: Wed, 01 Nov 2017 17:23:17 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Daniel Mrzyglod > Sent: Friday, October 20, 2017 4:33 PM > To: Doherty, Declan > Cc: dev@dpdk.org; Mrzyglod, DanielX T > Subject: [dpdk-dev] [PATCH] net/bonding: fix setting default aggregator > mode to stable >=20 > This patch change default aggregator mode to stable > when using rte_eth_bond_create() >=20 > Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes") >=20 > Signed-off-by: Daniel Mrzyglod > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index 3fbc1b123..df20349d7 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2841,6 +2841,7 @@ bond_probe(struct rte_vdev_device *dev) > struct rte_kvargs *kvlist; > uint8_t bonding_mode, socket_id/*, agg_mode*/; > int arg_count, port_id; > + uint8_t agg_mode; >=20 > if (!dev) > return -EINVAL; > @@ -2898,6 +2899,25 @@ bond_probe(struct rte_vdev_device *dev) > internals =3D rte_eth_devices[port_id].data->dev_private; > internals->kvlist =3D kvlist; >=20 > + > + if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) =3D=3D 1) > { > + if (rte_kvargs_process(kvlist, > + PMD_BOND_AGG_MODE_KVARG, > + > &bond_ethdev_parse_slave_agg_mode_kvarg, > + &agg_mode) !=3D 0) { > + RTE_LOG(ERR, EAL, > + "Failed to parse agg selection mode > for bonded device %s\n", > + name); > + goto parse_error; > + } > + > + if (internals->mode =3D=3D BONDING_MODE_8023AD) > + rte_eth_bond_8023ad_agg_selection_set(port_id, > + agg_mode); > + } else { > + rte_eth_bond_8023ad_agg_selection_set(port_id, > AGG_STABLE); > + } > + > RTE_LOG(INFO, EAL, "Create bonded device %s on port %d in mode > %u on " > "socket %u.\n", name, port_id, > bonding_mode, socket_id); > return 0; > @@ -3064,7 +3084,6 @@ bond_ethdev_configure(struct rte_eth_dev > *dev) > name); > } > if (internals->mode =3D=3D BONDING_MODE_8023AD) > - if (agg_mode !=3D 0) >=20 > rte_eth_bond_8023ad_agg_selection_set(port_id, > agg_mode); > } > -- > 2.13.6 Acked-by: Michal Jastrzebski