[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel][Pv-ops][PATCH 3/4 v2] Netback: Multiple tasklets support
> > +static void netbk_add_netif(struct xen_netbk *netbk, int group_nr, > > + struct xen_netif *netif) > > +{ > > + int i; > > + int min_netfront_count; > > + int min_group = 0; > > + spin_lock(&netbk->group_operation_lock); > > + min_netfront_count = netbk[0].netfront_count; > > + for (i = 0; i < group_nr; i++) { > > + if (netbk[i].netfront_count < min_netfront_count) { > > + min_group = i; > > + min_netfront_count = netbk[i].netfront_count; > > > > Should you have a 'break' here? I am not sure if it makes sense to go > > through all of the tasklets to set the min_group and > > min_netfrount_count to the last one? > > To find the minimum count, I think it should go through all the tasklsets. Ahh yes (duh!). I missed the 'min_netfrount_count' assigment! That makes much more sense. .. snip .. > > Say you have 7 VIFs and only 4 VCPUs, are these netfront_count values > > correct? > > > > netbk[0].netfront_count == 1; /* vif0 added */ > > netbk[3].netfront_count == 1; /* vif1 added */ > > netbk[2].netfront_count == 1; /* vif2 added */ > > netbk[1].netfront_count == 1; /* vif3 added */ > > netbk[0].netfront_count == 2; /* vif4 added */ > > netbk[3].netfront_count == 2; /* vif5 added */ > > netbk[2].netfront_count == 2; /* vif6 added */ > > Basically it is true, but the order may be changed. <nods> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |