From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7434841C5B for ; Fri, 10 Feb 2023 05:21:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67B0F427F2; Fri, 10 Feb 2023 05:21:32 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 83C4640EE3; Fri, 10 Feb 2023 05:21:29 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31A2ifr4010916; Thu, 9 Feb 2023 20:21:28 -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=hhBlIuioxgTrKEPPCGw3ogS8oVR3yLbdz4A8191Ognc=; b=aFHFypPx7DO17MXa0bvVzzPzLqGwVw8PoJAesHvzV8eJAofU7aVU9pX7Kz6nsyFdZ3yI 66/iZXOVgDNaXr6BCaCg41LpcoAJXwnKJamsBNAXNI1HtulByS9Vo5D7ulBKOj57Pnlu E+5G8GMcZl10d+rLI/l42Yv+n1jUJCz1uS9UL8WiBqWQP/DZb1amiLU88l/BFu4ix3Ue rDUBQBCGH/FlN5w4QwhqxjfKWdEInj7RJiWtXGi9YQ7DTgJ3CxWEXKsIUtVz+toy5o5N I9H9w3aAtxS9nE4jDAC2+F8qsdG5QF30sMOmAGfdBCaHbVrT90/46exGiOUBA4Jc1sxP DQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nn71cjegk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 09 Feb 2023 20:21:28 -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; Thu, 9 Feb 2023 20:21:26 -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; Thu, 9 Feb 2023 20:21:26 -0800 Received: from satheeshpaullabpc.. (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 2D93F5B693D; Thu, 9 Feb 2023 20:21:23 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , Subject: [dpdk-dev] [PATCH 1/3] common/cnxk: fix channel mask for SDP interfaces Date: Fri, 10 Feb 2023 09:51:19 +0530 Message-ID: <20230210042121.3013558-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: YJpUQff3OqmuEZfk90-qmCPiCZgnYdgy X-Proofpoint-GUID: YJpUQff3OqmuEZfk90-qmCPiCZgnYdgy 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_01,2023-02-09_03,2023-02-09_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Satheesh Paul Fix channel mask of SDP interfaces on CN10K. Fixes: f137566333 ("common/cnxk: support setting channel mask for SDP interfaces") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar K --- 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; -- 2.35.3