common/cnxk: support loop mode for cn98xx
authorHarman Kalra <hkalra@marvell.com>
Fri, 30 Jul 2021 16:10:07 +0000 (21:40 +0530)
committerJerin Jacob <jerinj@marvell.com>
Tue, 28 Sep 2021 10:09:14 +0000 (12:09 +0200)
commit70cf1c63429e5d775a0637ad3a7bd84ae5c18449
tree6ce88d5a74025a9d8a492744ea4968d670aaa695
parentf27c7d7c05977c829c874018226c85f015f86515
common/cnxk: support loop mode for cn98xx

In case of cn98xx, 2 NIX blocks and 4 LBK blocks are present. Moreover
AF VFs are alternatively attached to NIX0 and NIX1 to ensure load
balancing. To support loopback functionality between pairs NIX0/NIX1
are attached to LBK1/LBK2 for transmission/reception respectively.
But in this default configuration NIX blocks cannot receive the
packets they sent from the same LBK, which is an important requirement
as some ODP applications only uses one AF VF for loopback functionality.
To support this scenario, NIX0 can use LBK0 (NIX1 - LBK3) by setting a
loop flag while making LF alloc mailbox request.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_mbox.h
drivers/common/cnxk/roc_nix.c