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 82832A00C5; Sun, 26 Apr 2020 13:32:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64BD21C012; Sun, 26 Apr 2020 13:32:57 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 251E31BFEB for ; Sun, 26 Apr 2020 13:32:56 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id i3so15718757ioo.13 for ; Sun, 26 Apr 2020 04:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+Vm/voOcimF2zARO9WEAQOXHCET5faW4KydiCepszqQ=; b=cvNkhJpyjeW94i2Lv5foMOGJac+6rBek2I8xb1vAjU4B69MoyhO9gW/z7foaJPMNkz 0Muvm27GkzkAShgfDumWJqnUVR7fkRlPolyMagbFN3UhICCCLACZjE0kUjlORRdO1rSD fQ6DH/n3xTo9wJF7o8ioZsNVkE3Hq/IjdMl7geJpZP6OptHg93kT3wq5qtMuK9rt2mV3 UjAaE+pjxIGWXJl0Twq35H6HADxmdd9qQO9gGyImXkTMwILyX0c/sq/rQvuFTmiL39XZ eEP49Cc/Ev8jZ4jyNsqED7dxDe6+jPWEDVfxtzVBCVw5o9u9pvlQpPFtICi8vs4Mqstm KWTQ== 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=+Vm/voOcimF2zARO9WEAQOXHCET5faW4KydiCepszqQ=; b=hZsAMNSLuu8KFJY6W4sLA/B/BFZxljXioYRuPADVc7OYZ/Inez2F+q28drC5/0QC6J zuRE+kzYE8G5VNFvTuZRZHQ6I1ZCBFmi73+jGOBp6fJTh+uamoKhf2JdsPcLyPsP9e1c bp5IQglAev5exhqY+bECz2uQZLmX8A0f8R9ZtUovcjFmIoCIBk21xTyB+a+9qLDjJbMM Fu2cUbbDjirQNPViTn05+Qbwny+YCtpW64XYnLSHhjYCESqIolMc4tRoOR6RQazmysI+ WvjRB2pgPzY/7EUOu+AMk6sA21dWEXkq+bwyPe2KLmlFTAPo5wPCFs/fHy9Su6L/Jx7h EvOQ== X-Gm-Message-State: AGi0PuaB4IWYCZN1BuGIFWFb2O2/zSUbQO3PFTqaOEV7oPZwZNMaQUkZ Zyxm66JrOFUQfTa+471DXcaLWBKro8Zxe90aZcw= X-Google-Smtp-Source: APiQypITYjUXA0eiATYnR5hDi4sWgRO1i0nKBffgJE06zxwtLjWt8rEep9HDmMycmb/xsG8gIdlyFNTe81Cbg2729x4= X-Received: by 2002:a02:1c83:: with SMTP id c125mr16018711jac.112.1587900775242; Sun, 26 Apr 2020 04:32:55 -0700 (PDT) MIME-Version: 1.0 References: <20200426032245.2437733-1-dmitry.kozliuk@gmail.com> <20200426032245.2437733-3-dmitry.kozliuk@gmail.com> In-Reply-To: <20200426032245.2437733-3-dmitry.kozliuk@gmail.com> From: Jerin Jacob Date: Sun, 26 Apr 2020 17:02:39 +0530 Message-ID: To: Dmitry Kozlyuk Cc: dpdk-dev , Pallavi Kadam , Narcisa Ana Maria Vasile , Ranjit Menon , Thomas Monjalon , Jerin Jacob , Sunil Kumar Kori , Bruce Richardson , Harini Ramakrishnan , Omar Cardona , David Marchand Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 2/2] eal/windows: fix build by supporting trace 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, Apr 26, 2020 at 8:53 AM Dmitry Kozlyuk wrote: > > Add EAL private functions to support trace storage: > > * eal_persistent_data_path() > * eal_dir_create() > > Replace clock_gettime(CLOCK_REALTIME) with C11 timespec_get(). > Implementation is provided for MinGW-w64 that misses this function. > > Provide minimum viable implementations of malloc and timer functions > used by tracing. > > Fixes: 185b7dc1d467 ("trace: save bootup timestamp") > Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface") > Reported-by: Pallavi Kadam > Signed-off-by: Dmitry Kozlyuk > --- In general, the patch looks good to me. Could you split the patch as two 1) New eal_permanent_data_path() and eal_dir_create() API definition, and its implementation with unix and the common code changes to adapt new APIs. 2) Windows implementation of eal_permanent_data_path() and other missing pieces for trace implementation. Some comments below, > > void eal_free_no_trace(void *addr); > > +/** > + * Get absolute path to the directory where permanent data can be stored. > + * > + * @return > + * Statically allocated string on success, NULL on failure. > + */ > +const char * > +eal_permanent_data_path(void); Do windows have PATH_MAX kind of macro? I think, it is better API consumer allocates the memory of size PATH_MAX and implementation fills it, instead of, the static scheme. > + > +/** > + * Create a directory accessible to the current user only. > + * > + * This function does not create intermediate directories, > + * thus only the last path component may be nonexistent. > + * > + * This function succeeds if path already exists and is a directory. > + * > + * Platform-independent code should use forward slash as path separator. > + * > + * @param path > + * Path to be created. > + * @return > + * 0 on success, (-1) on failure and rte_errno is set. > + */ > +int eal_dir_create(const char *path); > Looks good to me.