On Tue, 27 May 2014 10:33:02 -0300 Ariel Rodriguez <arodriguez at callistech.com> 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