DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: Raslan Darawsheh <rasland@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Yongseok Koh <yskoh@mellanox.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH v6 1/3] ethdev: add Rx HW timestamp capability
Date: Wed, 4 Oct 2017 05:57:00 +0000	[thread overview]
Message-ID: <VI1PR05MB31490E44BA9D8C531FBF44AFC3730@VI1PR05MB3149.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1507028429-23944-1-git-send-email-rasland@mellanox.com>

Hi Raslan,

Tuesday, October 3, 2017 2:00 PM, Raslan Darawsheh
> Add a new offload capability flag for Rx HW timestamp and enabling/disabling
> this via rte_eth_rxmode.
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> ---
> This patch should be applied after after this series:
>  http://dpdk.org/dev/patchwork/patch/29368/
> 
> Changes in v6:
> - Rebased properly on top of the mentioned patch series.
> - Documentation update
> ---
>  doc/guides/nics/features.rst  | 11 +++++++++++
> lib/librte_ether/rte_ethdev.c |  6 ++++++  lib/librte_ether/rte_ethdev.h |  2
> ++
>  3 files changed, 19 insertions(+)
> 
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst index
> 4e68144..e03e6d6 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -567,6 +567,17 @@ Supports L4 checksum offload.
>  * **[provides] rte_eth_dev_info**:
> ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_UDP_CKSUM
> ,DEV_RX_OFFLOAD_TCP_CKSUM``,
> 
> ``tx_offload_capa:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP
> _CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``.
> 
> +.. _nic_features_hw_timestamp:
> +
> +Timestamp offload
> +-----------------
> +
> +Supports Timestamp.
> +
> +* **[uses]     rte_eth_rxconf,rte_eth_rxmode**:
> ``offloads:DEV_RX_OFFLOAD_TIMESTAMP``.
> +* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_TIMESTAMP``.
> +* **[provides] mbuf**: ``mbuf.timestamp``.
> +* **[provides] rte_eth_dev_info**:
> ``rx_offload_capa:DEV_RX_OFFLOAD_TIMESTAMP``.

The capability can be reported on both rx_offload_capa and rx_queue_offload_capa. Better to have it:
rx_offload_capa,rx_queue_offload_capa: DEV_RX_OFFLOAD_TIMESTAMP.


