[dpdk-dev] [PATCH] drivers/net/nfb: add timestamp support

Ferruh Yigit ferruh.yigit at intel.com
Thu Jun 27 17:45:00 CEST 2019


On 6/13/2019 1:05 PM, Rastislav Cernay wrote:
> From: Rastislav Cernay <cernay at netcope.com>
> 
> This patch adds timestamping support to nfb driver.
> 
> Signed-off-by: Rastislav Cernay <cernay at netcope.com>
> ---
>  config/common_base          |  1 +
>  doc/guides/nics/nfb.rst     | 22 ++++++++++++++++++++++
>  drivers/net/nfb/Makefile    |  5 +++++
>  drivers/net/nfb/meson.build |  4 ++++
>  drivers/net/nfb/nfb_rx.h    | 13 +++++++++++++
>  5 files changed, 45 insertions(+)
> 
> diff --git a/config/common_base b/config/common_base
> index 6f19ad5..f533136 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -383,6 +383,7 @@ CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n
>  # Compile software PMD backed by NFB device
>  #
>  CONFIG_RTE_LIBRTE_NFB_PMD=n
> +CONFIG_RTE_LIBRTE_NFB_HW_TIMESTAMP=n
>  
>  #
>  # Compile burst-oriented Cavium Thunderx NICVF PMD driver
> diff --git a/doc/guides/nics/nfb.rst b/doc/guides/nics/nfb.rst
> index 8df76c0..a172f9a 100644
> --- a/doc/guides/nics/nfb.rst
> +++ b/doc/guides/nics/nfb.rst
> @@ -69,6 +69,10 @@ These configuration options can be modified before compilation in the
>  
>     Value **y** enables compilation of nfb PMD.
>  
> +*  ``CONFIG_RTE_LIBRTE_NFB_HW_TIMESTAMP`` default value: **n**
> +
> +   Value **y** enables HW packet timestamping.
> +
>  Using the NFB PMD
>  ----------------------
>  
> @@ -142,3 +146,21 @@ Example output:
>       TX threshold registers: pthresh=0 hthresh=0 wthresh=0
>       TX RS bit threshold=0 - TXQ flags=0x0
>     testpmd>
> +
> +Timestamp
> +----------------
> +
> +Timestamping needs to be enabled during compile time, as there is no way
> +to check whether a timestamping unit is runnig during run time.

Even if this can't be detected on runtime, it should be possible to configure in
runtime with device args so need to compile the PMD again to change the behavior.

In this patch default behavior is no timestamps support, same can be done with
devargs, without any devargs timestamp support disable, but if user provides a
devarg, like "timestamp=1", feature enabled.

What do you think, can it be possible to convert runtime configuration?


More information about the dev mailing list