mbox series

[v3,0/4] net: replace Windows networking shim

Message ID 20210313222217.18271-1-dmitry.kozliuk@gmail.com (mailing list archive)
Headers
Series net: replace Windows networking shim |

Message

Dmitry Kozlyuk March 13, 2021, 10:22 p.m. UTC
  Networking header shim in Windows EAL conflicts with system headers and
tries to provide POSIX compatibility out of scope for DPDK.
Remove dependency on POSIX headers from libraries supported on Windows,
then replace shim with librte_net with workarounds.

A proposed deprecation notice is assumed:
http://patchwork.dpdk.org/project/dpdk/list/?series=15595

v3: Fix build on FreeBSD for real (CI).
v2: Fix build on FreeBSD (CI).

Depends-on: series-15513 ("eal/windows: do not expose POSIX symbols")

Dmitry Kozlyuk (4):
  cmdline: remove POSIX dependency
  ethdev: remove POSIX dependency
  net/mlx5: remove POSIX dependency
  net: replace Windows networking shim

 drivers/net/mlx5/mlx5.h                      |  2 +-
 drivers/net/mlx5/mlx5_flow.c                 |  4 +--
 drivers/net/mlx5/mlx5_flow.h                 |  4 +--
 drivers/net/mlx5/mlx5_mac.c                  |  1 -
 examples/cmdline/commands.c                  |  1 -
 examples/cmdline/parse_obj_list.c            |  2 --
 lib/librte_cmdline/cmdline.c                 |  1 -
 lib/librte_cmdline/cmdline_parse.c           |  2 --
 lib/librte_cmdline/cmdline_parse_etheraddr.c |  6 ----
 lib/librte_cmdline/cmdline_parse_ipaddr.c    |  6 ----
 lib/librte_cmdline/cmdline_parse_ipaddr.h    |  2 +-
 lib/librte_eal/windows/include/arpa/inet.h   | 30 ----------------
 lib/librte_eal/windows/include/netinet/in.h  | 38 --------------------
 lib/librte_eal/windows/include/netinet/ip.h  | 10 ------
 lib/librte_eal/windows/include/sys/socket.h  | 24 -------------
 lib/librte_ethdev/rte_ethdev.c               | 13 +++----
 lib/librte_ethdev/rte_ethdev_core.h          |  1 -
 lib/librte_net/rte_ether.h                   | 26 ++++++++++----
 lib/librte_net/rte_ip.h                      | 18 ++++++++++
 19 files changed, 49 insertions(+), 142 deletions(-)
 delete mode 100644 lib/librte_eal/windows/include/arpa/inet.h
 delete mode 100644 lib/librte_eal/windows/include/netinet/in.h
 delete mode 100644 lib/librte_eal/windows/include/netinet/ip.h
 delete mode 100644 lib/librte_eal/windows/include/sys/socket.h
  

Comments

Ferruh Yigit March 15, 2021, 1:03 p.m. UTC | #1
On 3/13/2021 10:22 PM, Dmitry Kozlyuk wrote:
> Networking header shim in Windows EAL conflicts with system headers and
> tries to provide POSIX compatibility out of scope for DPDK.
> Remove dependency on POSIX headers from libraries supported on Windows,
> then replace shim with librte_net with workarounds.
> 
> A proposed deprecation notice is assumed:
> http://patchwork.dpdk.org/project/dpdk/list/?series=15595
> 
> v3: Fix build on FreeBSD for real (CI).
> v2: Fix build on FreeBSD (CI).
> 
> Depends-on: series-15513 ("eal/windows: do not expose POSIX symbols")
> 
> Dmitry Kozlyuk (4):
>    cmdline: remove POSIX dependency
>    ethdev: remove POSIX dependency
>    net/mlx5: remove POSIX dependency
>    net: replace Windows networking shim
> 

Hi Dmitry,

Have you seen the CI reported build errors:
http://mails.dpdk.org/archives/test-report/2021-March/182361.html

Briefly:
./lib/librte_net/rte_net.c:132:7: error: 'IPPROTO_GRE' undeclared
./lib/librte_net/rte_net.c:163:7: error: 'IPPROTO_IPIP' undeclared
  
Dmitry Kozlyuk March 15, 2021, 1:23 p.m. UTC | #2
>
>
>
Hi Ferruh,

>
Have you seen the CI reported build errors:
> http://mails.dpdk.org/archives/test-report/2021-March/182361.html
>
> Briefly:
> ./lib/librte_net/rte_net.c:132:7: error: 'IPPROTO_GRE' undeclared
> ./lib/librte_net/rte_net.c:163:7: error: 'IPPROTO_IPIP' undeclared
>

This is because CI doesn't apply patches in Depends-on. In this case,
missing constants would be defined when RTE_BUILD_INTERNAL is defined (so
that symbols are only visible to DPDK), and it is introduced by dependency
series.

>
  
Menon, Ranjit March 17, 2021, 7:19 p.m. UTC | #3
On 3/13/2021 2:22 PM, Dmitry Kozlyuk wrote:
> Networking header shim in Windows EAL conflicts with system headers and
> tries to provide POSIX compatibility out of scope for DPDK.
> Remove dependency on POSIX headers from libraries supported on Windows,
> then replace shim with librte_net with workarounds.
>
> A proposed deprecation notice is assumed:
> http://patchwork.dpdk.org/project/dpdk/list/?series=15595
>
> v3: Fix build on FreeBSD for real (CI).
> v2: Fix build on FreeBSD (CI).
>
> Depends-on: series-15513 ("eal/windows: do not expose POSIX symbols")
>
> Dmitry Kozlyuk (4):
>    cmdline: remove POSIX dependency
>    ethdev: remove POSIX dependency
>    net/mlx5: remove POSIX dependency
>    net: replace Windows networking shim
>
>   drivers/net/mlx5/mlx5.h                      |  2 +-
>   drivers/net/mlx5/mlx5_flow.c                 |  4 +--
>   drivers/net/mlx5/mlx5_flow.h                 |  4 +--
>   drivers/net/mlx5/mlx5_mac.c                  |  1 -
>   examples/cmdline/commands.c                  |  1 -
>   examples/cmdline/parse_obj_list.c            |  2 --
>   lib/librte_cmdline/cmdline.c                 |  1 -
>   lib/librte_cmdline/cmdline_parse.c           |  2 --
>   lib/librte_cmdline/cmdline_parse_etheraddr.c |  6 ----
>   lib/librte_cmdline/cmdline_parse_ipaddr.c    |  6 ----
>   lib/librte_cmdline/cmdline_parse_ipaddr.h    |  2 +-
>   lib/librte_eal/windows/include/arpa/inet.h   | 30 ----------------
>   lib/librte_eal/windows/include/netinet/in.h  | 38 --------------------
>   lib/librte_eal/windows/include/netinet/ip.h  | 10 ------
>   lib/librte_eal/windows/include/sys/socket.h  | 24 -------------
>   lib/librte_ethdev/rte_ethdev.c               | 13 +++----
>   lib/librte_ethdev/rte_ethdev_core.h          |  1 -
>   lib/librte_net/rte_ether.h                   | 26 ++++++++++----
>   lib/librte_net/rte_ip.h                      | 18 ++++++++++
>   19 files changed, 49 insertions(+), 142 deletions(-)
>   delete mode 100644 lib/librte_eal/windows/include/arpa/inet.h
>   delete mode 100644 lib/librte_eal/windows/include/netinet/in.h
>   delete mode 100644 lib/librte_eal/windows/include/netinet/ip.h
>   delete mode 100644 lib/librte_eal/windows/include/sys/socket.h
>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>