X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=doc%2Fguides%2Fsample_app_ug%2Flink_status_intr.rst;h=8c11ba4ae80a8ecfb10a70c05542370da387f65d;hb=1bd9b61222f3a81ffe770fc00b70ded6e760c42b;hp=8fa6d76cedf68cb25716487803d73db3e4eef901;hpb=bb4e158029645f37809fcf81a3acddd6fa11f88a;p=deb_dpdk.git diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst index 8fa6d76c..8c11ba4a 100644 --- a/doc/guides/sample_app_ug/link_status_intr.rst +++ b/doc/guides/sample_app_ug/link_status_intr.rst @@ -91,15 +91,11 @@ To fully understand this code, it is recommended to study the chapters that rela if (rte_pci_probe() < 0) rte_exit(EXIT_FAILURE, "Cannot probe PCI\n"); - nb_ports = rte_eth_dev_count(); - if (nb_ports == 0) - rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); - /* * Each logical core is assigned a dedicated TX queue on each port. */ - for (portid = 0; portid < nb_ports; portid++) { + RTE_ETH_FOREACH_DEV(portid) { /* skip ports that are not enabled */ if ((lsi_enabled_port_mask & (1 << portid)) == 0)