• Naveen Mamindlapalli's avatar
    octeontx2-af: add support for multicast/promisc packet replication feature · 967db352
    Naveen Mamindlapalli authored
    Currently, multicast packet filtering is accomplished by installing
    MCAM rule that matches all-multicast MAC address and has its
    NPC_RX_ACTION set to unicast to PF. Similarly promisc feature is
    achieved by installing MCAM rule that matches all the traffic received
    by the channel and unicast the packets to PF. This approach only applies
    to PF and is not scalable across VFs.
    
    This patch adds support for PF/VF multicast and promisc feature by
    reserving NIX_RX_MCE_S entries from the global MCE list allocated
    during NIX block initialization. The NIX_RX_MCE_S entries create a
    linked list with a flag indicating the end of the list, and each entry
    points to a PF_FUNC (either PF or VF). When a packet NPC_RX_ACTION is
    set to MCAST, the corresponding NIX_RX_MCE_S list is traversed and the
    packet is queued to each PF_FUNC available on the list.
    
    The PF or VF driver adds the multicast/promisc packet match entry and
    updates the MCE list with correspondng PF_FUNC. When a PF or VF interface
    is disabled, the corresponding NIX_RX_MCE_S entry is removed from the
    MCE list and the MCAM entry will be disabled if the list is empty.
    Signed-off-by: default avatarNaveen Mamindlapalli <naveenm@marvell.com>
    Signed-off-by: default avatarSunil Kovvuri Goutham <Sunil.Goutham@marvell.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    967db352
rvu_npc.c 88.1 KB