• Brett Creeley's avatar
    ionic: Cleanups in the Tx hotpath code · 238a0f7c
    Brett Creeley authored
    Buffer DMA mapping happens in ionic_tx_map_skb() and this function is
    called from ionic_tx() and ionic_tx_tso(). If ionic_tx_map_skb()
    succeeds, but a failure is encountered later in ionic_tx() or
    ionic_tx_tso() we aren't unmapping the buffers. This can be fixed in
    ionic_tx() by changing functions it calls to return void because they
    always return 0. For ionic_tx_tso(), there's an actual possibility that
    we leave the buffers mapped, so fix this by introducing the helper
    function ionic_tx_desc_unmap_bufs(). This function is also re-used
    in ionic_tx_clean().
    
    Fixes: 0f3154e6 ("ionic: Add Tx and Rx handling")
    Signed-off-by: default avatarBrett Creeley <brett@pensando.io>
    Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    238a0f7c
ionic_txrx.c 31 KB