Re: Questions on XDP
From: Eric Dumazet <hidden>
Date: 2017-02-18 17:41:18
On Sat, 2017-02-18 at 17:34 +0100, Jesper Dangaard Brouer wrote:
On Thu, 16 Feb 2017 14:36:41 -0800 John Fastabend [off-list ref] wrote:quoted
On 17-02-16 12:41 PM, Alexander Duyck wrote:quoted
So I'm in the process of working on enabling XDP for the Intel NICs and I had a few questions so I just thought I would put them out here to try and get everything sorted before I paint myself into a corner. So my first question is why does the documentation mention 1 frame per page for XDP?Yes, XDP defines upfront a memory model where there is only one packet per page[1], please respect that! This is currently used/needed for fast-direct recycling of pages inside the driver for XDP_DROP and XDP_TX, _without_ performing any atomic refcnt operations on the page. E.g. see mlx4_en_rx_recycle().
XDP_DROP does not require having one page per frame. (Look after my recent mlx4 patch series if you need to be convinced) Only XDP_TX is. This requirement makes XDP useless (very OOM likely) on arches with 64K pages.