From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id DC2592E83 for ; Wed, 11 Nov 2015 12:25:20 +0100 (CET) Received: by wmdw130 with SMTP id w130so108786062wmd.0 for ; Wed, 11 Nov 2015 03:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=cimsrqamKRvXBJMIn5J0igXpl9MtijrWD6XhvfVoZV8=; b=cu+LAR+tvaeL1ChMAu30UyXOIj6pVPstPaoSo4Pn3SHI4j6Q4S0vs3h3wNrQJZGrhz 8NmM25Qh7TJLJIfbN4ujCbtObTLjny3oy7gKLvDEZdLGrCzYDKmCz3LYOW1KC49nzAZS gWXMJ80jfc8aPEAK/qtqYEzEYQ5g3Hfr3J+yCTQGnBiwwzN10EpoqcCD21UcuaNZ1IFV sQNXixJdq8WnCH0ZTInGk/mGub8jg2RD9qijj4cYxHcCf4ivP22ufMnapZU441ELqBJp sczD0ITwlfr8H5Qc+tCuhtjT/+HjRwkqEwMZBkvWiR3Ea/XRk0cUgo/SkAeSDFI2BZ/0 wptA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=cimsrqamKRvXBJMIn5J0igXpl9MtijrWD6XhvfVoZV8=; b=mtUz/F7tQ070YrLsglAxtFpzs/xN0mBgLvWmEB9XAGUjGJIvCAfxG6lITi42rQug1w +0WarzcAMZUi/3p6Qj31Cb/LjOK/d5UVZhHrog1vL7pF44hDlrdpJ2Kv0C/Km7lBfSZt 21MOGgJ+c2WyBDRlWb240pu+OkoEBnlLtZ7naVWjGlZtKlAFT3sfe0NSJhtb6brWnGS9 wvnbeHW+2Gs8eKSVmQlAppIgh/j8PSF20a8FNgS/Kr9bG4pdsAVcNroSv8K85Ucusnmu 9GqvvLZp6sYu5rDK4EAcjWmRPQXlhuk7s8NJNBEiED1cm2T9ytnrWv2Ml11WoERMjgvB j44Q== X-Gm-Message-State: ALoCoQk8hM5HRSBgjk2wBGE/vvws1Nz6GOw5x/AfRzpo7wAffIbWZ6FBsIkQ5fXmYQG/omYyqmXA X-Received: by 10.28.94.208 with SMTP id s199mr10755798wmb.10.1447241120670; Wed, 11 Nov 2015 03:25:20 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id c1sm8506100wjf.19.2015.11.11.03.25.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Nov 2015 03:25:19 -0800 (PST) From: Thomas Monjalon To: "Mcnamara, John" Date: Wed, 11 Nov 2015 12:24:08 +0100 Message-ID: <9597952.RAeuTaHzco@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1443799208-9408-1-git-send-email-danielx.t.mrzyglod@intel.com> <3105785.kBVynf3MPa@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 2/7] net: Add common PTP structures and functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 11:25:21 -0000 2015-11-11 10:45, Mcnamara, John: > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > The library librte_net gather some structures and functions for network > > headers/layers parsing. > > These PTP functions looks really generic. Why not add them in EAL? > > Maybe they could benefit from specific implementations in the arch/ > > directory. > > Hi Thomas, > > How about the following location and new header file? > > lib/librte_eal/common/include/rte_time.h Yes > > > +static inline uint64_t > > > +timespec_to_ns(const struct timespec *ts) > > [...] > > > +static inline struct timespec > > > +ns_to_timespec(uint64_t nsec) > > [...] > > > +static inline uint64_t > > > +cyclecounter_cycles_to_ns(const struct cyclecounter *cc, > > > + uint64_t cycles, uint64_t mask, uint64_t *frac) > > [...] > > > +static inline uint64_t > > > +cyclecounter_cycles_to_ns_backwards(const struct cyclecounter *cc, > > > + uint64_t cycles, uint64_t frac) > > > > They must be prefixed with rte_ with full doxygen comments. > > We can do that. But is the intention that these function are public? We really only need them internally. It is possible that they could be used somewhere else but probably not likely. How about if we document them but mark them as @internal in Doxygen. Then if they are require by some other libs they can be made external at a later stage. Yes they can be marked @internal with rte_ prefix.