Re: [PATCH net-next] vhost: switch to use new message format

2018-08-05 Thread Jason Wang
On 2018年08月03日 15:59, Michael S. Tsirkin wrote: diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index a502f1a..6f6c42d 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -315,6 +315,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, vq->log_addr = -1ull;

Re: [PATCH net-next] vhost: switch to use new message format

2018-08-05 Thread Jason Wang
On 2018年08月05日 04:21, David Miller wrote: From: Jason Wang Date: Fri, 3 Aug 2018 15:04:51 +0800 So fixing this by introducing a new message type with an explicit 32bit reserved field after type like: struct vhost_msg_v2 { int type; __u32 reserved; Please use fixed sized

Re: [PATCH net-next] vhost: switch to use new message format

2018-08-04 Thread David Miller
From: Jason Wang Date: Fri, 3 Aug 2018 15:04:51 +0800 > So fixing this by introducing a new message type with an explicit > 32bit reserved field after type like: > > struct vhost_msg_v2 { > int type; > __u32 reserved; Please use fixed sized types consistently. Use 's32' instead

Re: [PATCH net-next] vhost: switch to use new message format

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 03:04:51PM +0800, Jason Wang wrote: > We use to have message like: > > struct vhost_msg { > int type; > union { > struct vhost_iotlb_msg iotlb; > __u8 padding[64]; > }; > }; > > Unfortunately, there will be a hole of 32bit in