Re: [PATCH] vhost-user: rewrite vu_dispatch with if-else

2024-09-10 Thread Michael S. Tsirkin
On Sun, Aug 04, 2024 at 10:23:53PM +0800, luzhixing12345 wrote: > rewrite with if-else instead of goto > > and I have a question, in two incorrent cases > > - need reply but no reply_requested > - no need reply but has reply_requested > > should we call vu_panic or print warning message? this i

Re: [PATCH] vhost-user: rewrite vu_dispatch with if-else

2024-08-05 Thread Michael S. Tsirkin
On Mon, Aug 05, 2024 at 11:27:27PM +0800, luzhixing12345 wrote: > Signed-off-by: luzhixing12345 > > >On Sun, Aug 04, 2024 at 10:23:53PM GMT, luzhixing12345 wrote: > >>rewrite with if-else instead of goto > > > >Why? > > > >IMHO was better before this patch with a single error path. > > I think t

Re: [PATCH] vhost-user: rewrite vu_dispatch with if-else

2024-08-05 Thread luzhixing12345
Signed-off-by: luzhixing12345 >On Sun, Aug 04, 2024 at 10:23:53PM GMT, luzhixing12345 wrote: >>rewrite with if-else instead of goto > >Why? > >IMHO was better before this patch with a single error path. I think this if-else version is more clear for me, and it's good to keep things the way they

Re: [PATCH] vhost-user: rewrite vu_dispatch with if-else

2024-08-05 Thread Stefano Garzarella
On Sun, Aug 04, 2024 at 10:23:53PM GMT, luzhixing12345 wrote: rewrite with if-else instead of goto Why? IMHO was better before this patch with a single error path. and I have a question, in two incorrent cases - need reply but no reply_requested - no need reply but has reply_requested sho

[PATCH] vhost-user: rewrite vu_dispatch with if-else

2024-08-04 Thread luzhixing12345
rewrite with if-else instead of goto and I have a question, in two incorrent cases - need reply but no reply_requested - no need reply but has reply_requested should we call vu_panic or print warning message? --- subprojects/libvhost-user/libvhost-user.c | 39 +-- subprojec