Re: [dpdk-dev] [PATCH v4] vhost: check header for legacy dequeue offload

2021-06-16 Thread Wang, Xiao W
, rather than uint16_t. I will prepare a new version. BRs, Xiao > -Original Message- > From: David Marchand > Sent: Tuesday, June 15, 2021 3:57 PM > To: Wang, Xiao W > Cc: Maxime Coquelin ; Xia, Chenbo > ; Jiang, Cheng1 ; dev > ; dpdk stable > Subject: Re: [dpd

Re: [dpdk-dev] [PATCH v4] vhost: check header for legacy dequeue offload

2021-06-15 Thread David Marchand
On Tue, Jun 15, 2021 at 9:06 AM Xiao Wang wrote: > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c > index 8da8a86a10..351ff0a841 100644 > --- a/lib/vhost/virtio_net.c > +++ b/lib/vhost/virtio_net.c > @@ -2259,44 +2259,64 @@ virtio_net_with_host_offload(struct virtio_net *dev) >

[dpdk-dev] [PATCH v4] vhost: check header for legacy dequeue offload

2021-06-15 Thread Xiao Wang
When parsing the virtio net header and packet header for dequeue offload, we need to perform sanity check on the packet header to ensure: - No out-of-boundary memory access. - The packet header and virtio_net header are valid and aligned. Fixes: d0cf91303d73 ("vhost: add Tx offload capabilitie