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 BEE25AFD8 for ; Tue, 27 May 2014 20:31:45 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 27 May 2014 11:31:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,921,1392192000"; d="scan'208";a="545668420" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 27 May 2014 11:31:52 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.105]) by IRSMSX103.ger.corp.intel.com ([169.254.3.58]) with mapi id 14.03.0123.003; Tue, 27 May 2014 19:31:52 +0100 From: "Dumitrescu, Cristian" To: Stephen Hemminger , Ariel Rodriguez Thread-Topic: [dpdk-dev] Please any one who can help me with librte_sched Thread-Index: AQHPecmYSS2eNvVQx06dGbslrPqXoJtUvA8w Date: Tue, 27 May 2014 18:31:51 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891261B1BE888@IRSMSX102.ger.corp.intel.com> References: <20140527093457.7f5d9746@nehalam.linuxnetplumber.net> In-Reply-To: <20140527093457.7f5d9746@nehalam.linuxnetplumber.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Please any one who can help me with librte_sched 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: Tue, 27 May 2014 18:31:46 -0000 Hi Ariel, What's wrong with calling rte_sched_subport_config() and rte_sched_pipe_con= fig() during run-time? This assumes that: 1. Port initialization is done, which includes the following: a) the number of subports, pipes per subport are fixed b) the queues are all created and their size is fixed c) the pipe profiles are defined d) Basically the maximal data structures get created (maximum number of sup= ports, pipes and queues) with no run-time changes allowed, apart for the ba= ndwidth related parameters. Queues that do not receive packets are not used= now, they will be used as soon as they get packets. The packets-to-queues = mapping logic can change over time, as well as the level of activity for di= fferent users/queues. 2. The CPU core calling the subport/pipe config functions is the same as th= e core doing enque/dequeue for this port (for thread safety reasons). a) As you say, the management core can send update requests to the core run= ning the scheduler, with the latter sampling the request queue regularly an= d performing the updates. Regards, Cristian -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger Sent: Tuesday, May 27, 2014 5:35 PM To: Ariel Rodriguez Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Please any one who can help me with librte_sched On Tue, 27 May 2014 10:33:02 -0300 Ariel Rodriguez wrote: > Hello , this is my third mail , the previous mails have not been answered > yet. > = > I justo need someone explains to me how the librte_sched framework behav= es > in a specific situation. > = > I have a managment application , this connects with a ring with the tx > core, when a user applies some configuration of the bandwith mangement , > the tx core read the message in the ring parse the configuration in a > rte_port_params struct , subport_params and pipe_params, then creates a n= ew > rte_sched from scratch , and then changes the pointer of the current > rte_sched_port currently doing scheduling and then the code execurte > rte_sched_port_free() for the unreference (reference by temporal pointer) > rte_sched_port . This is the only way i found for applying dinamic > configuration or changes to the qos framework. > So, with this, what happens with the packets attached to the old > rte_sched_port while is deleted? are those lost packets inside the > rte_sched_port generates memory leaks? how can i recover this packets _ > just dequeing from the port scheduler? Where the port scheduler indicates > empty packets in the queu state? > = > Is there a better way to achieve this kind of behaviour? i just need to > update the rte_sched_port configuration dinamically, and i want to change > the current pipe configuration and sub port configuration also. > = > Regards . If you need to do dynamic changes, I would recommend using an RCU type algorithm where you exchange in new parameters and then cleanup/free after a grace period. See http://lttng.org/urcu -------------------------------------------------------------- Intel Shannon Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 Business address: Dromore House, East Park, Shannon, Co. Clare This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others = is strictly prohibited. If you are not the intended recipient, please conta= ct the sender and delete all copies.