• Alexander Lobakin's avatar
    libeth: add Rx buffer management · e6c91556
    Alexander Lobakin authored
    
    
    Add a couple intuitive helpers to hide Rx buffer implementation details
    in the library and not multiplicate it between drivers. The settings are
    sorta optimized for 100G+ NICs, but nothing really HW-specific here.
    Use the new page_pool_dev_alloc() to dynamically switch between
    split-page and full-page modes depending on MTU, page size, required
    headroom etc. For example, on x86_64 with the default driver settings
    each page is shared between 2 buffers. Turning on XDP (not in this
    series) -> increasing headroom requirement pushes truesize out of 2048
    boundary, leading to that each buffer starts getting a full page.
    The "ceiling" limit is %PAGE_SIZE, as only order-0 pages are used to
    avoid compound overhead. For the above architecture, this means maximum
    linear frame size of 3712 w/o XDP.
    Not that &libeth_buf_queue is not a complete queue/ring structure for
    now, rather a shim, but eventually the libeth-enabled drivers will move
    to it, with iavf being the first one.
    Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    e6c91556
rx.h 6.57 KB