Skip to contentSkip to conversation

examples: remove dependency on PCI

PATCH Applied Bruce Richardson 2 participants 3 messages Nov 3, 2017 – Nov 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples: remove dependency on PCI

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.

---
 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(-)
examples/bond/main.c +0 -1
index cb55552c2..244491bb6 100644
@@ -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>
examples/ethtool/lib/rte_ethtool.c +0 -1
index cbaac7380..c70c54786 100644
@@ -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>
examples/exception_path/main.c +0 -1
index dcd8f9bae..f521d8bfe 100644
@@ -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>
examples/ip_fragmentation/main.c +0 -1
index de252760f..b37f2742a 100644
@@ -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>
examples/ip_reassembly/main.c +0 -1
index 2f662ba4e..10d6fa484 100644
@@ -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>
examples/ipsec-secgw/ipsec-secgw.c +0 -1
index 6201d850a..c98454a90 100644
@@ -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>
examples/ipv4_multicast/main.c +0 -1
index 1b6feae3e..8b156fda9 100644
@@ -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>
examples/kni/main.c +0 -1
index ad7dfdc13..00904beb4 100644
@@ -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>
examples/l2fwd-crypto/main.c +0 -1
index 49183bc39..20ff8f55d 100644
@@ -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>
examples/l2fwd-jobstats/main.c +0 -1
index dfa3c8bc2..85ab80884 100644
@@ -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>
examples/l2fwd-keepalive/main.c +0 -1
index 2f543d31d..48bbac472 100644
@@ -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>
examples/l2fwd/main.c +0 -1
index 3bf3b28b1..a5901edff 100644
@@ -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>
examples/l3fwd-acl/main.c +0 -1
index 4d263f1cf..e7dab0bd9 100644
@@ -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>
examples/l3fwd-power/main.c +0 -1
index 66ed687e7..8c53bd01d 100644
@@ -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>
examples/l3fwd-vf/main.c +0 -1
index a84339115..f21f28f73 100644
@@ -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>
examples/l3fwd/main.c +0 -1
index a5e55baae..a2969398d 100644
@@ -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>
examples/link_status_interrupt/main.c +0 -1
index 9d562f852..c692d283e 100644
@@ -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>
examples/load_balancer/config.c +0 -1
index ae234de82..ce815b033 100644
@@ -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>
examples/load_balancer/init.c +0 -1
index 5f9b0df2a..55278bd6d 100644
@@ -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>
examples/load_balancer/main.c +0 -1
index 65ceea4a8..bd1cdea6c 100644
@@ -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>
examples/load_balancer/runtime.c +0 -1
index b342e755f..42ec5faf8 100644
@@ -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>
examples/multi_process/client_server_mp/mp_client/client.c +0 -1
index 44085429a..30ce4b34c 100644
@@ -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>
examples/multi_process/client_server_mp/mp_server/init.c +0 -1
index cacf4e0d5..c8d02113d 100644
@@ -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>
examples/multi_process/client_server_mp/mp_server/main.c +0 -1
index 121383f8c..74ce49b7a 100644
@@ -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>
examples/multi_process/l2fwd_fork/flib.c +0 -1
index c22e983b1..43b231fc7 100644
@@ -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>
examples/multi_process/l2fwd_fork/main.c +0 -1
index d273e45b9..a561c6584 100644
@@ -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>
examples/multi_process/symmetric_mp/main.c +0 -1
index 7d1d274d0..4353b6364 100644
@@ -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>
examples/performance-thread/l3fwd-thread/main.c +0 -1
index 0eb2ed9f2..badd5f2ac 100644
@@ -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>
examples/server_node_efd/node/node.c +0 -1
index c8ce391f1..5aa1258e1 100644
@@ -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>
examples/server_node_efd/server/init.c +0 -1
index 9509e7145..0bcab8cc1 100644
@@ -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>
examples/server_node_efd/server/main.c +0 -1
index 382a2ded8..0925c57eb 100644
@@ -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>
examples/vmdq/main.c +0 -1
index 0f3fa3003..6a0e519a4 100644
@@ -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>
examples/vmdq_dcb/main.c +0 -1
index cb1283496..29e213ac5 100644
@@ -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>
Signature · 1 line
2.13.6
#1 lore raw
Quoted 6 lines · Bruce Richardson

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.

---

Note, this patch will also fix the build of many sample apps on the next-build tree. Currently, building samples as part of a full DPDK build will error out on many examples, as they are not set to depend upon libpci. An alternative for next-build is to add pci as a standard dependency for sample apps, but as a fix, it's quick, tidy and sadly wrong! :-)

Therefore, please consider this patch for 17.11rc3.

Thanks,
/Bruce