From patchwork Fri Feb 10 08:26:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satheesh Paul Antonysamy X-Patchwork-Id: 123664 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 4EBD041C5D; Fri, 10 Feb 2023 09:26:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD7E442BAC; Fri, 10 Feb 2023 09:26:27 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2DE6040EE6; Fri, 10 Feb 2023 09:26:25 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31A7rfif032640; Fri, 10 Feb 2023 00:26:24 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=Ksgn9ZDAWs7NOeMLgc0ws+tzty5kDe8kvCTDTirN1mY=; b=b5p9wNfljQkmICjubpbWRjOuTdOWax6pNSlIdBByFfKTfcLWHy8F/4KKqdWdcAMq9xsj Bv5mZ94E43GKBK9zT9P03TlUb8u6P700klx58AP8+eHeFeNnOyge7tmP822fGmMAUgol 2HbbTZBc1PDbVRf7w7RLCf7MUMdVDlwFbsCtRx/6wYjrzddF40EJM8VGrbOqwcwsYzwo +BbBAXuACoTTMGC/feMW1T3azxbUBDZEsNirrJxBnKg1PGs7yFBHAqqPO6s58xZqunt/ SbppdTBwo4aei4rqx35lbjsNRUCyEPXJdfQ3OzN+DBlPsGdOiooAcx81jeqy7O47i+8Z lA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nnf7wgdew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 00:26:24 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 10 Feb 2023 00:26:22 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Fri, 10 Feb 2023 00:26:22 -0800 Received: from satheeshpaullabpc.. (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 2A4075B6941; Fri, 10 Feb 2023 00:26:19 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , Subject: [dpdk-dev] [PATCH v2 1/3] common/cnxk: fix channel mask for SDP interfaces Date: Fri, 10 Feb 2023 13:56:14 +0530 Message-ID: <20230210082616.3075424-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230210042121.3013558-1-psatheesh@marvell.com> References: <20230210042121.3013558-1-psatheesh@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: yFJzRwA9VRCxucc6NQBpyJp3xd4oyfBt X-Proofpoint-GUID: yFJzRwA9VRCxucc6NQBpyJp3xd4oyfBt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-10_03,2023-02-09_03,2023-02-09_01 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 From: Satheesh Paul Fix channel mask of SDP interfaces on CN10K. Fixes: f13756633330 ("common/cnxk: support setting channel mask for SDP interfaces") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar K --- v2: * Corrected "Fixes:" tag with 12 char sha1 drivers/common/cnxk/roc_npc.c | 9 +++++++-- drivers/common/cnxk/roc_npc_priv.h | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index c872548230..9edccb5258 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -1380,8 +1380,13 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, /* By default set the channel and mask to cover * the whole SDP channel range. */ - npc->sdp_channel = (uint16_t)NIX_CHAN_SDP_CH_START; - npc->sdp_channel_mask = (uint16_t)NIX_CHAN_SDP_CH_START; + if (roc_model_is_cn10k()) { + npc->sdp_channel = (uint16_t)CN10K_SDP_CH_START; + npc->sdp_channel_mask = (uint16_t)CN10K_SDP_CH_MASK; + } else { + npc->sdp_channel = (uint16_t)NIX_CHAN_SDP_CH_START; + npc->sdp_channel_mask = (uint16_t)NIX_CHAN_SDP_CH_START; + } } } diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h index 2a7d3137fb..aa27228354 100644 --- a/drivers/common/cnxk/roc_npc_priv.h +++ b/drivers/common/cnxk/roc_npc_priv.h @@ -77,6 +77,9 @@ #define NPC_LFLAG_LC_OFFSET (NPC_LTYPE_OFFSET_START + 6) #define NPC_LTYPE_LC_OFFSET (NPC_LTYPE_OFFSET_START + 8) +#define CN10K_SDP_CH_START 0x80 +#define CN10K_SDP_CH_MASK 0xF80 + struct npc_action_vtag_info { uint16_t vlan_id; uint16_t vlan_ethtype;