• Maciej Fijalkowski's avatar
    ice: unify xdp_rings accesses · 0bb4f9ec
    Maciej Fijalkowski authored
    There has been a long lasting issue of improper xdp_rings indexing for
    XDP_TX and XDP_REDIRECT actions. Given that currently rx_ring->q_index
    is mixed with smp_processor_id(), there could be a situation where Tx
    descriptors are produced onto XDP Tx ring, but tail is never bumped -
    for example pin a particular queue id to non-matching IRQ line.
    
    Address this problem by ignoring the user ring count setting and always
    initialize the xdp_rings array to be of num_possible_cpus() size. Then,
    always use the smp_processor_id() as an index to xdp_rings array. This
    provides serialization as at given time only a single softirq can run on
    a particular CPU.
    Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Tested-by: default avatarGeorge Kuruvinakunnel <george.kuruvinakunnel@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    0bb4f9ec
ice_txrx_lib.c 8.51 KB