> 
>  .. _nic_features_macsec_offload:
> 
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 9b73d23..c5c5164 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -715,6 +715,8 @@ rte_eth_convert_rx_offload_bitfield(const struct
> rte_eth_rxmode *rxmode,
>  		offloads |= DEV_RX_OFFLOAD_SCATTER;
>  	if (rxmode->enable_lro == 1)
>  		offloads |= DEV_RX_OFFLOAD_TCP_LRO;
> +	if (rxmode->hw_timestamp == 1)
> +		offloads |= DEV_RX_OFFLOAD_TIMESTAMP;
> 
>  	*rx_offloads = offloads;
>  }
> @@ -763,6 +765,10 @@ rte_eth_convert_rx_offloads(const uint64_t
> rx_offloads,
>  		rxmode->enable_lro = 1;
>  	else
>  		rxmode->enable_lro = 0;
> +	if (rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP)
> +		rxmode->hw_timestamp = 1;
> +	else
> +		rxmode->hw_timestamp = 0;
>  }
> 
>  int
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index e02d578..8bb9a6a 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -369,6 +369,7 @@ struct rte_eth_rxmode {
>  		hw_strip_crc     : 1, /**< Enable CRC stripping by hardware. */
>  		enable_scatter   : 1, /**< Enable scatter packets rx handler */
>  		enable_lro       : 1, /**< Enable LRO */
> +		hw_timestamp     : 1, /**< Enable HW timestamp */
>  		/**
>  		 * When set the offload bitfield should be ignored.
>  		 * Instead per-port Rx offloads should be set on offloads @@
> -940,6 +941,7 @@ struct rte_eth_conf {
>  #define DEV_RX_OFFLOAD_JUMBO_FRAME	0x00000800
>  #define DEV_RX_OFFLOAD_CRC_STRIP	0x00001000
>  #define DEV_RX_OFFLOAD_SCATTER		0x00002000
> +#define DEV_RX_OFFLOAD_TIMESTAMP	0x00004000
>  #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM |
> \
>  				 DEV_RX_OFFLOAD_UDP_CKSUM | \
>  				 DEV_RX_OFFLOAD_TCP_CKSUM)
> --
> 2.7.4

Otherwise,

Reviewed-By: Shahaf Shuler <shahafs@mellanox.com>

  parent reply	other threads:[~2017-10-04  5:57 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 13:46 [dpdk-dev] [PATCH 1/3] ethdev: expose Rx hardware timestamp Raslan Darawsheh
2017-08-22 13:46 ` [dpdk-dev] [PATCH 2/3] app/testpmd: add Rx timestamp in testpmd Raslan Darawsheh
2017-08-22 13:46 ` [dpdk-dev] [PATCH 3/3] net/mlx5: add hardware timestamp Raslan Darawsheh
2017-08-23 15:02   ` Nélio Laranjeiro
2017-08-24  7:46   ` [dpdk-dev] [PATCH v2 1/3] ethdev: expose Rx " Raslan Darawsheh
2017-08-24  7:46     ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: add Rx timestamp in testpmd Raslan Darawsheh
2017-08-24 13:49       ` Nélio Laranjeiro
2017-08-24  7:46     ` [dpdk-dev] [PATCH v2 3/3] net/mlx5: add hardware timestamp Raslan Darawsheh
2017-08-24 14:01       ` Nélio Laranjeiro
2017-08-24 13:47     ` [dpdk-dev] [PATCH v2 1/3] ethdev: expose Rx " Nélio Laranjeiro
2017-09-28 16:48     ` [dpdk-dev] [PATCH v3 1/3] ethdev: add Rx HW timestamp capability Raslan Darawsheh
2017-09-28 16:48       ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-09-28 16:48       ` [dpdk-dev] [PATCH v3 3/3] net/mlx5: " Raslan Darawsheh
2017-09-29  7:25       ` [dpdk-dev] [PATCH v3 1/3] ethdev: add Rx HW timestamp capability Andrew Rybchenko
2017-10-01  6:44         ` Shahaf Shuler
2017-10-02 14:50       ` [dpdk-dev] [PATCH " Raslan Darawsheh
2017-10-02 14:50         ` [dpdk-dev] [PATCH 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-02 14:50         ` [dpdk-dev] [PATCH 3/3] net/mlx5: " Raslan Darawsheh
2017-10-02 18:48         ` [dpdk-dev] [PATCH 1/3] ethdev: add Rx HW timestamp capability Ferruh Yigit
2017-10-03  0:39           ` Yongseok Koh
2017-10-03  6:33       ` [dpdk-dev] [PATCH v5 " Raslan Darawsheh
2017-10-03  6:33         ` [dpdk-dev] [PATCH v5 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-03  6:33         ` [dpdk-dev] [PATCH v5 3/3] net/mlx5: " Raslan Darawsheh
2017-10-03  6:40         ` [dpdk-dev] [PATCH v5 1/3] ethdev: add Rx HW timestamp capability Andrew Rybchenko
2017-10-03  6:53           ` Yongseok Koh
2017-10-03  7:24             ` Andrew Rybchenko
2017-10-03 11:00       ` [dpdk-dev] [PATCH v6 " Raslan Darawsheh
2017-10-03 11:00         ` [dpdk-dev] [PATCH v6 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-05 23:11           ` Yongseok Koh
2017-10-03 11:00         ` [dpdk-dev] [PATCH v6 3/3] net/mlx5: " Raslan Darawsheh
2017-10-05 23:23           ` Yongseok Koh
2017-10-08  8:24           ` [dpdk-dev] [PATCH v7 1/3] ethdev: add Rx HW timestamp capability Raslan Darawsheh
2017-10-08  8:24             ` [dpdk-dev] [PATCH v7 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-08  8:24             ` [dpdk-dev] [PATCH v7 3/3] net/mlx5: " Raslan Darawsheh
2017-10-09 19:17               ` Ferruh Yigit
2017-10-10  7:45           ` [dpdk-dev] [PATCH v8 1/3] ethdev: add Rx HW timestamp capability Raslan Darawsheh
2017-10-10  7:45             ` [dpdk-dev] [PATCH v8 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-10  7:45             ` [dpdk-dev] [PATCH v8 3/3] net/mlx5: " Raslan Darawsheh
2017-10-10 13:33             ` [dpdk-dev] [PATCH v8 1/3] ethdev: add Rx HW timestamp capability Yongseok Koh
2017-10-10 14:37           ` [dpdk-dev] [PATCH v9 " Raslan Darawsheh
2017-10-10 14:37             ` [dpdk-dev] [PATCH v9 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-10 14:37             ` [dpdk-dev] [PATCH v9 3/3] net/mlx5: " Raslan Darawsheh
2017-10-10 14:40               ` Yongseok Koh
2017-10-11  1:14             ` [dpdk-dev] [PATCH v9 1/3] ethdev: add Rx HW timestamp capability Ferruh Yigit
2017-10-11  1:22               ` Yongseok Koh
2017-10-11  1:30                 ` Ferruh Yigit
2017-10-04  5:57         ` Shahaf Shuler [this message]
2017-10-06  0:54         ` [dpdk-dev] [PATCH v6 " Ferruh Yigit
2017-10-02 14:01     ` [dpdk-dev] [PATCH " Raslan Darawsheh
2017-10-02 14:01       ` [dpdk-dev] [PATCH 2/3] app/testpmd: add Rx HW timestamp Raslan Darawsheh
2017-10-02 14:01       ` [dpdk-dev] [PATCH 3/3] net/mlx5: " Raslan Darawsheh

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=VI1PR05MB31490E44BA9D8C531FBF44AFC3730@VI1PR05MB3149.eurprd05.prod.outlook.com \
    --to=shahafs@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=rasland@mellanox.com \
    --cc=yskoh@mellanox.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).