• Vladimir Oltean's avatar
    net: enetc: move skb creation into enetc_build_skb · a800abd3
    Vladimir Oltean authored
    We need to build an skb from two code paths now: from the plain RX data
    path and from the XDP data path when the verdict is XDP_PASS.
    
    Create a new enetc_build_skb function which contains the essential steps
    for building an skb based on the first and last positions of buffer
    descriptors within the RX ring.
    
    We also squash the enetc_process_skb function into enetc_build_skb,
    because what that function did wasn't very meaningful on its own.
    
    The "rx_frm_cnt++" instruction has been moved around napi_gro_receive
    for cosmetic reasons, to be in the same spot as rx_byte_cnt++, which
    itself must be before napi_gro_receive, because that's when we lose
    ownership of the skb.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a800abd3
enetc.c 42.8 KB