From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1AE5A04E6; Fri, 30 Oct 2020 18:34:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85BBA5947; Fri, 30 Oct 2020 18:30:45 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id BEF5D6A12 for ; Fri, 30 Oct 2020 18:30:15 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 710B75C023D; Fri, 30 Oct 2020 13:30:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 30 Oct 2020 13:30:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=+QCJGzGkQhi79 wjF4FZNwAzFFhv9Ums/HX+cru3l9jw=; b=j9W59MIeUiTKZH4x2FeRUUPhRLWe3 xEhS/RJYsvWpqRi7G4u7ZHeOKfU4hOiOEDioOBEHh0bSQoG2+NaIWvjFdNjeNF3P Iuzb2twUYPXUQiZ0HUf3QvGPuPND/1EYoWqkatnPNIUBqLyoh4uWfoxsSsguV3mr p2UCimumH+DZnwSWh81EYYeeD56Nkf4JNUbVHOxrzG5L4qFrlHixmJXBceBKoDy6 3DIEG1OgNQSAIR7mfuV+aPDeGVFY9o5jKpTicwQztSbtQKJvnMGMCH1fgPWnyD96 mX+f31A+Mo7g9YBGbTu888PupdpLgtRtY17WPobbeklWAJpg8RXu7vsSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=+QCJGzGkQhi79wjF4FZNwAzFFhv9Ums/HX+cru3l9jw=; b=G++RGRA+ R8YHbV5dO3Yi9SqrP2PEDBdda3XexIPjzlzZSWVhxA46MIE3FK+3W3a8CmsqLGrN Zpjd8XU+oxY52xS0uWQtcRsummD7e9nxLbuexYAjj/V0d581q+SH5mHP1ns3YNP+ Lo0XM2j80sDSaxwK/YTDc4Zd/m+dOvwd9FZLSmFT2Ek90oDsuIxc5Fko/aY+97hX ELYk1cePd2Dtk2JaH4upcfOyeGK0aTprginyX9ywkrh3ZhIsxnAIVfoCifVDsKoy EMwDcLWtHOAK08cnjYMXLWwEyJFVttyP2O+UsMHQzgKmVCPaa4rUMPCkdaGpC4m7 BvoIyPHIiw8/5w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleehgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpefhudeigefgvdekgfehgeejleeifffhtdetffffudevgfdtfefghfet tddujeehieenucffohhmrghinhephihouhhtuhgsvgdrtghomhenucfkphepjeejrddufe egrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 31CF4306467E; Fri, 30 Oct 2020 13:30:14 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru, akhil.goyal@nxp.com, jerinj@marvell.com, Ray Kinsella , Neil Horman Date: Fri, 30 Oct 2020 18:29:39 +0100 Message-Id: <20201030172940.1073558-15-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030172940.1073558-1-thomas@monjalon.net> References: <20201026052105.1561859-1-thomas@monjalon.net> <20201030172940.1073558-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 14/15] mbuf: remove deprecated timestamp 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 timestamp is removed to allow giving more space to the dynamic fields. The related offload flag PKT_RX_TIMESTAMP is also removed. Signed-off-by: Thomas Monjalon --- app/test/test_mbuf.c | 1 - doc/guides/rel_notes/deprecation.rst | 1 - doc/guides/rel_notes/release_20_11.rst | 4 ++++ lib/librte_ethdev/rte_ethdev.h | 4 +++- lib/librte_mbuf/rte_mbuf.c | 2 -- lib/librte_mbuf/rte_mbuf.h | 1 - lib/librte_mbuf/rte_mbuf_core.h | 12 +----------- 7 files changed, 8 insertions(+), 17 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 80d1850da9..85c150d843 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -1621,7 +1621,6 @@ test_get_rx_ol_flag_name(void) VAL_NAME(PKT_RX_FDIR_FLX), VAL_NAME(PKT_RX_QINQ_STRIPPED), VAL_NAME(PKT_RX_LRO), - VAL_NAME(PKT_RX_TIMESTAMP), VAL_NAME(PKT_RX_SEC_OFFLOAD), VAL_NAME(PKT_RX_SEC_OFFLOAD_FAILED), VAL_NAME(PKT_RX_OUTER_L4_CKSUM_BAD), diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 0f6f1df12a..72dbb25b83 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -86,7 +86,6 @@ Deprecation Notices `this presentation `_. 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, diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 70cefb6d07..eb02b6a3cd 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -445,6 +445,10 @@ 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 ``timestamp`` from the structure ``rte_mbuf``. + It is replaced with the dynamic field RTE_MBUF_DYNFIELD_TIMESTAMP_NAME + which was previously used only for Tx. + * 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_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 3be0050592..619cbe521e 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1345,6 +1345,8 @@ struct rte_eth_conf { #define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800 #define DEV_RX_OFFLOAD_SCATTER 0x00002000 /** + * Timestamp is set by the driver in RTE_MBUF_DYNFIELD_TIMESTAMP_NAME + * and RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME is set in ol_flags. * The mbuf field and flag are registered when the offload is configured. */ #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 @@ -4654,7 +4656,7 @@ int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time); * rte_eth_read_clock(port, base_clock); * * Then, convert the raw mbuf timestamp with: - * base_time_sec + (double)(mbuf->timestamp - base_clock) / freq; + * base_time_sec + (double)(*timestamp_dynfield(mbuf) - base_clock) / freq; * * This simple example will not provide a very good accuracy. One must * at least measure multiple times the frequency and do a regression. diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 8a456e5e64..09d93e6899 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -764,7 +764,6 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask) case PKT_RX_QINQ_STRIPPED: return "PKT_RX_QINQ_STRIPPED"; case PKT_RX_QINQ: return "PKT_RX_QINQ"; case PKT_RX_LRO: return "PKT_RX_LRO"; - case PKT_RX_TIMESTAMP: return "PKT_RX_TIMESTAMP"; case PKT_RX_SEC_OFFLOAD: return "PKT_RX_SEC_OFFLOAD"; case PKT_RX_SEC_OFFLOAD_FAILED: return "PKT_RX_SEC_OFFLOAD_FAILED"; case PKT_RX_OUTER_L4_CKSUM_BAD: return "PKT_RX_OUTER_L4_CKSUM_BAD"; @@ -808,7 +807,6 @@ rte_get_rx_ol_flag_list(uint64_t mask, char *buf, size_t buflen) { PKT_RX_FDIR_FLX, PKT_RX_FDIR_FLX, NULL }, { PKT_RX_QINQ_STRIPPED, PKT_RX_QINQ_STRIPPED, NULL }, { PKT_RX_LRO, PKT_RX_LRO, NULL }, - { PKT_RX_TIMESTAMP, PKT_RX_TIMESTAMP, NULL }, { PKT_RX_SEC_OFFLOAD, PKT_RX_SEC_OFFLOAD, NULL }, { PKT_RX_SEC_OFFLOAD_FAILED, PKT_RX_SEC_OFFLOAD_FAILED, NULL }, { PKT_RX_QINQ, PKT_RX_QINQ, NULL }, diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index a1414ed7cd..6774c6281b 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1108,7 +1108,6 @@ __rte_pktmbuf_copy_hdr(struct rte_mbuf *mdst, const struct rte_mbuf *msrc) mdst->tx_offload = msrc->tx_offload; mdst->hash = msrc->hash; mdst->packet_type = msrc->packet_type; - mdst->timestamp = msrc->timestamp; rte_mbuf_dynfield_copy(mdst, msrc); } diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index a65eaaf692..52ca1c842f 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -149,11 +149,6 @@ extern "C" { */ #define PKT_RX_LRO (1ULL << 16) -/** - * Indicate that the timestamp field in the mbuf is valid. - */ -#define PKT_RX_TIMESTAMP (1ULL << 17) - /** * Indicate that security offload processing was applied on the RX packet. */ @@ -589,12 +584,7 @@ struct rte_mbuf { uint16_t buf_len; /**< Length of segment buffer. */ - /** Valid if PKT_RX_TIMESTAMP is set. The unit and time reference - * are not normalized but are always the same for a given port. - * Some devices allow to query rte_eth_read_clock that will return the - * current device timestamp. - */ - uint64_t timestamp; + uint64_t unused; /* second cache line - fields only used in slow path or on TX */ RTE_MARKER cacheline1 __rte_cache_min_aligned; -- 2.28.0