DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ophir Munk <ophirmu@nvidia.com>
To: Fady Bader <fady@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	Tasnim Bashar <tbashar@mellanox.com>,
	Tal Shnaiderman <talshn@mellanox.com>,
	Yohad Tor <yohadt@mellanox.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	 "harini.ramakrishnan@microsoft.com"
	<harini.ramakrishnan@microsoft.com>,
	"ocardona@microsoft.com" <ocardona@microsoft.com>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"ranjit.menon@intel.com" <ranjit.menon@intel.com>,
	 "olivier.matz@6wind.com" <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [PATCH v4 3/3] eal/windows: librte_net build on Windows
Date: Tue, 8 Sep 2020 08:14:17 +0000
Message-ID: <DM5PR12MB1161ED0676B62B92F0F7ABB9DC290@DM5PR12MB1161.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20200723070825.6448-4-fady@mellanox.com>

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 <dev-bounces@dpdk.org> On Behalf Of Fady Bader
> Sent: Thursday, July 23, 2020 10:08 AM
> To: dev@dpdk.org
> Cc: Thomas Monjalon <thomas@monjalon.net>; Tasnim Bashar
> <tbashar@mellanox.com>; Tal Shnaiderman <talshn@mellanox.com>;
> Yohad Tor <yohadt@mellanox.com>; 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
> 
> librte_net wasn't compiling under Windows.
> To solve this, needed header files were added.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  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
> 
> 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 Protocol
> */
> +
> +#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 index
> 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 = rte_rand();
>  	uint8_t *p = (uint8_t *)&rand;
> 
>  	rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN);
>  	addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR;	/* clear
> multicast bit */
>  	addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR;	/* set local
> assignment bit */
> +#endif
>  }
> 
>  void
> diff --git a/lib/meson.build b/lib/meson.build index 3852c01564..6bbaf242a9
> 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
> 
> --
> 2.16.1.windows.4


  reply	other threads:[~2020-09-08  8:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <'20200610112326.18576-1-fady@mellanox.com'>
2020-06-10 12:00 ` [dpdk-dev] [PATCH v2 0/3] compile librte_net for windows Fady Bader
2020-06-10 12:00   ` [dpdk-dev] [PATCH v2 1/3] net: fix s_addr redefinition in Windows Fady Bader
2020-06-10 12:00   ` [dpdk-dev] [PATCH v2 2/3] net: add htons to minGW for Windows Fady Bader
2020-06-10 12:33     ` Jerin Jacob
2020-06-10 12:00   ` [dpdk-dev] [PATCH v2 3/3] eal/windows: librte_net build on Windows Fady Bader
2020-06-16  9:04     ` Thomas Monjalon
2020-07-06  8:44       ` Fady Bader
2020-06-20 19:22     ` Dmitry Kozlyuk
2020-06-28  9:48       ` Fady Bader
2020-07-17 22:22         ` Narcisa Ana Maria Vasile
2020-07-20 12:54           ` Fady Bader
2020-07-20 16:26             ` Dmitry Kozlyuk
2020-07-22 10:20               ` Fady Bader
2020-07-22 10:30                 ` Bruce Richardson
2020-07-27  8:54                   ` Fady Bader
2020-07-27  8:53                 ` Fady Bader
2020-07-08  8:25   ` [dpdk-dev] [PATCH v3 0/3] compile librte_net for windows Fady Bader
2020-07-08  8:25     ` [dpdk-dev] [PATCH v3 1/3] net: fix s_addr redefinition in Windows Fady Bader
2020-07-13 14:38       ` Olivier Matz
2020-07-15  6:26         ` Fady Bader
2020-07-08  8:25     ` [dpdk-dev] [PATCH v3 2/3] net: replace htons with rte_cpu_to_be_16 Fady Bader
2020-07-09 13:39       ` Morten Brørup
2020-07-13 14:38       ` Olivier Matz
2020-07-15  6:04         ` Fady Bader
2020-07-08  8:25     ` [dpdk-dev] [PATCH v3 3/3] eal/windows: librte_net build on Windows Fady Bader
2020-07-08  9:10       ` Thomas Monjalon
2020-07-08 10:19         ` Fady Bader
2020-07-23  7:08   ` [dpdk-dev] [PATCH v4 0/3] compile librte_net for windows Fady Bader
2020-07-23  7:08     ` [dpdk-dev] [PATCH v4 1/3] net: fix s_addr redefinition in Windows Fady Bader
2020-07-23  7:08     ` [dpdk-dev] [PATCH v4 2/3] net: replace htons with RTE_BE16 Fady Bader
2020-07-23  7:08     ` [dpdk-dev] [PATCH v4 3/3] eal/windows: librte_net build on Windows Fady Bader
2020-09-08  8:14       ` Ophir Munk [this message]
2020-07-24  1:11     ` [dpdk-dev] [PATCH v4 0/3] compile librte_net for windows Ranjit Menon
2020-09-10 19:55       ` Thomas Monjalon
2020-07-24 15:52     ` Kadam, Pallavi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR12MB1161ED0676B62B92F0F7ABB9DC290@DM5PR12MB1161.namprd12.prod.outlook.com \
    --to=ophirmu@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=fady@mellanox.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=olivier.matz@6wind.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=talshn@mellanox.com \
    --cc=tbashar@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=yohadt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git