From patchwork Wed Oct 28 12:20:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 82651 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6A2A6A04DD; Wed, 28 Oct 2020 13:23:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FA93CAD2; Wed, 28 Oct 2020 13:20:59 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id DF307CAA2 for ; Wed, 28 Oct 2020 13:20:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603887649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vMIv65TEhhIuhNoBTEUEBAs+ZOCqLmmVrax7LbgT+LU=; b=HbY/2DcmlkC6Tb5EXZxtNE9u+RQ94XJ7KYhX2P8nEZnMtl4mnVFNfh+wM58EDfya2vRAP1 oxAENLQD/zJQb2WmXyPeU9cKxJh+Lim7VDMfJ1lENBrNdZVxoXOe7HodM4+9uxV7vB/7gp vVUYJLik3aFpugjK6Zj+k/HxbL2YpW4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-546-ezcTQAC0PS-exwNTtNe8vw-1; Wed, 28 Oct 2020 08:20:47 -0400 X-MC-Unique: ezcTQAC0PS-exwNTtNe8vw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E659A809DE2; Wed, 28 Oct 2020 12:20:45 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 247BE10013DB; Wed, 28 Oct 2020 12:20:43 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Andrew Rybchenko , Ray Kinsella , Neil Horman , Olivier Matz Date: Wed, 28 Oct 2020 13:20:13 +0100 Message-Id: <20201028122013.31104-10-david.marchand@redhat.com> In-Reply-To: <20201028122013.31104-1-david.marchand@redhat.com> References: <20201027221343.28551-1-david.marchand@redhat.com> <20201028122013.31104-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v2 9/9] mbuf: remove seqn field X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" As announced in the deprecation note, the field seqn is removed to give more space to the dynamic fields. This is how the mbuf layout looks like (pahole-style): word type name byte size 0 void * buf_addr; /* 0 + 8 */ 1 rte_iova_t buf_iova /* 8 + 8 */ /* --- RTE_MARKER64 rearm_data; */ 2 uint16_t data_off; /* 16 + 2 */ uint16_t refcnt; /* 18 + 2 */ uint16_t nb_segs; /* 20 + 2 */ uint16_t port; /* 22 + 2 */ 3 uint64_t ol_flags; /* 24 + 8 */ /* --- RTE_MARKER rx_descriptor_fields1; */ 4 uint32_t union packet_type; /* 32 + 4 */ uint32_t pkt_len; /* 36 + 4 */ 5 uint16_t data_len; /* 40 + 2 */ uint16_t vlan_tci; /* 42 + 2 */ 5.5 uint64_t union hash; /* 44 + 8 */ 6.5 uint16_t vlan_tci_outer; /* 52 + 2 */ uint16_t buf_len; /* 54 + 2 */ 7 uint64_t timestamp; /* 56 + 8 */ /* --- RTE_MARKER cacheline1; */ 8 struct rte_mempool * pool; /* 64 + 8 */ 9 struct rte_mbuf * next; /* 72 + 8 */ 10 uint64_t union tx_offload; /* 80 + 8 */ 11 struct rte_mbuf_ext_shared_info * shinfo; /* 88 + 8 */ 12 uint16_t priv_size; /* 96 + 2 */ uint16_t timesync; /* 98 + 2 */ 12.5 uint32_t dynfield1[7]; /* 100 + 28 */ 16 /* --- END 128 */ Signed-off-by: David Marchand Reviewed-by: Andrew Rybchenko Acked-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 1 - doc/guides/rel_notes/release_20_11.rst | 3 +++ lib/librte_mbuf/rte_mbuf_core.h | 15 ++++++--------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 0f6f1df12a..fe3fd3956c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -87,7 +87,6 @@ Deprecation Notices The following static fields will be moved as dynamic: - ``timestamp`` - - ``seqn`` As a consequence, the layout of the ``struct rte_mbuf`` will be re-arranged, avoiding impact on vectorized implementation of the driver datapaths, diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 3d7edbfdbb..c0a9fc96aa 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -429,6 +429,9 @@ API Changes * mbuf: Removed the unioned fields ``userdata`` and ``udata64`` from the structure ``rte_mbuf``. It is replaced with dynamic fields. +* mbuf: Removed the field ``seqn`` from the structure ``rte_mbuf``. + It is replaced with dynamic fields. + * pci: Removed the ``rte_kernel_driver`` enum defined in rte_dev.h and replaced with a private enum in the PCI subsystem. diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index a65eaaf692..3fb5abda3c 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -640,6 +640,11 @@ struct rte_mbuf { }; }; + /** Shared data for external buffer attached to mbuf. See + * rte_pktmbuf_attach_extbuf(). + */ + struct rte_mbuf_ext_shared_info *shinfo; + /** Size of the application private data. In case of an indirect * mbuf, it stores the direct mbuf private data size. */ @@ -648,15 +653,7 @@ struct rte_mbuf { /** Timesync flags for use with IEEE1588. */ uint16_t timesync; - /** Sequence number. See also rte_reorder_insert(). */ - uint32_t seqn; - - /** Shared data for external buffer attached to mbuf. See - * rte_pktmbuf_attach_extbuf(). - */ - struct rte_mbuf_ext_shared_info *shinfo; - - uint64_t dynfield1[3]; /**< Reserved for dynamic fields. */ + uint32_t dynfield1[7]; /**< Reserved for dynamic fields. */ } __rte_cache_aligned; /**