On Tue, 10 Nov 2009 08:03:28 pm Amit Shah wrote: > On (Tue) Nov 10 2009 [16:57:30], Rusty Russell wrote: > > > > Rather than assume a single port, add a 'struct ports' with an array > > of ports. Currently, there's always only one, but that will change. > > Hey Rusty,
Hi Amit, > > -static struct port *__devinit alloc_port(u32 vtermno) > > +static struct ports *__devinit alloc_ports(unsigned int num) > > This will have to be changed when we add support for hotplug. So instead > of doing this, just have a linked list from the start? No, for hotplug I think we just shift from a dangling array to a pointer to an array. That changes the alloc and free functions, but *not* change to any users. > Other than this, the series is good; I can base my patches on top of > these. Excellent! > I guess we can also assign a number to each vdev that gets probed so > that sysfs and debugfs entries for ports can be put in their > vdev-specific directories, like > > /sys/class/virtio-console0/vcon0/name That makes sense; we do the same with virtio_blk IIRC. > Also, if you think the send/receive workqueues are fine and we move to > those, they will have to be introduced slightly earlier in this patch > series. So far I haven't seen a need for them. This is simple and works. But if a later patch needs it, we do it and then maybe shuffle the patch backwards in the sequence. (As you can tell, I don't use git for development :) Thanks, Rusty. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization