• Alexander Duyck's avatar
    ixgbe: Refactor busy poll socket code to address multiple issues · adc81090
    Alexander Duyck authored
    This change addresses several issues in the current ixgbe implementation of
    busy poll sockets.
    
    First was the fact that it was possible for frames to be delivered out of
    order if they were held in GRO.  This is addressed by flushing the GRO buffers
    before releasing the q_vector back to the idle state.
    
    The other issue was the fact that we were having to take a spinlock on
    changing the state to and from idle.  To resolve this I have replaced the
    state value with an atomic and use atomic_cmpxchg to change the value from
    idle, and a simple atomic set to restore it back to idle after we have
    acquired it.  This allows us to only use a locked operation on acquiring the
    vector without a need for a locked operation to release it.
    Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
    Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    adc81090
ixgbe_lib.c 33.9 KB