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 4EE0EA04E7; Mon, 2 Nov 2020 16:32:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E79A1C92A; Mon, 2 Nov 2020 16:32:36 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 5098BC928 for ; Mon, 2 Nov 2020 16:32:34 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id g12so15085365wrp.10 for ; Mon, 02 Nov 2020 07:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nD485Lmp3pHrzkECsCOWKM0weliRFKIwvcsax8W5yWY=; b=T3W9npdOxojgq+x69CuCSPtejPbBnFcvKaMfVTdOe8yv5gupye3xJV0zXS6IvWmOOf LjOcoUfE11vLlagaFRe9ZpPiWe50AJmyk1cX++DmbMug3P7hwy9dfTP3WA0tzuwa7oK2 LuKIDJhSn/WE0o036/CgDrm1kgs4XzG0gukDCd1dX7z9NSmSNlY7DAjeKYh2ZEvA5R0o 2ZKu8QNSTgKWj6P7UW+MlC5fTdWMgTG3TDQW1L2DuIGYE6NG0R3O8XowL5fxH87FBoVq +/wvYRuhLVuFU9I0R9U5frPJq9Sd6rnWDKfPNypJVtkaq3PC4DdyMCWf1TA94a9tXocK kGCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nD485Lmp3pHrzkECsCOWKM0weliRFKIwvcsax8W5yWY=; b=Z5Bc409z69shWJWWa02Qmo6y0RCxV2cb0Pcteoqg7FCqzzwcxRKqbl9DYkbdijEm4T 47t69hF4BPEmfzhhiwY0Xo8VaLM9Hp+GMxyuj9CQu4SOIoPFaDBX2oio2KEi9rnkpMHS mFqN3/OY2sPUihwPb+iHUmNoe2H2Nct7owA4dLFxa2VpXFldQhxqfK5N0Ucp3IzmX4CL fa/UHB26NgEhXReyHzdwRZsLfmCOTmM/lwZQ+Yo9UOLnbbZZt1JggwtnzTZeukYm+i1j M3iKOz+ayeKvLgn5uu+ZYulPXOUfW09RYaPzcU32vxCx+3KzL+5UoHQmXphic3qQtxYx sYRA== X-Gm-Message-State: AOAM530InbB9oDeLdHo3WCzKFVDVpr9UWbjNi41qACMliGHhnfKKEQEK YBfUwdcNmvXxXwF78uoWJ2bsDg== X-Google-Smtp-Source: ABdhPJyj1+8KesyX47BISlQZRKYK6eZit5uEiZXZzCoReNREhFATlPPni66+0IOSgfcWVUgUcvAfug== X-Received: by 2002:adf:e6cf:: with SMTP id y15mr22250194wrm.116.1604331153097; Mon, 02 Nov 2020 07:32:33 -0800 (PST) Received: from 6wind.com (2a01cb0c0005a600345636f7e65ed1a0.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:3456:36f7:e65e:d1a0]) by smtp.gmail.com with ESMTPSA id s9sm25728763wrf.90.2020.11.02.07.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 07:32:32 -0800 (PST) Date: Mon, 2 Nov 2020 16:32:31 +0100 From: Olivier Matz To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com, viacheslavo@nvidia.com, Shepard Siegel , Ed Czeck , John Miller Message-ID: <20201102153231.GY1898@platinum> References: <20201029092751.3837177-1-thomas@monjalon.net> <20201101180626.2198868-1-thomas@monjalon.net> <20201101180626.2198868-6-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201101180626.2198868-6-thomas@monjalon.net> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v2 05/14] net/ark: switch timestamp to dynamic mbuf field 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 Sun, Nov 01, 2020 at 07:06:17PM +0100, Thomas Monjalon wrote: > The mbuf timestamp is moved to a dynamic field > in order to allow removal of the deprecated static field. > The related dynamic mbuf flag is set, although was missing previously. > > The timestamp is set if configured for at least one device. > > Signed-off-by: Thomas Monjalon > --- > drivers/net/ark/ark_ethdev.c | 23 +++++++++++++++++++++++ > drivers/net/ark/ark_ethdev_rx.c | 10 +++++++++- > 2 files changed, 32 insertions(+), 1 deletion(-) <...> > --- a/drivers/net/ark/ark_ethdev_rx.c > +++ b/drivers/net/ark/ark_ethdev_rx.c > @@ -15,6 +15,9 @@ > #define ARK_RX_META_OFFSET (RTE_PKTMBUF_HEADROOM - ARK_RX_META_SIZE) > #define ARK_RX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM) > > +extern uint64_t ark_timestamp_rx_dynflag; > +extern int ark_timestamp_dynfield_offset; > + Wouldn't it be better in a .h ? Maybe ark_ethdev_rx.h > /* Forward declarations */ > struct ark_rx_queue; > struct ark_rx_meta; > @@ -272,7 +275,12 @@ eth_ark_recv_pkts(void *rx_queue, > mbuf->port = meta->port; > mbuf->pkt_len = meta->pkt_len; > mbuf->data_len = meta->pkt_len; > - mbuf->timestamp = meta->timestamp; > + /* set timestamp if enabled at least on one device */ > + if (ark_timestamp_rx_dynflag > 0) { > + *RTE_MBUF_DYNFIELD(mbuf, ark_timestamp_dynfield_offset, > + rte_mbuf_timestamp_t *) = meta->timestamp; > + mbuf->ol_flags |= ark_timestamp_rx_dynflag; > + } > rte_pmd_ark_mbuf_rx_userdata_set(mbuf, meta->user_data); > > if (ARK_DEBUG_CORE) { /* debug sanity checks */ > -- > 2.28.0 >