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 E6F0EA04E7; Tue, 3 Nov 2020 20:08:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2F3D5A8C; Tue, 3 Nov 2020 20:07:51 +0100 (CET) Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by dpdk.org (Postfix) with ESMTP id A3B3D5A62 for ; Tue, 3 Nov 2020 20:07:49 +0100 (CET) Received: by mail-oi1-f196.google.com with SMTP id m143so10152780oig.7 for ; Tue, 03 Nov 2020 11:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=54Nl5L3yPqzjNoaenRd2YLt7YAxGqYBizH2GO8Q0gdk=; b=eLMQdAPhKHJ1RUgFeq6+3BJXoWW/WbuIS/TlKCrWnm9T5rcNE08IezHMcWHAzogoj/ Z4PeIJDmSZl1sdBXuYPhYtwa5ay97HC2qDJCbdKhzCnjYcGGzh1Tu9YpXL04cMtkA4Rs 9JNutcc8nwL/mt9EeGTD7BQ923fslINLLn868= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=54Nl5L3yPqzjNoaenRd2YLt7YAxGqYBizH2GO8Q0gdk=; b=Kgys+mk2ijQS5sKTI7eyOag4BWPJyazEh3PynU9Y2At21eaX3cFonrE9VgYSYYseYD vUhT57IS0bFd5TxFQuJe9xQ3GtoR1Qadp3/QwsKkFTYLBSpkyfAmJeNGoQnKa7iL9jBp YGCQMteWxGHFGrUvsqdVH9ck4PHpWaTHsm9Hw5+sw/WPsBLujsyB19V8WDf1hD41baqO tDbzTggEzWdK8kM5whhmzaAA90wKKoS5DNumKddL/x4zioIh9F412dg08xN8mBje6KoC 0v7eK/x6aKqBgCCienC5E92Uu7QlRs63TIPeVxivHHkGJkOROttWHVWaGWRxh5vrIa7g Uuuw== X-Gm-Message-State: AOAM530bcoU1TrxyNrQR5W3nZeoXHKbiofKTmb83VAHsesFTrJu8Kcty qoRa9500K1+4EGj+V0+gxUJlIZDbTkvFfY8FiKmvQw== X-Google-Smtp-Source: ABdhPJwJqkBnvcGtQfEU3qSBJH54zK138JtcdnJbMqZN942JOQe+VLS95e1DaLMsQ3xatB8GunDFBgxubRgh40weQAo= X-Received: by 2002:aca:38c6:: with SMTP id f189mr394125oia.27.1604430468797; Tue, 03 Nov 2020 11:07:48 -0800 (PST) MIME-Version: 1.0 References: <20201029092751.3837177-1-thomas@monjalon.net> <20201103140931.488700-1-thomas@monjalon.net> <20201103140931.488700-14-thomas@monjalon.net> In-Reply-To: <20201103140931.488700-14-thomas@monjalon.net> From: Ajit Khaparde Date: Tue, 3 Nov 2020 11:07:32 -0800 Message-ID: To: Thomas Monjalon Cc: dpdk-dev , Ferruh Yigit , David Marchand , Bruce Richardson , Olivier Matz , Andrew Rybchenko , Jerin Jacob Kollanukkaran , Slava Ovsiienko Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v5 13/16] ethdev: add doxygen comment for Rx timestamp API 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" On Tue, Nov 3, 2020 at 6:15 AM Thomas Monjalon wrote: > > The offload flag DEV_RX_OFFLOAD_TIMESTAMP had no documentation. > After switching to dynamic mbuf flag and field, > it becomes even more important to explicit the feature behaviour. > > A doxygen comment for the timesync API was mentioning > the deprecated timestamp field, so it is also updated. > > Signed-off-by: Thomas Monjalon > Acked-by: David Marchand > Acked-by: Andrew Rybchenko Acked-by: Ajit Khaparde > --- > lib/librte_ethdev/rte_ethdev.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h > index e341a08817..4988054cb2 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -1344,6 +1344,11 @@ struct rte_eth_conf { > #define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400 > #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 > #define DEV_RX_OFFLOAD_SECURITY 0x00008000 > #define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000 > @@ -4646,7 +4651,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. > -- > 2.28.0 >