Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-28 Thread Jason Wang
On Sun, May 28, 2023 at 7:39 PM Michael S. Tsirkin wrote: > > On Fri, May 26, 2023 at 09:31:34AM +0800, Jason Wang wrote: > > On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin wrote: > > > > > > On Thu, May 25, 2023 at 11:43:34AM +0800, Jason Wang wrote: > > > > On Wed, May 24, 2023 at 5:15 PM

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-28 Thread Jason Wang
On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin wrote: > > On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrote: > > This patch validate > > validates > > > the used buffer length provided by the device > > before trying to use it. > > before returning it to caller > > > This is done by

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-28 Thread Mike Christie
On 5/27/23 8:41 PM, Eric W. Biederman wrote: > Mike Christie writes: > >> On 5/23/23 7:15 AM, Oleg Nesterov wrote: >>> >>> Now the main question. Whatever we do, SIGKILL/SIGSTOP/etc can come right >>> before we call work->fn(). Is it "safe" to run this callback with >>> signal_pending() or

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 09:31:34AM +0800, Jason Wang wrote: > On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin wrote: > > > > On Thu, May 25, 2023 at 11:43:34AM +0800, Jason Wang wrote: > > > On Wed, May 24, 2023 at 5:15 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Wed, May 24, 2023

Re: [RFC] virtio-net: support modern-transtional devices

2023-05-28 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 02:15:42AM +0800, Zhu Lingshan wrote: > Current virtio-net only probes a device with VIRITO_ID_NET == 1. > > For a modern-transtional virtio-net device which has a transtional > device id 0x1000 and acts as a modern device, current virtio-pci > modern driver will assign

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrote: > This patch validate validates > the used buffer length provided by the device > before trying to use it. before returning it to caller > This is done by remembering the in buffer > length in a dedicated array during virtqueue_add(),

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-28 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 08:35:01PM +0800, Liang Chen wrote: > On Fri, May 26, 2023 at 2:51 PM Jason Wang wrote: > > > > On Fri, May 26, 2023 at 1:46 PM Liang Chen > > wrote: > > > > > > The implementation at the moment uses one page per packet in both the > > > normal and XDP path. > > > > It's

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 02:38:54PM +0800, Jason Wang wrote: > On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > > > "private" of buffer page is currently used for big mode to chain pages. > > But in mergeable mode, that offset of page could mean something else, > > e.g. when page_pool page is

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-28 Thread Michael S. Tsirkin
On Sat, May 27, 2023 at 12:11:25AM +0800, kernel test robot wrote: > Hi Liang, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: >

Re: [PATCH net-next 3/5] virtio_net: Add page pool fragmentation support

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:19PM +0800, Liang Chen wrote: > To further enhance performance, implement page pool fragmentation > support and introduce a module parameter to enable or disable it. > > In single-core vm testing environments, there is an additional performance > gain observed in the

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:18PM +0800, Liang Chen wrote: > The implementation at the moment uses one page per packet in both the > normal and XDP path. In addition, introducing a module parameter to enable > or disable the usage of page pool (disabled by default). > > In single-core vm testing

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 01:46:17PM +0800, Liang Chen wrote: > "private" of buffer page is currently used for big mode to chain pages. > But in mergeable mode, that offset of page could mean something else, > e.g. when page_pool page is used instead. So excluding mergeable mode to > avoid such a