Re: [PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Alexander Duyck
On Fri, Jan 13, 2023 at 4:23 PM Alexander Duyck wrote: > > On Fri, Jan 13, 2023 at 3:37 PM Parav Pandit wrote: > > > > > > > From: Alexander H Duyck > > > Sent: Friday, January 13, 2023 6:24 PM > > > > > > On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > > > > A smallest Ethernet frame

Re: [PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Alexander Duyck
On Fri, Jan 13, 2023 at 3:37 PM Parav Pandit wrote: > > > > From: Alexander H Duyck > > Sent: Friday, January 13, 2023 6:24 PM > > > > On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > > > A smallest Ethernet frame defined by IEEE 802.3 is 60 bytes without > > > any preemble and CRC. > >

RE: [PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Parav Pandit via Virtualization
> From: Alexander H Duyck > Sent: Friday, January 13, 2023 6:24 PM > > On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > > A smallest Ethernet frame defined by IEEE 802.3 is 60 bytes without > > any preemble and CRC. > > > > Current code only checks for minimal 14 bytes of Ethernet

Re: [PATCH net-next 2/2] virtio_net: Reuse buffer free function

2023-01-13 Thread Alexander H Duyck
On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > virtnet_rq_free_unused_buf() helper function to free the buffer > already exists. Avoid code duplication by reusing existing function. > > Signed-off-by: Parav Pandit > --- > drivers/net/virtio_net.c | 8 +--- > 1 file changed, 1

Re: [PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Alexander H Duyck
On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > A smallest Ethernet frame defined by IEEE 802.3 is 60 bytes without any > preemble and CRC. > > Current code only checks for minimal 14 bytes of Ethernet header length. > Correct it to consider the minimum Ethernet frame length. > > Fixes:

[PATCH net-next 2/2] virtio_net: Reuse buffer free function

2023-01-13 Thread Parav Pandit via Virtualization
virtnet_rq_free_unused_buf() helper function to free the buffer already exists. Avoid code duplication by reusing existing function. Signed-off-by: Parav Pandit --- drivers/net/virtio_net.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/virtio_net.c

[PATCH net-next 0/2] Small packet processing handling changes

2023-01-13 Thread Parav Pandit via Virtualization
Hi, These two changes improve the small packet handling. Patch summary: patch-1 fixes the length check by considering Ethernet 60B frame size patch-2 avoids code duplication by reuses existing buffer free helper Please review. Parav Pandit (2): virtio_net: Fix short frame length check

[PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Parav Pandit via Virtualization
A smallest Ethernet frame defined by IEEE 802.3 is 60 bytes without any preemble and CRC. Current code only checks for minimal 14 bytes of Ethernet header length. Correct it to consider the minimum Ethernet frame length. Fixes: 296f96fcfc16 ("Net driver using virtio") Signed-off-by: Parav Pandit

Re: [PATCH v6 4/4] vdpa_sim: Implement resume vdpa op

2023-01-13 Thread Stefano Garzarella
On Tue, Jan 03, 2023 at 11:51:08AM +0100, sebastien.bo...@intel.com wrote: From: Sebastien Boeuf Implement resume operation for vdpa_sim devices, so vhost-vdpa will offer that backend feature and userspace can effectively resume the device. Signed-off-by: Sebastien Boeuf ---

Re: [PATCH v6 3/4] vhost-vdpa: uAPI to resume the device

2023-01-13 Thread Stefano Garzarella
On Tue, Jan 03, 2023 at 11:51:07AM +0100, sebastien.bo...@intel.com wrote: From: Sebastien Boeuf This new ioctl adds support for resuming the device from userspace. This is required when trying to restore the device in a functioning state after it's been suspended. It is already possible to

Re: [PATCH v6 2/4] vhost-vdpa: Introduce RESUME backend feature bit

2023-01-13 Thread Stefano Garzarella
On Tue, Jan 03, 2023 at 11:51:06AM +0100, sebastien.bo...@intel.com wrote: From: Sebastien Boeuf Userspace knows if the device can be resumed or not by checking this feature bit. It's only exposed if the vdpa driver backend implements the resume() operation callback. Userspace trying to

Re: [PATCH v6 1/4] vdpa: Add resume operation

2023-01-13 Thread Stefano Garzarella
On Tue, Jan 03, 2023 at 11:51:05AM +0100, sebastien.bo...@intel.com wrote: From: Sebastien Boeuf Add a new operation to allow a vDPA device to be resumed after it has been suspended. Trying to resume a device that wasn't suspended will result in a no-op. This operation is optional. If it's