• Vadim Lomovtsev's avatar
    net: thunderx: add MAC address filter tracking for LMAC · 3a34ecfd
    Vadim Lomovtsev authored
    The ThunderX NIC has two Ethernet Interfaces (BGX) each of them could has
    up to four Logical MACs configured. Each of BGX has 32 filters to be
    configured for filtering ingress packets. The number of filters available
    to particular LMAC is from 8 (if we have four LMACs configured per BGX)
    up to 32 (in case of only one LMAC is configured per BGX).
    
    At the same time the NIC could present up to 128 VFs to OS as network
    interfaces, each of them kernel will configure with set of MAC addresses
    for filtering. So to prevent dupes in BGX filter registers from different
    network interfaces it is required to cache and track all filter
    configuration requests prior to applying them onto BGX filter registers.
    
    This commit is to update LMAC structures with control fields to
    allocate/releasing filters tracking list along with implementing
    dmac array allocate/release per LMAC.
    Signed-off-by: default avatarVadim Lomovtsev <Vadim.Lomovtsev@cavium.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3a34ecfd
thunder_bgx.c 38.9 KB