• Alexander Lobakin's avatar
    idpf: use libeth Rx buffer management for payload buffer · 74d1412a
    Alexander Lobakin authored
    idpf uses Page Pool for data buffers with hardcoded buffer lengths of
    4k for "classic" buffers and 2k for "short" ones. This is not flexible
    and does not ensure optimal memory usage. Why would you need 4k buffers
    when the MTU is 1500?
    Use libeth for the data buffers and don't hardcode any buffer sizes. Let
    them be calculated from the MTU for "classics" and then divide the
    truesize by 2 for "short" ones. The memory usage is now greatly reduced
    and 2 buffer queues starts make sense: on frames <= 1024, you'll recycle
    (and resync) a page only after 4 HW writes rather than two.
    Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    74d1412a
idpf_singleq_txrx.c 31 KB