• Björn Töpel's avatar
    i40e: tweak page counting for XDP_REDIRECT · 8ce29c67
    Björn Töpel authored
    This commit tweaks the page counting for XDP_REDIRECT to function
    properly. XDP_REDIRECT support will be added in a future commit.
    
    The current page counting scheme assumes that the reference count
    cannot decrease until the received frame is sent to the upper layers
    of the networking stack. This assumption does not hold for the
    XDP_REDIRECT action, since a page (pointed out by xdp_buff) can have
    its reference count decreased via the xdp_do_redirect call.
    
    To work around that, we now start off by a large page count and then
    don't allow a refcount less than two.
    Signed-off-by: default avatarBjörn Töpel <bjorn.topel@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    8ce29c67
i40e_txrx.c 104 KB