From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5E1AA2B99 for ; Mon, 25 Sep 2017 18:32:48 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2017 09:32:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,437,1500966000"; d="scan'208,217";a="1018190167" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 25 Sep 2017 09:32:43 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Sep 2017 09:32:29 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.215]) by FMSMSX154.amr.corp.intel.com ([169.254.6.54]) with mapi id 14.03.0319.002; Mon, 25 Sep 2017 09:32:29 -0700 From: "Eads, Gage" To: "Van Haaren, Harry" CC: "dev@dpdk.org" Thread-Topic: Re: [dpdk-dev] [PATCH] example: add new service cores sample application Thread-Index: AdM2GOP/29a/eCBhQF++AnNGuzNSfg== Date: Mon, 25 Sep 2017 16:32:29 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E13FF25E2@fmsmsx101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODcwMzkwZjAtOGE4Ny00ZWUzLWE1OWQtMzU3YzVlZmU3ODMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZ2dzR0WWFXV2grVm9QWlZ5aFZESFNYV1gzVTl1UzNScmswYUJhcUpXQTA9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] example: add new service cores sample application 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, 25 Sep 2017 16:32:49 -0000 Neat example. Looks good overall, I just have a few questions. > +#define PROFILE_SERVICE_PER_CORE 8 Any reason not to use 5 here? That would remove a few zeroes from the profi= les[] initializers. > +static int > +apply_profile(int profile_id) > +{ > + uint32_t i; > + uint32_t s; > + int ret; > + struct profile *p =3D &profiles[profile_id]; > + const uint8_t core_off =3D 1; > + > + for (i =3D 0; i < p->num_cores; i++) { > + ret =3D rte_service_lcore_add(i + core_off); > + if (ret && ret !=3D -EALREADY) > + printf("core %d added ret %d\n",= i + core_off, ret); I'm wondering if this and the other printfs in this function should be rte_= panics? These seem like fatal errors. > + > + ret =3D rte_service_lcore_start(i + core_off); > + if (ret && ret !=3D -EALREADY) > + printf("core %d start ret %d\n",= i + core_off, ret); > + > + for (s =3D 0; s < NUM_SERVICES; s++) { > + if (rte_service_map_lcore_set(s,= i + core_off, > + p-= >cores[i].mapped_services[s])) > + rte_panic("failed= to map lcore to 1\n"); What does '1' refer to here? Perhaps it should be: rte_panic("failed to map= lcore %d to %s\n", i + core_off, services[s].name);