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 2F75FA0543; Fri, 7 Oct 2022 23:03:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17BE742B6F; Fri, 7 Oct 2022 23:02:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 32FCA4281C for ; Fri, 7 Oct 2022 23:02:43 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 297FLZgl006980; Fri, 7 Oct 2022 14:02:39 -0700 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=x3bxjGLN2G/O8smNzy9rzCTeibwl/SFie/OCtKAPNoE=; b=hFh/04JK1DDPuK3jU5h0I9gKluYGV9Xpnr5r6svffUtgTDaHbBkVDg+1zauiQKKDWphG 1mP2wjilBGiyrjCFOpWC7ZMh4ZMMnQJe2VDQtG+zS0V2+d+gQWUzjNFvRnA+gLKbbnaP PBtuJQ7pFCX4bvXjLwiVkh16f88D7LAVgmMtqc+txdV2+VbgrxzAX/apy1u3hLwY97La 4ZDFDvL0iWsdN06sYfaiYVxnSbUhI+yLehC53Ht6e0dJnJuwJ4ZeDr6bGpaCrsElCHYw FjRDd5TkhE5N+t5i2ZJFfM17iHFthkty/XV32UBH3HkD5HKG45XOPZmgAP+HR85M+mxm jQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k2ppes8rd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 07 Oct 2022 14:02:38 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 Oct 2022 14:02:37 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 7 Oct 2022 14:02:37 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id C50163F70EE; Fri, 7 Oct 2022 14:02:30 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , , , , , , Subject: [PATCH v5 4/7] mbuf: add second dynamic field member Date: Sat, 8 Oct 2022 02:32:08 +0530 Message-ID: <33cc537dabb9c4a7ef627e20f62fe810e4067280.1665176094.git.sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: GlbViJNiFBr1nwPvxPrJ_syFu9rLz0Ud X-Proofpoint-ORIG-GUID: GlbViJNiFBr1nwPvxPrJ_syFu9rLz0Ud X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-07_04,2022-10-07_01,2022-06-22_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 If IOVA as PA is disabled during build, mbuf physical address field is undefined. This space is used to add the second dynamic field. Signed-off-by: Shijith Thotton Acked-by: Olivier Matz --- lib/mbuf/rte_mbuf_core.h | 6 +++++- lib/mbuf/rte_mbuf_dyn.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 91c2211b44..dc6c54015e 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -478,7 +478,11 @@ struct rte_mbuf { */ rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t)); #else - uint64_t dummy; + /** + * Reserved for dynamic field in builds where physical address + * field is undefined. + */ + uint64_t dynfield2; #endif /* next 8 bytes are initialised on RX descriptor rearm */ diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c index 4ae79383b5..35839e938c 100644 --- a/lib/mbuf/rte_mbuf_dyn.c +++ b/lib/mbuf/rte_mbuf_dyn.c @@ -128,6 +128,9 @@ init_shared_mem(void) */ memset(shm, 0, sizeof(*shm)); mark_free(dynfield1); +#if !RTE_IOVA_AS_PA + mark_free(dynfield2); +#endif /* init free_flags */ for (mask = RTE_MBUF_F_FIRST_FREE; mask <= RTE_MBUF_F_LAST_FREE; mask <<= 1) -- 2.25.1