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 11BADA0542; Fri, 7 Oct 2022 21:31:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0630640687; Fri, 7 Oct 2022 21:31:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 02D3440042 for ; Fri, 7 Oct 2022 21:31:23 +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 297FLX0t006967; Fri, 7 Oct 2022 12:31:12 -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=wq/sZ4oOnoxUv/WuVdNB8Eg/ujEHjrIOXnkE5622uwE=; b=d3DOUKHEBb38vBfOVtvaz07H/UlV9ETKkNmzKQbE4ZtngqiiK31NRnQ7Kqy7Le+6YA8k pkhONeMkANqc0mJLhFGTdoeCANXeS0xZMV5N0mnGcE4NFAQFrusUW/NZ9P/S1TT7R8D1 7OAgZKG0xzJbPvw5fw+C1y4u8mCSXTomSHGv6nquk8F3vdzMXa6r/bSWWgkwrNK1AaVi u6o/NRqK5x1vN4iT8jj95ecjyxskW4ALKuAx9KGTzx6z1e0J5hH0DGXRVGTIXGLkg2C4 RsLJN7NM9CkyweeFVWA9wX+DqpAg40TrIc+r0QsNYd8lbL/6RXgM8dZ+amjKtGl1nQxD Wg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k2ppes0jc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 07 Oct 2022 12:31:11 -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:10 -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:10 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 5F3495B6927; Fri, 7 Oct 2022 12:31:05 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , , , , , , , , Subject: [PATCH v4 5/7] lib: move mbuf next pointer to first cache line Date: Sat, 8 Oct 2022 01:00:27 +0530 Message-ID: <465a7303a72cc4a77c42d8479f727efd1dabbc46.1665170500.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: QFZlNAPHCtYnJXiNkTkXruJ0byYv37W8 X-Proofpoint-ORIG-GUID: QFZlNAPHCtYnJXiNkTkXruJ0byYv37W8 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 --- 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 0b4740abd1..006d1f5988 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -269,6 +269,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