From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by dpdk.org (Postfix) with ESMTP id A4593AFCD for ; Tue, 27 May 2014 18:34:49 +0200 (CEST) Received: by mail-pb0-f52.google.com with SMTP id rr13so9566704pbb.39 for ; Tue, 27 May 2014 09:35:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Tkm63VcI5pwCIUL6R20ZMs9RWzj2oFNAVbfIbY0EMDU=; b=WA85bBNnvo0rMi31lKQvZ26nVyzB5MO/cMPQUtvAS5aj7n2JWfVjcdMoC5j0dCTjzW X4l+eBGa1yTOLU9jXqpD3v0lD+5befDCDCkUgVS2X7e46/CectKsc4tcrfhJZO3303mD nQqJfjbXenhm10yNyhnEmZV4i/K1KtB7FEqGgUwt+ZFY2PZsIMGwFYEmizAkuXAbrtkx b5ptfvGOtYSZZOm++trNp+NOE8EUEeGElom6tm8hnzjbeSdOgNd/9PSANdv/JMMbTM41 3WvOw2t/ervA6xaoHJN3RlclKuBkwPKNtMHK66bmwSkzFaOMGJyr4EcL/ekCl0n5J2cE skgw== X-Gm-Message-State: ALoCoQlMD+vytc7BNRY/uyL45/CEo23eScs1mtjWlnMqCCTeQFM5jJ6lVChq55fQQLestkjxA+Tk X-Received: by 10.68.202.230 with SMTP id kl6mr38242622pbc.55.1401208500145; Tue, 27 May 2014 09:35:00 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id ga1sm24082471pbb.82.2014.05.27.09.34.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 27 May 2014 09:34:59 -0700 (PDT) Date: Tue, 27 May 2014 09:34:57 -0700 From: Stephen Hemminger To: Ariel Rodriguez Message-ID: <20140527093457.7f5d9746@nehalam.linuxnetplumber.net> In-Reply-To: References: X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 16:34:50 -0000 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 behaves > 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 new > 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