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] [day] [month] [year] [list]
Date:   Mon, 27 Apr 2020 21:51:50 +0200
From:   Daniel Borkmann <>
To:     Jesper Dangaard Brouer <>,
        Jeff Kirsher <>,
        Alexander Duyck <>,,,,,,
        Toke Høiland-Jørgensen <>,
        Daniel Borkmann <>,
        Alexei Starovoitov <>,
        John Fastabend <>,
        David Ahern <>,
        Willem de Bruijn <>,
        Ilias Apalodimas <>,
        Lorenzo Bianconi <>,
        Saeed Mahameed <>,
Subject: Re: [PATCH net-next 23/33] ixgbe: add XDP frame size to driver

On 4/22/20 6:09 PM, Jesper Dangaard Brouer wrote:
> This driver uses different memory models depending on PAGE_SIZE at
> compile time. For PAGE_SIZE 4K it uses page splitting, meaning for
> normal MTU frame size is 2048 bytes (and headroom 192 bytes). For
> larger MTUs the driver still use page splitting, by allocating
> order-1 pages (8192 bytes) for RX frames. For PAGE_SIZE larger than
> 4K, driver instead advance its rx_buffer->page_offset with the frame
> size "truesize".
> For XDP frame size calculations, this mean that in PAGE_SIZE larger
> than 4K mode the frame_sz change on a per packet basis. For the page
> split 4K PAGE_SIZE mode, xdp.frame_sz is more constant and can be
> updated once outside the main NAPI loop.
> The default setting in the driver uses build_skb(), which provides
> the necessary headroom and tailroom for XDP-redirect in RX-frame
> (in both modes).
> There is one complication, which is legacy-rx mode (configurable via
> ethtool priv-flags). There are zero headroom in this mode, which is a
> requirement for XDP-redirect to work. The conversion to xdp_frame
> (convert_to_xdp_frame) will detect this insufficient space, and
> xdp_do_redirect() call will fail. This is deemed acceptable, as it
> allows other XDP actions to still work in legacy-mode. In
> legacy-mode + larger PAGE_SIZE due to lacking tailroom, we also
> accept that xdp_adjust_tail shrink doesn't work.
> Cc:
> Cc: Jeff Kirsher <>
> Cc: Alexander Duyck <>
> Signed-off-by: Jesper Dangaard Brouer <>

Alexander/Jeff, in case the ixgbe/i40e/ice changes look good to you,
please ack.


Powered by blists - more mailing lists