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>
This commit is contained in:
parent
f27c7d7c05
commit
70cf1c6342
@ -723,6 +723,7 @@ struct nix_lf_alloc_req {
|
||||
uint64_t __io rx_cfg; /* See NIX_AF_LF(0..127)_RX_CFG */
|
||||
uint64_t __io way_mask;
|
||||
#define NIX_LF_RSS_TAG_LSB_AS_ADDER BIT_ULL(0)
|
||||
#define NIX_LF_LBK_BLK_SEL BIT_ULL(1)
|
||||
uint64_t flags;
|
||||
};
|
||||
|
||||
|
@ -148,9 +148,12 @@ roc_nix_lf_alloc(struct roc_nix *roc_nix, uint32_t nb_rxq, uint32_t nb_txq,
|
||||
req->npa_func = idev_npa_pffunc_get();
|
||||
req->sso_func = idev_sso_pffunc_get();
|
||||
req->rx_cfg = rx_cfg;
|
||||
if (roc_nix_is_lbk(roc_nix) && roc_nix->enable_loop &&
|
||||
roc_model_is_cn98xx())
|
||||
req->flags = NIX_LF_LBK_BLK_SEL;
|
||||
|
||||
if (!roc_nix->rss_tag_as_xor)
|
||||
req->flags = NIX_LF_RSS_TAG_LSB_AS_ADDER;
|
||||
req->flags |= NIX_LF_RSS_TAG_LSB_AS_ADDER;
|
||||
|
||||
rc = mbox_process_msg(mbox, (void *)&rsp);
|
||||
if (rc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user