This driver was getting definition of IP, UDP, and TCP headers
implicitly via rte_ethdev.h. That will be changing so instead
include the required headers directly.

Use include-what-you-use (iwyu) to add headers that are
being used in this driver to avoid future issues.

Signed-off-by: Stephen Hemminger <[email protected]>
Reviewed-by: Long Li <[email protected]>
---
 drivers/net/mana/mana.c | 26 +++++++++++++++++++++++---
 drivers/net/mana/tx.c   |  3 +++
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 0b72f711a1..89f6033517 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -2,24 +2,44 @@
  * Copyright 2022 Microsoft Corporation
  */
 
+#include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <dirent.h>
 #include <fcntl.h>
+#include <errno.h>
+#include <time.h>
+#include <string.h>
+#include <inttypes.h>
 #include <sys/mman.h>
+#include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <net/if.h>
+#include <netinet/in.h>
 
 #include <ethdev_driver.h>
 #include <ethdev_pci.h>
-#include <rte_kvargs.h>
+#include <rte_atomic.h>
+#include <rte_debug.h>
+#include <rte_dev.h>
+#include <rte_devargs.h>
+#include <rte_eal.h>
 #include <rte_eal_paging.h>
+#include <rte_errno.h>
+#include <rte_ether.h>
+#include <rte_interrupts.h>
+#include <rte_kvargs.h>
+#include <rte_malloc.h>
+#include <rte_mbuf.h>
+#include <rte_memory.h>
+#include <rte_memzone.h>
+#include <rte_pause.h>
 #include <rte_pci.h>
+#include <rte_spinlock.h>
 
 #include <infiniband/verbs.h>
 #include <infiniband/manadv.h>
 
-#include <assert.h>
-
 #include "mana.h"
 
 /* Shared memory between primary/secondary processes, per driver */
diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index 10f2212b5d..9517b033dc 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -3,6 +3,9 @@
  */
 
 #include <ethdev_driver.h>
+#include <rte_ip.h>
+#include <rte_udp.h>
+#include <rte_tcp.h>
 
 #include <infiniband/verbs.h>
 #include <infiniband/manadv.h>
-- 
2.53.0

Reply via email to