[Devel] [PATCH rh7] ve/kobj: Send events per VE instead of all net-namespaces broadcasting

Cyrill Gorcunov gorcunov at virtuozzo.com
Wed Jun 3 07:46:20 PDT 2015


On Wed, Jun 03, 2015 at 05:34:51PM +0300, Andrew Vagin wrote:
> > +#ifndef CONFIG_VE
> >  static LIST_HEAD(uevent_sock_list);
> elif
> #define uevent_sock_list (get_exec_env()->_uevent_sock_list)
> 
> and remove the next ifdef..endif in this file
> 
> What do you think about this way?

I did this way in first place, but then found that it get
used in kobject_uevent_env_one only, so looks like doesn't
worh it. But sure, can update if you prefer.

> > +#ifdef CONFIG_VE
> > +	list_for_each_entry(ue_sk, &net->owner_ve->_uevent_sock_list, list) {
> 
> A container can have more than one network namespace, we need to do this
> only if &net->owner_ve->netns == net

Nope. owner_ve set up from get_exec_env, which means every container
gather all net's @ue_sk into one list.

> 
> > +#else
> >  	list_for_each_entry(ue_sk, &uevent_sock_list, list) {
> > +#endif
> >  		if (sock_net(ue_sk->sk) == net)
> >  			goto found;
> >  	}



More information about the Devel mailing list