[dpdk-dev] [PATCH v3 2/4] ethdev: remove POSIX dependency

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Sat Mar 13 23:22:14 CET 2021


Use <rte_ip.h> for IP-related defines instead of POSIX headers.
Keep <sys/queue.h>, because it is incorporated into DPDK.
Cleanup, group, and sort remaining includes per coding style.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
---
 lib/librte_ethdev/rte_ethdev.c      | 13 +++++--------
 lib/librte_ethdev/rte_ethdev_core.h |  1 -
 2 files changed, 5 insertions(+), 9 deletions(-)

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 <sys/types.h>
-#include <sys/queue.h>
 #include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdint.h>
-#include <inttypes.h>
-#include <netinet/in.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/queue.h>
 
 #include <rte_byteorder.h>
 #include <rte_log.h>
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 <pthread.h>
-#include <sys/types.h>
 
 /**
  * @file
-- 
2.29.2



More information about the dev mailing list