Bug 1323
Summary: | NIC RSS Symmetric hash is not working on Marvell OcteonTx2 (otx2) platform when configuring 4 tuple | ||
---|---|---|---|
Product: | DPDK | Reporter: | Siva (pingtosiva) |
Component: | ethdev | Assignee: | Jerin (jerinjacobk) |
Status: | UNCONFIRMED --- | ||
Severity: | major | CC: | jerinjacobk |
Priority: | Normal | ||
Version: | 20.11 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Siva
2023-11-14 18:31:18 CET
Please make sure kernel has following patch commit 72e192a163d0959d4e74342850a31b241baba422 Author: Jerin Jacob <jerinj@marvell.com> Date: Wed Aug 25 17:48:39 2021 +0530 octeontx2-af: Allow to configure flow tag LSB byte as RSS adder Before C0 HW revision, The RSS adder was computed based the following static formula. rss_adder<7:0> = flow_tag<7:0> ^ flow_tag<15:8> ^ flow_tag<23:16> ^ flow_tag<31:24> The above scheme has the following drawbacks: 1) It is not in line with other standard NIC behavior. 2) There can be an SW use case where SW can compute the hash upfront using Toeplitz function and predict the queue selection to optimize some packet lookup function. The nonstandard way of doing XOR makes the consumer to not predict the queue selection. C0 HW revision onwards, The HW can configure the rss_adder<7:0> as flow_tag<7:0> to align with standard NICs. This patch adds an option to select legacy RSS adder mode vs standard NIC behavior by setting NIX_LF_RSS_TAG_LSB_AS_ADDER flag. Since this bit field is used as reserved in old HW revisions, No need to have an additional HW version check. Signed-off-by: Jerin Jacob <jerinj@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> And DPDK code is selecting NIX_LF_RSS_TAG_LSB_AS_ADDER. Also, it works from C0 HW as mentioned in the linux commit log. static int nix_lf_alloc(struct otx2_eth_dev *dev, uint32_t nb_rxq, uint32_t nb_txq) { struct otx2_mbox *mbox = dev->mbox; struct nix_lf_alloc_req *req; struct nix_lf_alloc_rsp *rsp; int rc; req = otx2_mbox_alloc_msg_nix_lf_alloc(mbox_get(mbox)); if (req == NULL) { rc = -EINVAL; goto fail; } req->rq_cnt = nb_rxq; req->sq_cnt = nb_txq; req->cq_cnt = nb_rxq; /* XQE_SZ should be in Sync with NIX_CQ_ENTRY_SZ */ RTE_BUILD_BUG_ON(NIX_CQ_ENTRY_SZ != 128); req->xqe_sz = NIX_XQESZ_W16; req->rss_sz = dev->rss_info.rss_size; req->rss_grps = NIX_RSS_GRPS; req->npa_func = otx2_npa_pf_func_get(); req->sso_func = otx2_sso_pf_func_get(); req->rx_cfg = BIT_ULL(35 /* DIS_APAD */); if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM)) { req->rx_cfg |= BIT_ULL(37 /* CSUM_OL4 */); req->rx_cfg |= BIT_ULL(36 /* CSUM_IL4 */); } req->rx_cfg |= (BIT_ULL(32 /* DROP_RE */) | BIT_ULL(33 /* Outer L2 Length */) | BIT_ULL(38 /* Inner L4 UDP Length */) | BIT_ULL(39 /* Inner L3 Length */) | BIT_ULL(40 /* Outer L4 UDP Length */) | BIT_ULL(41 /* Outer L3 Length */)); if (dev->rss_tag_as_xor == 0) req->flags = NIX_LF_RSS_TAG_LSB_AS_ADDER; |