[dpdk-dev] [PATCH] examples: remove dependency on PCI

Bruce Richardson bruce.richardson at intel.com
Fri Nov 3 14:46:27 CET 2017


All PCI functionality should be hidden from apps via the PCI bus driver,
the EAL and individual device drivers. Therefore remove the inclusion of
rte_pci.h from sample apps.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 examples/bond/main.c                                       | 1 -
 examples/ethtool/lib/rte_ethtool.c                         | 1 -
 examples/exception_path/main.c                             | 1 -
 examples/ip_fragmentation/main.c                           | 1 -
 examples/ip_reassembly/main.c                              | 1 -
 examples/ipsec-secgw/ipsec-secgw.c                         | 1 -
 examples/ipv4_multicast/main.c                             | 1 -
 examples/kni/main.c                                        | 1 -
 examples/l2fwd-crypto/main.c                               | 1 -
 examples/l2fwd-jobstats/main.c                             | 1 -
 examples/l2fwd-keepalive/main.c                            | 1 -
 examples/l2fwd/main.c                                      | 1 -
 examples/l3fwd-acl/main.c                                  | 1 -
 examples/l3fwd-power/main.c                                | 1 -
 examples/l3fwd-vf/main.c                                   | 1 -
 examples/l3fwd/main.c                                      | 1 -
 examples/link_status_interrupt/main.c                      | 1 -
 examples/load_balancer/config.c                            | 1 -
 examples/load_balancer/init.c                              | 1 -
 examples/load_balancer/main.c                              | 1 -
 examples/load_balancer/runtime.c                           | 1 -
 examples/multi_process/client_server_mp/mp_client/client.c | 1 -
 examples/multi_process/client_server_mp/mp_server/init.c   | 1 -
 examples/multi_process/client_server_mp/mp_server/main.c   | 1 -
 examples/multi_process/l2fwd_fork/flib.c                   | 1 -
 examples/multi_process/l2fwd_fork/main.c                   | 1 -
 examples/multi_process/symmetric_mp/main.c                 | 1 -
 examples/performance-thread/l3fwd-thread/main.c            | 1 -
 examples/server_node_efd/node/node.c                       | 1 -
 examples/server_node_efd/server/init.c                     | 1 -
 examples/server_node_efd/server/main.c                     | 1 -
 examples/vmdq/main.c                                       | 1 -
 examples/vmdq_dcb/main.c                                   | 1 -
 33 files changed, 33 deletions(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index cb55552c2..244491bb6 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -61,7 +61,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index cbaac7380..c70c54786 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -36,7 +36,6 @@
 #include <rte_version.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
-#include <rte_pci.h>
 #include <rte_bus_pci.h>
 #ifdef RTE_LIBRTE_IXGBE_PMD
 #include <rte_pmd_ixgbe.h>
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index dcd8f9bae..f521d8bfe 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -63,7 +63,6 @@
 #include <rte_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index de252760f..b37f2742a 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -58,7 +58,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 2f662ba4e..10d6fa484 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -59,7 +59,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 6201d850a..c98454a90 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 1b6feae3e..8b156fda9 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/kni/main.c b/examples/kni/main.c
index ad7dfdc13..00904beb4 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -61,7 +61,6 @@
 #include <rte_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 49183bc39..20ff8f55d 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -68,7 +68,6 @@
 #include <rte_memory.h>
 #include <rte_mempool.h>
 #include <rte_memzone.h>
-#include <rte_pci.h>
 #include <rte_per_lcore.h>
 #include <rte_prefetch.h>
 #include <rte_random.h>
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index dfa3c8bc2..85ab80884 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -53,7 +53,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 2f543d31d..48bbac472 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -61,7 +61,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 3bf3b28b1..a5901edff 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -62,7 +62,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 4d263f1cf..e7dab0bd9 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 66ed687e7..8c53bd01d 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -60,7 +60,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index a84339115..f21f28f73 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -59,7 +59,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index a5e55baae..a2969398d 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -60,7 +60,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9d562f852..c692d283e 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -60,7 +60,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/load_balancer/config.c b/examples/load_balancer/config.c
index ae234de82..ce815b033 100644
--- a/examples/load_balancer/config.c
+++ b/examples/load_balancer/config.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 5f9b0df2a..55278bd6d 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/load_balancer/main.c b/examples/load_balancer/main.c
index 65ceea4a8..bd1cdea6c 100644
--- a/examples/load_balancer/main.c
+++ b/examples/load_balancer/main.c
@@ -58,7 +58,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/load_balancer/runtime.c b/examples/load_balancer/runtime.c
index b342e755f..42ec5faf8 100644
--- a/examples/load_balancer/runtime.c
+++ b/examples/load_balancer/runtime.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c
index 44085429a..30ce4b34c 100644
--- a/examples/multi_process/client_server_mp/mp_client/client.c
+++ b/examples/multi_process/client_server_mp/mp_client/client.c
@@ -57,7 +57,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c
index cacf4e0d5..c8d02113d 100644
--- a/examples/multi_process/client_server_mp/mp_server/init.c
+++ b/examples/multi_process/client_server_mp/mp_server/init.c
@@ -56,7 +56,6 @@
 #include <rte_memcpy.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_malloc.h>
diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 121383f8c..74ce49b7a 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -59,7 +59,6 @@
 #include <rte_mbuf.h>
 #include <rte_ether.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ethdev.h>
 #include <rte_byteorder.h>
 #include <rte_malloc.h>
diff --git a/examples/multi_process/l2fwd_fork/flib.c b/examples/multi_process/l2fwd_fork/flib.c
index c22e983b1..43b231fc7 100644
--- a/examples/multi_process/l2fwd_fork/flib.c
+++ b/examples/multi_process/l2fwd_fork/flib.c
@@ -64,7 +64,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index d273e45b9..a561c6584 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -62,7 +62,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 7d1d274d0..4353b6364 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -65,7 +65,6 @@
 #include <rte_branch_prediction.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_mempool.h>
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 0eb2ed9f2..badd5f2ac 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -60,7 +60,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/server_node_efd/node/node.c b/examples/server_node_efd/node/node.c
index c8ce391f1..5aa1258e1 100644
--- a/examples/server_node_efd/node/node.c
+++ b/examples/server_node_efd/node/node.c
@@ -57,7 +57,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index 9509e7145..0bcab8cc1 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -56,7 +56,6 @@
 #include <rte_memcpy.h>
 #include <rte_mbuf.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_malloc.h>
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index 382a2ded8..0925c57eb 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -59,7 +59,6 @@
 #include <rte_mbuf.h>
 #include <rte_ether.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_ethdev.h>
 #include <rte_byteorder.h>
 #include <rte_malloc.h>
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 0f3fa3003..6a0e519a4 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index cb1283496..29e213ac5 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -57,7 +57,6 @@
 #include <rte_per_lcore.h>
 #include <rte_branch_prediction.h>
 #include <rte_interrupts.h>
-#include <rte_pci.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ether.h>
-- 
2.13.6



More information about the dev mailing list