lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 May 2020 16:21:15 +0800
From:   Jason Wang <>
To:     "Michael S. Tsirkin" <>
        Jesper Dangaard Brouer <>
Subject: Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation
 for mergeable buffers

On 2020/5/6 下午3:37, Michael S. Tsirkin wrote:
> On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote:
>> We should not exclude headroom and tailroom when XDP is set. So this
>> patch fixes this by initializing the truesize from PAGE_SIZE when XDP
>> is set.
>> Cc: Jesper Dangaard Brouer<>
>> Signed-off-by: Jason Wang<>
> Seems too aggressive, we do not use up the whole page for the size.

For XDP yes, we do:

static unsigned int get_mergeable_buf_len(struct receive_queue *rq,
                       struct ewma_pkt_len *avg_pkt_len,
                       unsigned int room)
     const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf);
     unsigned int len;

     if (room)
         return PAGE_SIZE - room;



Powered by blists - more mailing lists