[dpdk-dev] [PATCH v6 4/5] net: provide IP-related API on any OS
Thomas Monjalon
thomas at monjalon.net
Fri Mar 26 10:22:35 CET 2021
20/03/2021 14:05, Dmitry Kozlyuk:
> Users of <rte_ip.h> relied on it to provide IP-related defines,
> like IPPROTO_* constatns, but still had to include POSIX headers
typo: constants
> for inet_pton() and other standard IP-related facilities.
>
> Extend <rte_ip.h> 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 <dmitry.kozliuk at gmail.com>
[...]
> --- a/drivers/net/mlx5/mlx5.h
> +++ b/drivers/net/mlx5/mlx5.h
> @@ -10,7 +10,7 @@
> #include <stdbool.h>
> #include <stdint.h>
> #include <limits.h>
> -#include <netinet/in.h>
> +
> #include <sys/queue.h>
No need of blank space between system includes.
(same comments for other files)
> --- a/lib/librte_net/rte_ip.h
> +++ b/lib/librte_net/rte_ip.h
> #include <stdint.h>
> +
That's an unneeded blank line.
> +#include <sys/socket.h>
> #include <sys/types.h>
> +#include <arpa/inet.h>
> #include <netinet/in.h>
> #include <netinet/ip.h>
The benefit is not obvious because the removal of Windows code
is done in another patch.
Please could you re-arrange the patch to be more atomic?
More information about the dev
mailing list