From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17E06C433E0 for ; Wed, 10 Jun 2020 12:34:15 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 9E4C32078C for ; Wed, 10 Jun 2020 12:34:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uqKd7smY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E4C32078C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6BD171BEDD; Wed, 10 Jun 2020 14:34:13 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id D336A1BECF for ; Wed, 10 Jun 2020 14:34:11 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id r77so1960142ior.3 for ; Wed, 10 Jun 2020 05:34:11 -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=vFMJEr9ASUC3Ye0wMmK84tDPxO6R0uRJ8cctFeyB2L8=; b=uqKd7smYdEdW13nYEeuX9BkBiEqOHD2oi++tg/VCyoS5+R+6tYw6m3ZR17wv6aptch 4TWdVADdBa/bvRjjrpMYLOmnlQHy78TzpIFSAZajxoq8bPQ2cpB91qguq1d9UwZYZ/ow c9nGlcXSa0Nkbe7X2VMvxLM7BtbP42qG/It4x/RPRm3kJ01C8tTS20jz4uXRfc2NxM4U XH8Js2Jmx3IUrDs2wR202l/g66ZVDTMa4zukO7UTKVtDvMkpLj3HFzRkA3UMzgBfs+94 PWGwPo+bkBsMruMVKuIgRCTkMefPLiMGqMK828WsY3Td76zRrjUCbGqaRpKkRkqk6k9O J1QA== 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=vFMJEr9ASUC3Ye0wMmK84tDPxO6R0uRJ8cctFeyB2L8=; b=j2PwjstUtWW11koa477RPjFkCDbOpISDjHL3mcY4QAQ0Qcw/XhZB1nESfPNer8cJK0 zBBFsHz789oMsM4g8B6mohubQRTu0bbuVrd+ib//lstcmbirdgKFUIupZZvBtOpBVZAE SsrZz1/j3NSyrRY+JxOhIVtEd7LZ5rSOD9/pMHVhJ+BbRXoLhLbSrcZAbCR+iV6Abhms etd7BVYXSyF8DbgEZ2InayhHy7KBmaLLGKW5DmroiWAgTm/LHFLeqQYUNPbfWLTbqHrF WlftGFq2uJNVHGyxjLwLBMhfluX3iqRxFKmtrVJ8rXmwdYFym6uIU/a5SH4chxJei9D2 aiUw== X-Gm-Message-State: AOAM533grRZr4CvUCL2Sc3Z6jFrW1zRU+FmLTPUjc3cNTj5HbJMmX41x hu59KXnGReF+QHtt0mT96Wykvmya3ee46WzsHuA= X-Google-Smtp-Source: ABdhPJylGlqDmwp8ajzTQ8rr0UQRzOkp4isa6LazT1JFsSAMWUAUAXcIV/VAajFDBZAF3rtNRiSMK3xqHtHhZzBc220= X-Received: by 2002:a02:6d0a:: with SMTP id m10mr2821215jac.133.1591792450563; Wed, 10 Jun 2020 05:34:10 -0700 (PDT) MIME-Version: 1.0 References: <'20200610112326.18576-1-fady@mellanox.com'> <20200610120040.17968-1-fady@mellanox.com> <20200610120040.17968-3-fady@mellanox.com> In-Reply-To: <20200610120040.17968-3-fady@mellanox.com> From: Jerin Jacob Date: Wed, 10 Jun 2020 18:03:54 +0530 Message-ID: To: Fady Bader Cc: dpdk-dev , Thomas Monjalon , tbashar@mellanox.com, Tal Shnaiderman , yohadt@mellanox.com, Dmitry Kozlyuk , Harini Ramakrishnan , Omar Cardona , Anand Rawat , "Menon, Ranjit" , Olivier Matz Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 2/3] net: add htons to minGW for 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 Wed, Jun 10, 2020 at 5:31 PM Fady Bader wrote: > > htons wasnt defined in Windows for the minGW compiler. > Definition of htons was added in order to use htons. > > Signed-off-by: Fady Bader > --- > lib/librte_eal/windows/include/rte_os.h | 4 ++++ > lib/librte_net/rte_arp.c | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h > index bab011a5c..95525123f 100644 > --- a/lib/librte_eal/windows/include/rte_os.h > +++ b/lib/librte_eal/windows/include/rte_os.h > @@ -28,6 +28,10 @@ extern "C" { > > #define strerror_r(a, b, c) strerror_s(b, c, a) > > +#ifdef RTE_TOOLCHAIN_GCC > +#define htons(x) (rte_cpu_to_be_16(x)) > +#endif > + > /* strdup is deprecated in Microsoft libc and _strdup is preferred */ > #define strdup(str) _strdup(str) > > diff --git a/lib/librte_net/rte_arp.c b/lib/librte_net/rte_arp.c > index 784b7f48f..8fd431c54 100644 > --- a/lib/librte_net/rte_arp.c > +++ b/lib/librte_net/rte_arp.c > @@ -2,7 +2,9 @@ > * Copyright(c) 2018 Intel Corporation > */ > > +#ifndef RTE_EXEC_ENV_WINDOWS > #include > +#endif I think, replacing htons() with rte_cpu_to_be_16() in rte_arp.c will the clean solution to avoid #ifndef. > > #include > > -- > 2.16.1.windows.4 >