From patchwork Mon Jan 18 10:50:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liron Himi X-Patchwork-Id: 86781 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CCFEA0A04; Mon, 18 Jan 2021 11:50:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 378CB140D19; Mon, 18 Jan 2021 11:50:55 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5506A140D17; Mon, 18 Jan 2021 11:50:53 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10IAoB9J030584; Mon, 18 Jan 2021 02:50:52 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=aVnXar8iFyJvBsdPp9P1Oqp1CRtntwZG5GScw/HaUQk=; b=EfCHqhHXo2HAOce4l9oJX3+ETfpDjJbnB03jOozixDuJUwwkNkv1ZlHbTT4NLBNAmq8F WCZx3Rvom/veheqO4N/EuZcZD39SC2eRkmfn53jpkSFZs0F3srXEJThPRt2bglIG0xre Slxx2MPe84GnC7046N07LOkCLW99bjPNAE7XZVnV4MLF2ijERDaknkrVus8twCAnNVsH WUmfRXrtHkdaZXtrQ89ydqRWyVKGUUHnr/uE2pSUBapmvT2yed0BCeKGfvw9UACZX4He Z8DQmdRvgC+NwLge9zaLgA6Xn8nCHncFiXysIWERtEJSCk1LjyIVvCDRN4m0wu/qzdl8 oA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 363xcubdcy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Jan 2021 02:50:52 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 18 Jan 2021 02:50:51 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 18 Jan 2021 02:50:50 -0800 Received: from pt-lxl0023.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 18 Jan 2021 02:50:49 -0800 From: To: CC: , , Liron Himi , "Kiran Kumar Kokkilagadda" Date: Mon, 18 Jan 2021 12:50:31 +0200 Message-ID: <20210118105031.474-1-lironh@marvell.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-18_11:2021-01-18, 2021-01-18 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: move PF-func location for egress X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Liron Himi pf-func is 16bit but the current reserved location used in tx action is 8bits. moved it to bits 63-48. Fixes: 32e6aaa97 ("net/octeontx2: support flow parse actions") Cc: stable@dpdk.org Signed-off-by: Liron Himi Reviewed-by: Kiran Kumar Kokkilagadda --- drivers/net/octeontx2/otx2_flow_parse.c | 5 ++++- drivers/net/octeontx2/otx2_flow_utils.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c index 476195d63..e9b940f6c 100644 --- a/drivers/net/octeontx2/otx2_flow_parse.c +++ b/drivers/net/octeontx2/otx2_flow_parse.c @@ -1090,7 +1090,10 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev, set_pf_func: /* Ideally AF must ensure that correct pf_func is set */ - flow->npc_action |= (uint64_t)pf_func << 4; + if (attr->egress) + flow->npc_action |= (uint64_t)pf_func << 48; + else + flow->npc_action |= (uint64_t)pf_func << 4; return 0; diff --git a/drivers/net/octeontx2/otx2_flow_utils.c b/drivers/net/octeontx2/otx2_flow_utils.c index 9a0a5f9fb..7ed86ba74 100644 --- a/drivers/net/octeontx2/otx2_flow_utils.c +++ b/drivers/net/octeontx2/otx2_flow_utils.c @@ -944,7 +944,7 @@ otx2_flow_mcam_alloc_and_write(struct rte_flow *flow, struct otx2_mbox *mbox, req->entry_data.kw[0] |= flow_info->channel; req->entry_data.kw_mask[0] |= (BIT_ULL(12) - 1); } else { - uint16_t pf_func = (flow->npc_action >> 4) & 0xffff; + uint16_t pf_func = (flow->npc_action >> 48) & 0xffff; pf_func = htons(pf_func); req->entry_data.kw[0] |= ((uint64_t)pf_func << 32);