[dpdk-dev,v2,1/3] ethdev: expose Rx hardware timestamp

Message ID 1503560793-21597-1-git-send-email-rasland@mellanox.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Raslan Darawsheh Aug. 24, 2017, 7:46 a.m. UTC
  Added new capability to the list of rx offloads for hw timestamp

The PMDs how expose this capability will always have it enabled.
But, if the following API got accepted applications can choose
between disable/enable this API.
http://dpdk.org/dev/patchwork/patch/27470/

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 lib/librte_ether/rte_ethdev.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Nélio Laranjeiro Aug. 24, 2017, 1:47 p.m. UTC | #1
On Thu, Aug 24, 2017 at 10:46:31AM +0300, Raslan Darawsheh wrote:
> Added new capability to the list of rx offloads for hw timestamp
> 
> The PMDs how expose this capability will always have it enabled.

Not sure this comment is accurate, Rx offloads are application request, PMD
does not have to enable it by default.

> But, if the following API got accepted applications can choose
> between disable/enable this API.
> http://dpdk.org/dev/patchwork/patch/27470/
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> ---
>  lib/librte_ether/rte_ethdev.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index 0adf327..cc5d281 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -907,6 +907,8 @@ struct rte_eth_conf {
>  #define DEV_RX_OFFLOAD_QINQ_STRIP  0x00000020
>  #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040
>  #define DEV_RX_OFFLOAD_MACSEC_STRIP     0x00000080
> +#define DEV_RX_OFFLOAD_TIMESTAMP 0x00000100
> +/**< Device puts raw timestamp in mbuf. */
>  
>  /**
>   * TX offload capabilities of a device.
> -- 
> 2.7.4
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 0adf327..cc5d281 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -907,6 +907,8 @@  struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_QINQ_STRIP  0x00000020
 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040
 #define DEV_RX_OFFLOAD_MACSEC_STRIP     0x00000080
+#define DEV_RX_OFFLOAD_TIMESTAMP 0x00000100
+/**< Device puts raw timestamp in mbuf. */
 
 /**
  * TX offload capabilities of a device.