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 6FB54A04AA; Tue, 8 Sep 2020 10:14:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C79462BAB; Tue, 8 Sep 2020 10:14:31 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id DA3F82BA8 for ; Tue, 8 Sep 2020 10:14:29 +0200 (CEST) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 08 Sep 2020 16:14:28 +0800 Received: from HKMAIL101.nvidia.com ([10.18.16.10]) by hkpgpgate101.nvidia.com (PGP Universal service); Tue, 08 Sep 2020 01:14:28 -0700 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Tue, 08 Sep 2020 01:14:28 -0700 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 8 Sep 2020 08:14:19 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 8 Sep 2020 08:14:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eaP/jDLhKHlXw9xHgulkBPRqyClx7iiHtCzkBtAUDEGiD93oAdRIgukntMhHcISO7OWj2Fx/8hrRXdFAAEx/DERtv+XTehgOXDVebrwmNG/q6SQTUzMO42uJaFYfqjeQYEwqcVcHIzfsKvjNCj3uTgjumznzKePC85CM+Pw7j2HO/MBJaB3pALnJbO/LPS0dpmcOo6OpSH8/LXZ5O/hXcYQZjzD0hBd5yehi7nES6vTias4PsPJBYa80dLXejQe1RDEk/vVlVQDQT8gS0bg27UqTuMYXs7KRN2xlmA6LYgyQM3yrwd5FuhXILyOaTgmUB0rpcvXVOHbIfPpYBzcQPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wIHLfQAJGZRNSrYRL9+DGaMvqQxuMFVH87rxbrpT58A=; b=HEVqZyqRf0SZxlHmDcRuWiCaZEfjtL4mbw+KyLy2B1FaNw51f1ssrb/J0Q0AGhpsLqBlhvahAOG1ZJ+DYXL5BKWbde0a3d7ymFRiEw91b9OcP4/FgxnKybr1qB1B9oAuVjfstN0FP2UtuwgXlSmKsJa70HcE8VYiFI1T0ppuGF5wPVu7iwGHkTqerIayzvKGeb138FRQkg7EgTd0BDauqcW475JMnQbZrP1PS0cKbWGkzz+lmzose3/mUD0V7mqUQAmm5kCaD05czeI7BOkjxPAeGomGvj2tmUkV5U/IFvb+mzSQB4h9dLP8uANeUXkgqX+vnXWfb/PL2puYKhGjgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM5PR12MB1161.namprd12.prod.outlook.com (2603:10b6:3:73::16) by DM5PR1201MB0219.namprd12.prod.outlook.com (2603:10b6:4:56::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Tue, 8 Sep 2020 08:14:17 +0000 Received: from DM5PR12MB1161.namprd12.prod.outlook.com ([fe80::b0b9:2a96:7ad7:9a93]) by DM5PR12MB1161.namprd12.prod.outlook.com ([fe80::b0b9:2a96:7ad7:9a93%8]) with mapi id 15.20.3370.016; Tue, 8 Sep 2020 08:14:17 +0000 From: Ophir Munk To: Fady Bader , "dev@dpdk.org" CC: NBU-Contact-Thomas Monjalon , Tasnim Bashar , Tal Shnaiderman , Yohad Tor , "dmitry.kozliuk@gmail.com" , "harini.ramakrishnan@microsoft.com" , "ocardona@microsoft.com" , "pallavi.kadam@intel.com" , "ranjit.menon@intel.com" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v4 3/3] eal/windows: librte_net build on Windows Thread-Index: AQHWafPR/gDmjV5bO0yP0kabnEs09alem2/g Date: Tue, 8 Sep 2020 08:14:17 +0000 Message-ID: References: <20200610120040.17968-1-fady@mellanox.com> <20200723070825.6448-1-fady@mellanox.com> <20200723070825.6448-4-fady@mellanox.com> In-Reply-To: <20200723070825.6448-4-fady@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [84.229.96.120] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9db7653a-9f73-4b8e-7ea6-08d853cf2e48 x-ms-traffictypediagnostic: DM5PR1201MB0219: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:2582; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iDsL3/ODetLlVK1J8uEu6WSD/seY+xq+oLlX09HeGrhEqSgpZH2iEgDXUcfq14yWWR1d0km/qLUCOQhSMF9Gv5b+DYgA8YWX0dUDo8Un0lzDGPSr7PT0rQb/WcCrwz36gg+Y4bdRvgiNbyVHkgF+iEHGUQO5vN4UrxAb9s2bc6IpSWLwBfEiCwDH0i6swJa72wGWR4BkeOCHNUOZUjwbCcIcznFcdQA2F+oNx/XzlaEVMVBvg7FdG9zsXVFFBtPNVF/ml4YvKeximCfyC6hP8Di4+HQjV66MpQhXq0Wx3G4C+QBW9Yh15VcDh5s10XBXqtlaDp/tC+tzJLxX0/3m7w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1161.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(136003)(396003)(376002)(346002)(66556008)(64756008)(66446008)(55016002)(5660300002)(8936002)(66946007)(76116006)(478600001)(186003)(45080400002)(26005)(86362001)(8676002)(4326008)(7696005)(53546011)(71200400001)(6506007)(316002)(2906002)(66476007)(83380400001)(54906003)(110136005)(9686003)(33656002)(52536014)(66574015); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: eVUuVGYbRoXPzDv2xaA/I01V267kqQ0KnQbVSWC6Te08b8mWmK8LnMDK8facPip0DyPI/7qxvYdiIKsHFw6xAlg6o97mZVTs0rXRG2a/Y3qicA0Kk/B9qnzsQc1uu09XWz7WB9WfwjPb0fOK7+2zNBQeoVEs16fmtEUgyJM4Gd2E+z7+Uc6PMf2Xc0b07rgBiqZI/ziJhmvFHVj3xtMpBSZaegAi/GQoOTtB+DzF1QBztTl/0Mbhn6Tk+0yDDVWi6SrswS0UkVUXYs0ROJlcPaoWlR79d4YUzab9SCedv+lG18pCGfI5DqoBL6rf+enifTwFg8hZ6Xb3AZdccKSf00aFBTKNyDgOqLcpicGjp/Q0WbKjkRn6JZlolICFJxDZ8vYBFcAgP/+Q6WKg3ZLWjIlpiXwXVY7NQf8VMD9TDdZ2mnDdz/DxT10/IgyKboSJHgwdXyyAgvhDRYbZTooB9uL75IGcVwJbRPw7O/D0fBtm29gSrJAQul945DCxejo7Fl6rYvIvRLxuyOdlFeHbswwnp6A2IqnCGoIoKpgyUBVinSi4q0PWay/DhvrXTkk2JS7b0RcF+I6DGqHF1/hyZSAj8VB3M1ZjJQLxk8JlSRcZREgV44zhM95tmBpToo9/fZzniImXoO+DY7JqEq1fcQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1161.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9db7653a-9f73-4b8e-7ea6-08d853cf2e48 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2020 08:14:17.0694 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uU5GvRbq4mwZwm4FOu+2IXXIs8fVWQb1Zoa0H7QENP1avG+DNeJ12o9c8VEQ3VmZZuo1BQF0lVRvQpu9Mi60eQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0219 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1599552868; bh=wIHLfQAJGZRNSrYRL9+DGaMvqQxuMFVH87rxbrpT58A=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-microsoft-antispam-prvs:x-ms-exchange-transport-forked: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=j4GctahVmqypuym6DqmKMotjzUr96jiY48phRx7CGHHzwnMhmFpnklW9EVRWCDLvO AZvEFj8Cdud3as7LDoPB3DlhA/Vx2f8oLunMNCpB1brCpwn9YUSm9OyCZqv5LYU2hT YHfpmJJ8AzhapZng3hEVltJhsZvK6p577SBnfJlMtB6TZAnLzORKmeGFuLLP9As4Ks ielD5sefnPHjSJQAu5MiR7a1Nhx/IAXenemrZeGx/jhGto6WDM3s/dsff4L/zj+oTZ Yy4UoRHzI8fE6kAlFkh6jhWXJlQGKYKUv4oVex6r1uJsBefCCeMfksgF86DSiV1FIH cXmmJLFhsN1vw== Subject: Re: [dpdk-dev] [PATCH v4 3/3] eal/windows: librte_net build 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" Please add IPPROTO_ICMP and IPPROTO_ICMPV6 definitions: #define IPPROTO_IP 0 +#define IPPROTO_ICMP 1 /* Internet Ctrl Message Protocol */ #define IPPROTO_HOPOPTS 0 @@ -17,6 +18,7 @@ #define IPPROTO_AH 51 /* IP6 Auth Header */ +#define IPPROTO_ICMPV6 58 /* Internet Ctrl Message Protocol V6 */ #define IPPROTO_NONE 59 /* IPv6 no next header */ > -----Original Message----- > From: dev On Behalf Of Fady Bader > Sent: Thursday, July 23, 2020 10:08 AM > To: dev@dpdk.org > Cc: Thomas Monjalon ; Tasnim Bashar > ; Tal Shnaiderman ; > Yohad Tor ; dmitry.kozliuk@gmail.com; > harini.ramakrishnan@microsoft.com; ocardona@microsoft.com; > pallavi.kadam@intel.com; ranjit.menon@intel.com; > olivier.matz@6wind.com > Subject: [dpdk-dev] [PATCH v4 3/3] eal/windows: librte_net build on > Windows >=20 > librte_net wasn't compiling under Windows. > To solve this, needed header files were added. >=20 > Signed-off-by: Fady Bader > --- > lib/librte_eal/windows/include/netinet/in.h | 23 > +++++++++++++++++++++++ lib/librte_eal/windows/include/netinet/ip.h | > 10 ++++++++++ > lib/librte_net/rte_ether.c | 4 ++++ > lib/meson.build | 2 +- > 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 > lib/librte_eal/windows/include/netinet/in.h > create mode 100644 lib/librte_eal/windows/include/netinet/ip.h >=20 > diff --git a/lib/librte_eal/windows/include/netinet/in.h > b/lib/librte_eal/windows/include/netinet/in.h > new file mode 100644 > index 0000000000..2be25c8bea > --- /dev/null > +++ b/lib/librte_eal/windows/include/netinet/in.h > @@ -0,0 +1,23 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright 2020 Mellanox Technologies, Ltd */ > + > +#ifndef _IN_H_ > +#define _IN_H_ > + > +#define IPPROTO_IP 0 /* Dummy for IP */ > +#define IPPROTO_HOPOPTS 0 /* IPv6 Hop-by-Hop options */ > +#define IPPROTO_IPIP 4 /* IPIP tunnels (for compatibility) *= / > +#define IPPROTO_TCP 6 /* Transmission Control Protocol */ > +#define IPPROTO_UDP 17 /* User Datagram Protocol */ > +#define IPPROTO_IPV6 41 /* IPv6 header */ > +#define IPPROTO_ROUTING 43 /* IPv6 routing header */ > +#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ > +#define IPPROTO_GRE 47 /* General Routing Encap */ > +#define IPPROTO_ESP 50 /* IPsec Encap Sec. Payload */ > +#define IPPROTO_AH 51 /* IPsec Auth Header */ > +#define IPPROTO_NONE 59 /* IPv6 no next header */ > +#define IPPROTO_DSTOPTS 60 /* IPv6 destination option */ > +#define IPPROTO_SCTP 132 /* Stream Control Transmission Protoc= ol > */ > + > +#endif > diff --git a/lib/librte_eal/windows/include/netinet/ip.h > b/lib/librte_eal/windows/include/netinet/ip.h > new file mode 100644 > index 0000000000..2126498797 > --- /dev/null > +++ b/lib/librte_eal/windows/include/netinet/ip.h > @@ -0,0 +1,10 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright 2020 Mellanox Technologies, Ltd */ > + > +#ifndef _IP_H_ > +#define _IP_H_ > + > +#define IPVERSION 4 > + > +#endif > diff --git a/lib/librte_net/rte_ether.c b/lib/librte_net/rte_ether.c inde= x > ced65ed9f3..6055ae1463 100644 > --- a/lib/librte_net/rte_ether.c > +++ b/lib/librte_net/rte_ether.c > @@ -10,12 +10,16 @@ > void > rte_eth_random_addr(uint8_t *addr) > { > +#ifdef RTE_EXEC_ENV_WINDOWS > + RTE_SET_USED(addr); /* random is not supported yet */ #else > uint64_t rand =3D rte_rand(); > uint8_t *p =3D (uint8_t *)&rand; >=20 > rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN); > addr[0] &=3D (uint8_t)~RTE_ETHER_GROUP_ADDR; /* clear > multicast bit */ > addr[0] |=3D RTE_ETHER_LOCAL_ADMIN_ADDR; /* set local > assignment bit */ > +#endif > } >=20 > void > diff --git a/lib/meson.build b/lib/meson.build index 3852c01564..6bbaf242= a9 > 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -40,7 +40,7 @@ if is_windows > 'kvargs', > 'eal', > 'ring', > - 'mempool', 'mbuf', 'pci', > + 'mempool', 'mbuf', 'pci', 'net', > ] # only supported libraries for windows endif >=20 > -- > 2.16.1.windows.4