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 F0DF145B4C; Tue, 22 Oct 2024 21:16:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4A7A40E68; Tue, 22 Oct 2024 21:15:13 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 1CEF8406B6 for ; Tue, 22 Oct 2024 21:13:14 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 009331A11E8; Tue, 22 Oct 2024 21:13:13 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A9CFE1A1AE3; Tue, 22 Oct 2024 21:13:13 +0200 (CEST) Received: from lsv03379.swis.in-blr01.nxp.com (lsv03379.swis.in-blr01.nxp.com [92.120.147.188]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 17DEB183DC03; Wed, 23 Oct 2024 03:13:13 +0800 (+08) From: vanshika.shukla@nxp.com To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Cc: Apeksha Gupta Subject: [v4 38/42] net/dpaa2: store drop priority in mbuf Date: Wed, 23 Oct 2024 00:42:51 +0530 Message-Id: <20241022191256.516818-39-vanshika.shukla@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241022191256.516818-1-vanshika.shukla@nxp.com> References: <20241014120126.170790-1-vanshika.shukla@nxp.com> <20241022191256.516818-1-vanshika.shukla@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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: Apeksha Gupta store drop priority in mbuf from fd. Signed-off-by: Sachin Saxena Signed-off-by: Apeksha Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 1 + drivers/net/dpaa2/dpaa2_rxtx.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index b6cd1f00c4..cd22974752 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -329,6 +329,7 @@ enum qbman_fd_format { #define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF)) #define DPAA2_GET_FD_IVP(fd) (((fd)->simple.bpid_offset & 0x00004000) >> 14) #define DPAA2_GET_FD_OFFSET(fd) (((fd)->simple.bpid_offset & 0x0FFF0000) >> 16) +#define DPAA2_GET_FD_DROPP(fd) (((fd)->simple.ctrl & 0x07000000) >> 24) #define DPAA2_GET_FD_FRC(fd) ((fd)->simple.frc) #define DPAA2_GET_FD_FLC(fd) \ (((uint64_t)((fd)->simple.flc_hi) << 32) + (fd)->simple.flc_lo) diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index fd07a75a40..01e699d282 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -388,6 +388,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd, mbuf->pkt_len = mbuf->data_len; mbuf->port = port_id; mbuf->next = NULL; + mbuf->hash.sched.color = DPAA2_GET_FD_DROPP(fd); rte_mbuf_refcnt_set(mbuf, 1); #ifdef RTE_LIBRTE_MEMPOOL_DEBUG rte_mempool_check_cookies(rte_mempool_from_obj((void *)mbuf), -- 2.25.1