• Sunil Goutham's avatar
    net: thunderx: Fix IOMMU translation faults · 83abb7d7
    Sunil Goutham authored
    ACPI support has been added to ARM IOMMU driver in 4.10 kernel
    and that has resulted in VNIC interfaces throwing translation
    faults when kernel is booted with ACPI as driver was not using
    DMA API. This patch fixes the issue by using DMA API which inturn
    will create translation tables when IOMMU is enabled.
    
    Also VNIC doesn't have a seperate receive buffer ring per receive
    queue, so there is no 1:1 descriptor index matching between CQE_RX
    and the index in buffer ring from where a buffer has been used for
    DMA'ing. Unlike other NICs, here it's not possible to maintain dma
    address to virt address mappings within the driver. This leaves us
    no other choice but to use IOMMU's IOVA address conversion API to
    get buffer's virtual address which can be given to network stack
    for processing.
    Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    83abb7d7
nicvf_queues.h 10.6 KB