From patchwork Fri Oct 7 19:30:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 117634 X-Patchwork-Delegate: thomas@monjalon.net 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 508E0A0542; Fri, 7 Oct 2022 21:31:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EED2842B6C; Fri, 7 Oct 2022 21:31:12 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id BAA9C4281C for ; Fri, 7 Oct 2022 21:31:11 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 297DvLL2017715; Fri, 7 Oct 2022 12:31:07 -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=kcdKhsndleu5Od3WME7S5Je6T82Jsi9mm3+44ckij24=; b=Vd/T2W9o5s4urXovyu0MHDcfBVyHMzOy+Eeb1D3Yrikp1zLbMAehUWjxM+SnzECg1P3H 2xK5q26iBlUrTlEjuEtHdwtSYxA2l190F2SB6lqYh+FHzNxqEx8YkFD54xGW8+V0Ta4F s8aJjjBIxa1gGREtC7LWKTogy9uIXNxvKgf9oLMNjU1iNyUafZ2NF36e3bkQ8ePwClj4 PL2SSUBRYnxl8o0L3V3dq8EaHP4SqNmfd173Gp0INaCG/GSHmbfT89Gch17MJ3WxMgYU Bb7hKRrFNPFilAFgjiY69TZHvlMWlsE14QVnVO6ogjqssKrdUzbnYNPo2i5QJBeZrLnu hA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k1d7gsjk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 07 Oct 2022 12:31:07 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 7 Oct 2022 12:31:04 -0700 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.2 via Frontend Transport; Fri, 7 Oct 2022 12:31:04 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 691863F704E; Fri, 7 Oct 2022 12:31:00 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , , , , , , , , Subject: [PATCH v4 4/7] mbuf: add second dynamic field member Date: Sat, 8 Oct 2022 01:00:26 +0530 Message-ID: <06eb658ad97daaf7c7a5d4c4077ce6fb552aaf7f.1665170500.git.sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: VWt15i1mHjA6h9NLatjlsMk-SkAniwHQ X-Proofpoint-ORIG-GUID: VWt15i1mHjA6h9NLatjlsMk-SkAniwHQ 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 --- 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)