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 5D238A0543; Fri, 7 Oct 2022 23:03:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02651427EE; Fri, 7 Oct 2022 23:02:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D23294282D for ; Fri, 7 Oct 2022 23:02:46 +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 297Bq4Ne023318; Fri, 7 Oct 2022 14:02:42 -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=GRVLx2SJW48J5MybUg2Eoybii12JdA2NyZZZ1ja1M8w=; b=Qo6oI0L5POoyuINGQdhc7UvsHhF5gwvwXkySdtYGc+2HEpm8SQOqTM1rLgmxP6L98iwW vGJAxZM+BduR/ce9bLVk4CZE+P+L6jI0uy7RnGLugz1drrBrqOMQ/yiX8DBh032Ot9x+ hcgLUnVepJdH03E/hftq7oVsm/+v4qv4i/DoUq/okA30K6kqG/es3AvoLin0xkAASg0M RnGqtBP4vHG4yxHRPieDEvDM6venzl1z7mWMUGZRXZNF2WPUVvka3f76wwdlVW+cAtVa rP/an1kZz7kncRzwOINxuGULRo00TSEBKYMASX6uitYlC93Znec5ccXlG056gzAwyxuA +g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k1d7gste4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 07 Oct 2022 14:02:42 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 7 Oct 2022 14:02:39 -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:39 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 05B5D3F70CE; Fri, 7 Oct 2022 14:02:33 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , , , , , , Subject: [PATCH v5 5/7] lib: move mbuf next pointer to first cache line Date: Sat, 8 Oct 2022 02:32:09 +0530 Message-ID: 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: fi96c-jMWgDUPwq8Gb1icPvGnE1x6AAe X-Proofpoint-ORIG-GUID: fi96c-jMWgDUPwq8Gb1icPvGnE1x6AAe 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 Swapped position of mbuf next pointer and second dynamic field (dynfield2) if the build is configured to disable IOVA as PA. This is to move the mbuf next pointer to first cache line. Signed-off-by: Shijith Thotton Acked-by: Olivier Matz --- doc/guides/rel_notes/release_22_11.rst | 3 +++ lib/mbuf/rte_mbuf_core.h | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst index 7431dda461..ab69db8d70 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -385,6 +385,9 @@ ABI Changes * eventdev: Added ``weight`` and ``affinity`` fields to ``rte_event_queue_conf`` structure. +* mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + Known Issues ------------ diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index dc6c54015e..37d3fcc3b8 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -479,10 +479,11 @@ struct rte_mbuf { rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t)); #else /** - * Reserved for dynamic field in builds where physical address - * field is undefined. + * Next segment of scattered packet. + * This field is valid when physical address field is undefined. + * Otherwise next pointer in the second cache line will be used. */ - uint64_t dynfield2; + struct rte_mbuf *next; #endif /* next 8 bytes are initialised on RX descriptor rearm */ @@ -599,11 +600,19 @@ struct rte_mbuf { /* second cache line - fields only used in slow path or on TX */ RTE_MARKER cacheline1 __rte_cache_min_aligned; +#if RTE_IOVA_AS_PA /** - * Next segment of scattered packet. Must be NULL in the last segment or - * in case of non-segmented packet. + * Next segment of scattered packet. Must be NULL in the last + * segment or in case of non-segmented packet. */ struct rte_mbuf *next; +#else + /** + * Reserved for dynamic field when the next pointer is in first + * cache line (i.e. RTE_IOVA_AS_PA is 0). + */ + uint64_t dynfield2; +#endif /* fields to support TX offloads */ RTE_STD_C11 -- 2.25.1