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 15429A09E4; Sat, 5 Dec 2020 14:52:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EAABBC944; Sat, 5 Dec 2020 14:52:07 +0100 (CET) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 376D22E81 for ; Sat, 5 Dec 2020 14:52:06 +0100 (CET) Received: by mail-lj1-f193.google.com with SMTP id y7so9839687lji.8 for ; Sat, 05 Dec 2020 05:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d/7TOU8V6rY+vXxaFf1WpfSbIFi+aXtpU4g+LuB7atY=; b=RjUnINVOXDieMwNpdePNNvuVZ8e6Ab07XNtK6vgFZZTGbjtSK/1tO1jCWvQTiog2Lt 0rWk31tIKC6AL0AkSVWHsmcO33b9QJYBQQVw4OTSiJkAcQakGHajnQOFuZLx1yRx69Ol fulnZFXla0oMmQT/q3U1kSikx3ItgFaFweSMtU3VEw2JZa/CzvvmFzT66ABb30c3IGsL i+XNvoazCRHtvbaNbzAM2TxA8VXCLVol+KcOAA2UK9ugFO/bOVbHnxhoFizrMJsYHy3D Uc0Cjrg4xZdDYSizikmBa5RXflTJwyrwQbHs/AHp9WEcvemCas4qWb0IteXrwcGE03gz fPrA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=d/7TOU8V6rY+vXxaFf1WpfSbIFi+aXtpU4g+LuB7atY=; b=NjPvC1gAoKOrb+8xPM5JwlD/PmQJJ4mkM5nMDfYwpUUHwg2XT0Hob8PBTRH8NG3KPT 2uYSbBBFVkYRJz8oVCQwQPZDf7+W/cI6VPKMoRF+n/oDdWgjEq+V0ZmimUIcHjeRQvBX ob8xdsRViwnrSMDQYLPnoluM6UKq2XmktD0eoxI3ci5iwsMPWLB99MytLARn/UY2xK58 z9OukDgx55u20+c/e1YFAZgCH+xLYQU3808CA3SluiGnsK90G7lub8VE0qLflJouwFdw w3zwuPX7ter7e+66mm3DVdr5RhjP+eK55HCZd58l0W4KaQLB0BqgHQ2nOcc2zLGUMpfv g1nQ== X-Gm-Message-State: AOAM531p4dgDDOJmbhIqP9J1ZOINryVrgUNyGNvUT0RYcuorUuy73em6 riFzsRCOnU3JnYKojVgjrVQ= X-Google-Smtp-Source: ABdhPJzNbQpB3HnOCIRneONb2Z/ilofeH7ctcFr91jdq0XtN7riY5aK95OCHHCrcL/Fy96W2V2Dn6A== X-Received: by 2002:a2e:574c:: with SMTP id r12mr2921282ljd.139.1607176325795; Sat, 05 Dec 2020 05:52:05 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id v9sm2289180lfd.287.2020.12.05.05.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2020 05:52:05 -0800 (PST) Date: Sat, 5 Dec 2020 16:52:04 +0300 From: Dmitry Kozlyuk To: Pallavi Kadam Cc: dev@dpdk.org, thomas@monjalon.net, ranjit.menon@intel.com, Narcisa.Vasile@microsoft.com, talshn@nvidia.com, ferruh.yigit@intel.com, beilei.xing@intel.com, jia.guo@intel.com Message-ID: <20201205165204.10e30d17@sovereign> In-Reply-To: <20201205011020.6276-3-pallavi.kadam@intel.com> References: <20201205011020.6276-1-pallavi.kadam@intel.com> <20201205011020.6276-3-pallavi.kadam@intel.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows 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 Fri, 4 Dec 2020 17:10:19 -0800, Pallavi Kadam wrote: You could drop "add changes" and "i40e PMD" from subject line, as any commit changes something and topic is "net/i40e" already. > Adding build changes to compile i40e PMD on windows. This is redundant given the commit subject. Please use present simple tense for changes description (this applies to sibling patches). > Disabling few warnings with Clang such as comparison of integers of > different signs and macro redefinitions. > Also, adding linking dependency source file rte_random.c file to > Windows. > > Signed-off-by: Pallavi Kadam > Reviewed-by: Ranjit Menon > --- > drivers/net/i40e/base/i40e_osdep.h | 3 +++ > drivers/net/i40e/i40e_ethdev_vf.c | 3 ++- > drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 ++ > drivers/net/i40e/i40e_tm.c | 2 +- > drivers/net/meson.build | 9 ++++++--- > lib/librte_eal/common/meson.build | 1 + > lib/librte_eal/rte_eal_exports.def | 1 + > lib/librte_eal/windows/include/rte_windows.h | 5 +++++ > 8 files changed, 21 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h > index 9b5033024..fa22df122 100644 > --- a/drivers/net/i40e/base/i40e_osdep.h > +++ b/drivers/net/i40e/base/i40e_osdep.h > @@ -67,8 +67,11 @@ typedef enum i40e_status_code i40e_status; > #define false 0 > #define true 1 > > +/* Avoid macro redifinition warning on Windows */ > +#ifndef RTE_EXEC_ENV_WINDOWS > #define min(a,b) RTE_MIN(a,b) > #define max(a,b) RTE_MAX(a,b) > +#endif Windows min() and max() macros evaluate arguments twice [1], which can be unacceptable in driver code if used with MMIO. Better #undef min and max first, then let PMD define them. It seems we'll have to do that for many PMDs, because rte_os.h must not erase platform-specific macros, and rte_windows.h is not for generic PMDs. [1]: https://docs.microsoft.com/en-us/windows/win32/multimedia/max > diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c > index 7a558fc73..cf2dc88c5 100644 > --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c > +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c > @@ -12,7 +12,9 @@ > #include "i40e_rxtx.h" > #include "i40e_rxtx_vec_common.h" > > +#ifndef RTE_EXEC_ENV_WINDOWS > #include > +#endif Just #include , it takes care of x86intrin.h for Windows. > diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h > index b82af34f6..822922c11 100644 > --- a/lib/librte_eal/windows/include/rte_windows.h > +++ b/lib/librte_eal/windows/include/rte_windows.h > @@ -18,6 +18,11 @@ > #define WIN32_LEAN_AND_MEAN > #endif > > +#ifdef __clang__ > +#undef _m_prefetchw > +#define _m_prefetchw __m_prefetchw > +#endif > + Please explain in the commit message which problem this solves. Can't x86intrin.h be replaced by rte_vect.h in rte_random.c? If it's still necessary, __clang__ should be RTE_TOOLCHAIN_CLANG.