From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BE77BA0548; Sat, 20 Mar 2021 14:06:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2B241410B7; Sat, 20 Mar 2021 14:06:00 +0100 (CET) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id A2C741410A6 for ; Sat, 20 Mar 2021 14:05:53 +0100 (CET) Received: by mail-lf1-f51.google.com with SMTP id b14so1005882lfv.8 for ; Sat, 20 Mar 2021 06:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AYyjo2/S2au+USIRMTq7NZb2qb5+Lxocq1L5hwbrinI=; b=gbsGJGCAhWLyOqSVDi0urVC+Gg0F2/fUmlR5wBEbyTlnO4tHrVR9S6xXdA6Q0pu0v8 tXRcQLOuM36HOxRJa/nRSQkGCtzJwcytmL4aCNbhcN7/RkSW/Mj/Zlmj6HDjrtCeVdTw P6VDSM2zrcIRycm+x58pDavMI3bPOjVFt8aW2A7/k93SQRYA1LtakdtSZkmqW8YgCOt/ KLHrFcbFu6YnPQrpVRR6s6UCI/jExSU/NHaGCwGWk7VI/P/Q/lTVwweFv0+HLDmYRji3 qwCNB5uk8UKNzntuNR4eW/pHFGVFaN7HPof62MW+j7BlSx3JSRUAS0QCq4jk8dCg+Lt6 780w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AYyjo2/S2au+USIRMTq7NZb2qb5+Lxocq1L5hwbrinI=; b=MulqEJ8W7e6CsfeSQEojlf0531D5TDssmDfBczug1gdpUk6H0tcPcdroIMKt/rxfSA iKc8bW9hwwjgBmWoIVdHLof/A1J30hDzQKANABweCWjDEoJbr6UoqwPBoQ8Ct5SGnMIL +nzlzzgBTPpZ+1riWt71cigdcFo1JLe3AFFg3fve5jmH4tEdUpgF3NK+1ffeS9n6UlNu 44qA+DFItYUehhvXY7jdcQmB7etQnm3wzS9CAGCfdrpwDZIbcaDn9hCfCau4YC2gmMU9 +znWGV4HL/fos4hUvdDeojhEvwrVfbWrOkB+qRav6xZZtMz1yl78WWsPzwmfJsbAxa3V Y1Ug== X-Gm-Message-State: AOAM533wRjFonxyA2cItfg7L94ubd6yS+yltVCiyCgnzcPVbP9Hk3wow xnO4xG5HxwS0te/rVcl6gOshhwNdSrCacJAu X-Google-Smtp-Source: ABdhPJxYJfa5QahfAMFYvfWtpqIwOP9W6S5AzZajCbUFwa+TkRLjTGCs5zkMWcTTFk7iMpIE6zk4MA== X-Received: by 2002:a19:e34c:: with SMTP id c12mr3776084lfk.555.1616245551763; Sat, 20 Mar 2021 06:05:51 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id r66sm929610lff.93.2021.03.20.06.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Mar 2021 06:05:51 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Tyler Retzlaff , Jie Zhou , Dmitry Kozlyuk , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Olivier Matz , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Date: Sat, 20 Mar 2021 16:05:24 +0300 Message-Id: <20210320130525.16452-5-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20210320130525.16452-1-dmitry.kozliuk@gmail.com> References: <20210320112733.13160-1-dmitry.kozliuk@gmail.com> <20210320130525.16452-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 4/5] net: provide IP-related API on any OS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Users of relied on it to provide IP-related defines, like IPPROTO_* constatns, but still had to include POSIX headers for inet_pton() and other standard IP-related facilities. Extend so that it is a single header to gain access to IP-related facilities on any OS. Use it to replace POSIX include in components enabled on Windows. Signed-off-by: Dmitry Kozlyuk --- 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 | 5 ----- 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_ethdev/rte_ethdev.c | 13 +++++-------- lib/librte_ethdev/rte_ethdev_core.h | 1 - lib/librte_net/rte_ip.h | 3 +++ 14 files changed, 14 insertions(+), 38 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index a281fd20ea..f04da06abd 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -10,7 +10,7 @@ #include #include #include -#include + #include #include diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index ab5be3dacc..73253bd39e 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -3,13 +3,13 @@ * Copyright 2016 Mellanox Technologies, Ltd */ -#include -#include #include #include #include #include +#include + #include #include #include diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 8324e188e1..c4e5f19faa 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -5,12 +5,12 @@ #ifndef RTE_PMD_MLX5_FLOW_H_ #define RTE_PMD_MLX5_FLOW_H_ -#include -#include #include #include #include +#include + #include #include diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index 6ffcfcd97a..f0450735e2 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/examples/cmdline/commands.c b/examples/cmdline/commands.c index f43eacfbad..9ce8ef389f 100644 --- a/examples/cmdline/commands.c +++ b/examples/cmdline/commands.c @@ -8,12 +8,7 @@ #include #include #include -#include #include -#include -#ifdef RTE_EXEC_ENV_FREEBSD -#include -#endif #include #include diff --git a/examples/cmdline/parse_obj_list.c b/examples/cmdline/parse_obj_list.c index b04adbea58..959bcd1452 100644 --- a/examples/cmdline/parse_obj_list.c +++ b/examples/cmdline/parse_obj_list.c @@ -6,11 +6,9 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c index 49770869bb..a176d15130 100644 --- a/lib/librte_cmdline/cmdline.c +++ b/lib/librte_cmdline/cmdline.c @@ -12,7 +12,6 @@ #include #include #include -#include #include diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c index fe366841cd..f5cc934782 100644 --- a/lib/librte_cmdline/cmdline_parse.c +++ b/lib/librte_cmdline/cmdline_parse.c @@ -11,8 +11,6 @@ #include #include -#include - #include #include "cmdline_private.h" diff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.c b/lib/librte_cmdline/cmdline_parse_etheraddr.c index 5cb10de321..433b828a72 100644 --- a/lib/librte_cmdline/cmdline_parse_etheraddr.c +++ b/lib/librte_cmdline/cmdline_parse_etheraddr.c @@ -5,13 +5,7 @@ */ #include -#include -#include -#include -#include -#include #include -#include #include #include diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c index f8dbdf204c..5e278c963f 100644 --- a/lib/librte_cmdline/cmdline_parse_ipaddr.c +++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c @@ -6,14 +6,8 @@ #include #include -#include -#include -#include #include #include -#include -#include -#include #include diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.h b/lib/librte_cmdline/cmdline_parse_ipaddr.h index 0ba81647bc..0118c31d44 100644 --- a/lib/librte_cmdline/cmdline_parse_ipaddr.h +++ b/lib/librte_cmdline/cmdline_parse_ipaddr.h @@ -8,7 +8,7 @@ #define _PARSE_IPADDR_H_ #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 6f514c388b..f363794369 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -2,18 +2,15 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include -#include #include -#include -#include -#include -#include #include +#include #include #include -#include -#include +#include +#include + +#include #include #include diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h index 918a34ed1f..4679d948fa 100644 --- a/lib/librte_ethdev/rte_ethdev_core.h +++ b/lib/librte_ethdev/rte_ethdev_core.h @@ -6,7 +6,6 @@ #define _RTE_ETHDEV_CORE_H_ #include -#include /** * @file diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index 212ff2c4fd..2cf7b0bd28 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -16,7 +16,10 @@ */ #include + +#include #include +#include #include #include -- 2.29.3