• M
    ice: Limit the ice_add_rx_frag to frag addition · 712edbbb
    Maciej Fijalkowski 提交于
    Refactor ice_fetch_rx_buf and ice_add_rx_frag in a way that we have
    standalone functions that do either the skb construction or frag
    addition to previously constructed skb.
    
    The skb handling between rx_bufs is spread among various functions. The
    ice_get_rx_buf will retrieve the skb pointer from rx_buf and if it is a
    NULL pointer then we do the ice_construct_skb, otherwise we add a frag
    to the current skb via ice_add_rx_frag. Then, on the ice_put_rx_buf the
    skb pointer that belongs to rx_buf will be cleared. Moving further, if
    the current frame is not EOP frame we assign the current skb to the
    rx_buf that is pointed by updated next_to_clean indicator.
    
    What is more during the buffer reuse let's assign each member of
    ice_rx_buf individually so we avoid the unnecessary copy of skb.
    
    Last but not least, this logic split will allow us for better code reuse
    when adding a support for build_skb.
    Signed-off-by: NMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
    Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
    712edbbb
ice_txrx.c 51.3 KB