Re: [PATCH 4/5] virtio_net: enable premapped mode for merge and small by default

2024-10-24 Thread Xuan Zhuo
On Fri, 18 Oct 2024 16:00:07 +0800, Jason Wang wrote: > On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > > > Currently, the virtio core will perform a dma operation for each > > buffer. Although, the same page may be operated multiple times. > > > > In premapped mod, we can perform only one

Re: [PATCH 1/5] virtio-net: fix overflow inside virtnet_rq_alloc

2024-10-24 Thread Xuan Zhuo
On Fri, 18 Oct 2024 15:41:41 +0800, Jason Wang wrote: > On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > > > When the frag just got a page, then may lead to regression on VM. > > Specially if the sysctl net.core.high_order_alloc_disable value is 1, > > then the frag always get a page when do

Re: [PATCH 1/5] virtio-net: fix overflow inside virtnet_rq_alloc

2024-10-24 Thread Xuan Zhuo
On Thu, 17 Oct 2024 15:42:59 +0200, Paolo Abeni wrote: > > > On 10/14/24 05:12, Xuan Zhuo wrote: > > When the frag just got a page, then may lead to regression on VM. > > Specially if the sysctl net.core.high_order_alloc_disable value is 1, > > then the frag always get a page when do refill. > > >

Re: [PATCH 2/5] virtio_net: introduce vi->mode

2024-10-24 Thread Xuan Zhuo
On Fri, 18 Oct 2024 15:48:38 +0800, Jason Wang wrote: > On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > > > Now, if we want to judge the rx work mode, we have to use such codes: > > > > 1. merge mode: vi->mergeable_rx_bufs > > 2. big mode: vi->big_packets && !vi->mergeable_rx_bufs > > 3.