From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Cc: ferruh.yigit@intel.com, david.marchand@redhat.com,
bruce.richardson@intel.com, olivier.matz@6wind.com,
jerinj@marvell.com, viacheslavo@nvidia.com,
Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH 10/15] net/octeontx2: switch timestamp to dynamic mbuf field
Date: Thu, 29 Oct 2020 14:02:12 +0300 [thread overview]
Message-ID: <69cd6699-290f-102f-038a-f9fdde5874a1@oktetlabs.ru> (raw)
In-Reply-To: <20201029092751.3837177-11-thomas@monjalon.net>
On 10/29/20 12:27 PM, Thomas Monjalon wrote:
> The mbuf timestamp is moved to a dynamic field
> in order to allow removal of the deprecated static field.
> The related mbuf flag is also replaced.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> drivers/net/octeontx2/otx2_ethdev.c | 33 +++++++++++++++++++++++++++++
> drivers/net/octeontx2/otx2_rx.h | 19 ++++++++++++++---
> drivers/net/octeontx2/version.map | 7 ++++++
> 3 files changed, 56 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
> index cfb733a4b5..ad95219438 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -4,6 +4,7 @@
>
> #include <inttypes.h>
>
> +#include <rte_bitops.h>
> #include <rte_ethdev_pci.h>
> #include <rte_io.h>
> #include <rte_malloc.h>
> @@ -14,6 +15,35 @@
> #include "otx2_ethdev.h"
> #include "otx2_ethdev_sec.h"
>
> +uint64_t rte_pmd_octeontx2_timestamp_rx_dynflag;
> +int rte_pmd_octeontx2_timestamp_dynfield_offset = -1;
> +
> +static int
> +otx2_rx_timestamp_setup(uint16_t flags)
> +{
> + int timestamp_rx_dynflag_offset;
> +
> + if ((flags & NIX_RX_OFFLOAD_TSTAMP_F) == 0)
> + return 0;
> +
> + rte_pmd_octeontx2_timestamp_dynfield_offset = rte_mbuf_dynfield_lookup(
> + RTE_MBUF_DYNFIELD_TIMESTAMP_NAME, NULL);
> + if (rte_pmd_octeontx2_timestamp_dynfield_offset < 0) {
> + otx2_err("Failed to lookup timestamp field");
> + return -rte_errno;
> + }
> + timestamp_rx_dynflag_offset = rte_mbuf_dynflag_lookup(
> + RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, NULL);
> + if (timestamp_rx_dynflag_offset < 0) {
> + otx2_err("Failed to lookup Rx timestamp flag");
> + return -rte_errno;
> + }
> + rte_pmd_octeontx2_timestamp_rx_dynflag =
> + RTE_BIT64(timestamp_rx_dynflag_offset);
> +
> + return 0;
> +}
> +
> static inline uint64_t
> nix_get_rx_offload_capa(struct otx2_eth_dev *dev)
> {
> @@ -1874,6 +1904,9 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
> dev->tx_offload_flags |= nix_tx_offload_flags(eth_dev);
> dev->rss_info.rss_grps = NIX_RSS_GRPS;
>
> + if (otx2_rx_timestamp_setup(dev->rx_offload_flags) != 0)
> + goto fail_offloads;
> +
> nb_rxq = RTE_MAX(data->nb_rx_queues, 1);
> nb_txq = RTE_MAX(data->nb_tx_queues, 1);
>
> diff --git a/drivers/net/octeontx2/otx2_rx.h b/drivers/net/octeontx2/otx2_rx.h
> index 61a5c436dd..6981edce82 100644
> --- a/drivers/net/octeontx2/otx2_rx.h
> +++ b/drivers/net/octeontx2/otx2_rx.h
> @@ -63,6 +63,18 @@ union mbuf_initializer {
> uint64_t value;
> };
>
> +/* variables are exported because this file is included in other drivers */
> +extern uint64_t rte_pmd_octeontx2_timestamp_rx_dynflag;
> +extern int rte_pmd_octeontx2_timestamp_dynfield_offset;
> +
> +static inline rte_mbuf_timestamp_t *
> +otx2_timestamp_dynfield(struct rte_mbuf *mbuf)
> +{
> + return RTE_MBUF_DYNFIELD(mbuf,
> + rte_pmd_octeontx2_timestamp_dynfield_offset,
> + rte_mbuf_timestamp_t *);
> +}
> +
May be ethdev should provide the inline function?
next prev parent reply other threads:[~2020-10-29 11:02 UTC|newest]
Thread overview: 170+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 9:27 [dpdk-dev] [PATCH 00/15] remove mbuf timestamp Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 01/15] eventdev: remove software Rx timestamp Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 02/15] mbuf: add Rx timestamp dynamic flag Thomas Monjalon
2020-10-29 9:58 ` Andrew Rybchenko
2020-10-29 18:19 ` Ajit Khaparde
2020-10-29 9:27 ` [dpdk-dev] [PATCH 03/15] ethdev: register mbuf field and flags for timestamp Thomas Monjalon
2020-10-29 10:08 ` Andrew Rybchenko
2020-10-29 10:12 ` Thomas Monjalon
2020-10-29 10:33 ` Andrew Rybchenko
2020-10-29 10:46 ` Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 04/15] latency: switch timestamp to dynamic mbuf field Thomas Monjalon
2020-10-29 10:13 ` Andrew Rybchenko
2020-10-29 10:40 ` Thomas Monjalon
2020-10-29 14:20 ` Pattan, Reshma
2020-10-29 16:15 ` Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 05/15] net/ark: " Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 06/15] net/dpaa2: " Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 07/15] net/mlx5: fix dynamic mbuf offset lookup check Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 08/15] net/mlx5: switch timestamp to dynamic mbuf field Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 09/15] net/nfb: " Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 10/15] net/octeontx2: " Thomas Monjalon
2020-10-29 11:02 ` Andrew Rybchenko [this message]
2020-10-29 11:34 ` Thomas Monjalon
2020-10-29 11:37 ` Andrew Rybchenko
2020-10-29 11:52 ` Slava Ovsiienko
2020-10-30 12:41 ` Jerin Jacob
2020-11-01 16:12 ` Thomas Monjalon
2020-11-01 20:00 ` Andrew Rybchenko
2020-10-29 9:27 ` [dpdk-dev] [PATCH 11/15] net/pcap: " Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 12/15] app/testpmd: " Thomas Monjalon
2020-10-29 10:20 ` Andrew Rybchenko
2020-10-29 10:43 ` Thomas Monjalon
2020-10-29 10:52 ` Andrew Rybchenko
2020-10-29 9:27 ` [dpdk-dev] [PATCH 13/15] examples/rxtx_callbacks: switch timestamp to dynamic field Thomas Monjalon
2020-10-29 10:21 ` Andrew Rybchenko
2020-10-29 10:44 ` Thomas Monjalon
2020-10-29 9:27 ` [dpdk-dev] [PATCH 14/15] mbuf: remove deprecated timestamp field Thomas Monjalon
2020-10-29 10:23 ` Andrew Rybchenko
2020-10-29 18:18 ` Ajit Khaparde
2020-10-29 14:48 ` Kinsella, Ray
2020-10-29 9:27 ` [dpdk-dev] [PATCH 15/15] mbuf: move pool pointer in hotter first half Thomas Monjalon
2020-10-29 10:50 ` Andrew Rybchenko
2020-10-29 10:56 ` Thomas Monjalon
2020-10-29 14:15 ` Ananyev, Konstantin
2020-10-29 18:45 ` Ajit Khaparde
2020-10-31 18:20 ` [dpdk-dev] [PATCH 15/15] mbuf: move pool pointer in hotterfirst half Morten Brørup
2020-10-31 20:40 ` Thomas Monjalon
2020-11-01 9:12 ` Morten Brørup
2020-11-01 16:21 ` Thomas Monjalon
2020-11-01 16:38 ` Thomas Monjalon
2020-11-01 20:59 ` Morten Brørup
2020-11-02 15:58 ` Thomas Monjalon
2020-11-03 12:10 ` Morten Brørup
2020-11-03 12:25 ` Bruce Richardson
2020-11-03 13:46 ` Morten Brørup
2020-11-03 13:50 ` Bruce Richardson
2020-11-03 14:03 ` Morten Brørup
2020-11-03 14:02 ` Slava Ovsiienko
2020-11-03 15:03 ` Morten Brørup
2020-11-04 15:00 ` Olivier Matz
2020-11-05 0:25 ` Ananyev, Konstantin
2020-11-05 9:04 ` Morten Brørup
2020-11-05 9:35 ` Morten Brørup
2020-11-05 10:29 ` Bruce Richardson
2020-10-29 14:42 ` [dpdk-dev] [PATCH 15/15] mbuf: move pool pointer in hotter first half Kinsella, Ray
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 00/14] remove mbuf timestamp Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 01/14] eventdev: remove software Rx timestamp Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 02/14] mbuf: add Rx timestamp dynamic flag Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 03/14] ethdev: register mbuf field and flags for timestamp Thomas Monjalon
2020-11-02 15:39 ` Olivier Matz
2020-11-02 16:52 ` Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 04/14] latency: switch timestamp to dynamic mbuf field Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 05/14] net/ark: " Thomas Monjalon
2020-11-02 15:32 ` Olivier Matz
2020-11-02 16:10 ` Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 06/14] net/dpaa2: " Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 07/14] net/mlx5: fix dynamic mbuf offset lookup check Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 08/14] net/mlx5: switch timestamp to dynamic mbuf field Thomas Monjalon
2020-11-02 5:08 ` Ruifeng Wang
2020-11-02 23:20 ` David Christensen
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 09/14] net/nfb: " Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 10/14] net/octeontx2: " Thomas Monjalon
2020-11-01 18:28 ` Jerin Jacob
2020-11-02 9:38 ` Thomas Monjalon
2020-11-02 11:01 ` Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 11/14] net/pcap: " Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 12/14] app/testpmd: " Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 13/14] examples/rxtx_callbacks: switch timestamp to dynamic field Thomas Monjalon
2020-11-01 18:06 ` [dpdk-dev] [PATCH v2 14/14] mbuf: remove deprecated timestamp field Thomas Monjalon
2020-11-02 15:41 ` Olivier Matz
2020-11-02 15:47 ` David Marchand
2020-11-02 15:49 ` Thomas Monjalon
2020-11-01 18:08 ` [dpdk-dev] [PATCH v2 00/14] remove mbuf timestamp Thomas Monjalon
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 00/16] " Thomas Monjalon
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 01/16] eventdev: remove software Rx timestamp Thomas Monjalon
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 02/16] mbuf: add Rx timestamp flag and helpers Thomas Monjalon
2020-11-03 9:33 ` Olivier Matz
2020-11-03 9:59 ` Thomas Monjalon
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 03/16] latency: switch Rx timestamp to dynamic mbuf field Thomas Monjalon
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 04/16] net/ark: " Thomas Monjalon
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 05/16] net/dpaa2: " Thomas Monjalon
2020-11-03 9:18 ` Hemant Agrawal
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 06/16] net/mlx5: fix dynamic mbuf offset lookup check Thomas Monjalon
2020-11-03 8:12 ` Slava Ovsiienko
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 07/16] net/mlx5: switch Rx timestamp to dynamic mbuf field Thomas Monjalon
2020-11-03 8:12 ` Slava Ovsiienko
2020-11-03 0:13 ` [dpdk-dev] [PATCH v3 08/16] net/nfb: " Thomas Monjalon
2020-11-03 10:20 ` Olivier Matz
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 09/16] net/octeontx2: " Thomas Monjalon
2020-11-03 10:52 ` Harman Kalra
2020-11-03 11:22 ` Thomas Monjalon
2020-11-03 12:21 ` Thomas Monjalon
2020-11-03 14:23 ` [dpdk-dev] [EXT] " Harman Kalra
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 10/16] net/pcap: " Thomas Monjalon
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 11/16] app/testpmd: " Thomas Monjalon
2020-11-03 10:23 ` Olivier Matz
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 12/16] examples/rxtx_callbacks: switch timestamp to dynamic field Thomas Monjalon
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 13/16] ethdev: add doxygen comment for Rx timestamp API Thomas Monjalon
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 14/16] mbuf: remove deprecated timestamp field Thomas Monjalon
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 15/16] mbuf: add Tx timestamp registration helper Thomas Monjalon
2020-11-03 0:14 ` [dpdk-dev] [PATCH v3 16/16] ethdev: include mbuf registration in Tx timestamp API Thomas Monjalon
2020-11-03 7:54 ` Slava Ovsiienko
2020-11-03 9:00 ` [dpdk-dev] [PATCH v3 00/16] remove mbuf timestamp David Marchand
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 " Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 01/16] eventdev: remove software Rx timestamp Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 02/16] mbuf: add Rx timestamp flag and helpers Thomas Monjalon
2020-11-03 12:34 ` Andrew Rybchenko
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 03/16] latency: switch Rx timestamp to dynamic mbuf field Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 04/16] net/ark: " Thomas Monjalon
2020-11-03 12:37 ` Andrew Rybchenko
2020-11-03 13:08 ` Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 05/16] net/dpaa2: " Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 06/16] net/mlx5: fix dynamic mbuf offset lookup check Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 07/16] net/mlx5: switch Rx timestamp to dynamic mbuf field Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 08/16] net/nfb: " Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 09/16] net/octeontx2: " Thomas Monjalon
2020-11-03 12:21 ` [dpdk-dev] [PATCH v4 10/16] net/pcap: " Thomas Monjalon
2020-11-03 12:22 ` [dpdk-dev] [PATCH v4 11/16] app/testpmd: " Thomas Monjalon
2020-11-03 12:22 ` [dpdk-dev] [PATCH v4 12/16] examples/rxtx_callbacks: switch timestamp to dynamic field Thomas Monjalon
2020-11-03 12:22 ` [dpdk-dev] [PATCH v4 13/16] ethdev: add doxygen comment for Rx timestamp API Thomas Monjalon
2020-11-03 12:40 ` Andrew Rybchenko
2020-11-03 12:22 ` [dpdk-dev] [PATCH v4 14/16] mbuf: remove deprecated timestamp field Thomas Monjalon
2020-11-03 12:22 ` [dpdk-dev] [PATCH v4 15/16] mbuf: add Tx timestamp registration helper Thomas Monjalon
2020-11-03 12:42 ` Andrew Rybchenko
2020-11-03 12:22 ` [dpdk-dev] [PATCH v4 16/16] ethdev: include mbuf registration in Tx timestamp API Thomas Monjalon
2020-11-03 12:45 ` Andrew Rybchenko
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 00/16] remove mbuf timestamp Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 01/16] eventdev: remove software Rx timestamp Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 02/16] mbuf: add Rx timestamp flag and helpers Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 03/16] latency: switch Rx timestamp to dynamic mbuf field Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 04/16] net/ark: " Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 05/16] net/dpaa2: " Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 06/16] net/mlx5: fix dynamic mbuf offset lookup check Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 07/16] net/mlx5: switch Rx timestamp to dynamic mbuf field Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 08/16] net/nfb: " Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 09/16] net/octeontx2: " Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 10/16] net/pcap: " Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 11/16] app/testpmd: " Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 12/16] examples/rxtx_callbacks: switch timestamp to dynamic field Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 13/16] ethdev: add doxygen comment for Rx timestamp API Thomas Monjalon
2020-11-03 19:07 ` Ajit Khaparde
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 14/16] mbuf: remove deprecated timestamp field Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 15/16] mbuf: add Tx timestamp registration helper Thomas Monjalon
2020-11-03 14:09 ` [dpdk-dev] [PATCH v5 16/16] ethdev: include mbuf registration in Tx timestamp API Thomas Monjalon
2020-11-03 14:17 ` [dpdk-dev] [PATCH v5 00/16] remove mbuf timestamp Olivier Matz
2020-11-03 14:44 ` Thomas Monjalon
2020-11-03 16:08 ` Stephen Hemminger
2020-11-03 16:20 ` Thomas Monjalon
2020-11-03 17:42 ` Stephen Hemminger
2020-11-03 17:55 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69cd6699-290f-102f-038a-f9fdde5874a1@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=mdr@ashroe.eu \
--cc=ndabilpuram@marvell.com \
--cc=nhorman@tuxdriver.com \
--cc=olivier.matz@6wind.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).