On Fri, Oct 2, 2015 at 4:02 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > On Fri, Oct 02, 2015 at 09:55:01AM -0400, Marc-André Lureau wrote: >> >> >> ----- Original Message ----- >> > On Thu, Oct 01, 2015 at 07:24:00PM +0200, marcandre.lur...@redhat.com >> > wrote: >> > > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c >> > > index 840f443..da66b64 100644 >> > > --- a/hw/net/vhost_net.c >> > > +++ b/hw/net/vhost_net.c >> > > @@ -388,6 +388,18 @@ void vhost_net_cleanup(struct vhost_net *net) >> > > g_free(net); >> > > } >> > > >> > > +int vhost_net_notify_migration_done(struct vhost_net *net, char* >> > > mac_addr) >> > > +{ >> > > + const VhostOps *vhost_ops = net->dev.vhost_ops; >> > > + int r = -1; >> > > + >> > > + if (vhost_ops->vhost_migration_done) { >> > > + r = vhost_ops->vhost_migration_done(&net->dev, mac_addr); >> > > + } >> > > + >> > > + return r; >> > > +} >> > > + >> > > bool vhost_net_virtqueue_pending(VHostNetState *net, int idx) >> > > { >> > > return vhost_virtqueue_pending(&net->dev, idx); >> > > @@ -479,6 +491,11 @@ void vhost_net_virtqueue_mask(VHostNetState *net, >> > > VirtIODevice *dev, >> > > { >> > > } >> > > >> > > +int vhost_net_notify_migration_done(struct vhost_net *net) >> > > +{ >> > > + return -1; >> > > +} >> > > + >> > > VHostNetState *get_vhost_net(NetClientState *nc) >> > > { >> > > return 0; >> > >> > This signature does not fit the one above. >> > How was this tested? >> > >> >> Good question, I totally missed that. It has been there since Thibaut v6 >> series. >> >> I guess we all compile with CONFIG_VHOST_NET, and adding the missing char* >> mac_addr is enough to fix this. > > You will catch this if you build and test all targets. > > -- > MST
Sorry for the omission. I have tested some QEMU configuration but all of them to test my feature. The add of the missing char* mac_addr is sufficient : in this case the function will be compliant with its definition set in the include/net/vhost_net.h file. Next time I will build all targets to avoid this kind of errors. Thibaut.