thread: Add show threads api
[vpp.git] / src / plugins / dpdk / device / cli.c
index 40ec323..7e168af 100644 (file)
@@ -68,11 +68,7 @@ get_hqos (u32 hw_if_index, u32 subport_id, dpdk_device_t ** xd,
 
   rte_eth_dev_info_get ((*xd)->port_id, &dev_info);
 
-#if RTE_VERSION < RTE_VERSION_NUM(18, 5, 0, 0)
-  pci_dev = dev_info.pci_dev;
-#else
   pci_dev = RTE_DEV_TO_PCI (dev_info.device);
-#endif
 
   if (pci_dev)
     {                          /* bonded interface has no pci info */
@@ -341,7 +337,7 @@ pcap_tx_trace_command_fn (vlib_main_t * vm,
  *   associated with a packet capture. If packet capture is in progress,
  *   '<em>status</em>' also will return the number of packets currently in
  *   the local buffer. All additional attributes entered on command line
- *   with '<em>status</em>' will be ingnored and not applied.
+ *   with '<em>status</em>' will be ignored and not applied.
  *
  * @cliexpar
  * Example of how to display the status of a tx packet capture when off:
@@ -575,7 +571,7 @@ test_dpdk_buffer (vlib_main_t * vm, unformat_input_t * input,
  * @cliexpar
  * @parblock
  *
- * Example of how to display how many DPDK buffer test command has allcoated:
+ * Example of how to display how many DPDK buffer test command has allocated:
  * @cliexstart{test dpdk buffer}
  * Currently 0 buffers allocated
  * @cliexend
@@ -731,7 +727,7 @@ show_dpdk_if_hqos_placement (vlib_main_t * vm, unformat_input_t * input,
          cpu < (dm->hqos_cpu_first_index + dm->hqos_cpu_count))
        vlib_cli_output (vm, "Thread %u (%s at lcore %u):", cpu,
                         vlib_worker_threads[cpu].name,
-                        vlib_worker_threads[cpu].lcore_id);
+                        vlib_worker_threads[cpu].cpu_id);
 
       vec_foreach (dq, dm->devices_by_hqos_cpu[cpu])
       {
@@ -1290,11 +1286,7 @@ set_dpdk_if_hqos_pktfield (vlib_main_t * vm, unformat_input_t * input,
 
   rte_eth_dev_info_get (xd->port_id, &dev_info);
 
-#if RTE_VERSION < RTE_VERSION_NUM(18, 5, 0, 0)
-  pci_dev = dev_info.pci_dev;
-#else
   pci_dev = RTE_DEV_TO_PCI (dev_info.device);
-#endif
 
   if (pci_dev)
     {                          /* bonded interface has no pci info */
@@ -1392,7 +1384,7 @@ done:
 }
 
 /*?
- * This command is used to set the packet fields required for classifiying the
+ * This command is used to set the packet fields required for classifying the
  * incoming packet. As a result of classification process, packet field
  * information will be mapped to 5 tuples (subport, pipe, traffic class, pipe,
  * color) and stored in packet mbuf.
@@ -1489,11 +1481,7 @@ show_dpdk_if_hqos (vlib_main_t * vm, unformat_input_t * input,
 
   rte_eth_dev_info_get (xd->port_id, &dev_info);
 
-#if RTE_VERSION < RTE_VERSION_NUM(18, 5, 0, 0)
-  pci_dev = dev_info.pci_dev;
-#else
   pci_dev = RTE_DEV_TO_PCI (dev_info.device);
-#endif
 
   if (pci_dev)
     {                          /* bonded interface has no pci info */
@@ -2015,7 +2003,7 @@ show_dpdk_version_command_fn (vlib_main_t * vm,
  * the list of arguments passed to DPDK when started.
  *
  * @cliexpar
- * Example of how to display how many DPDK buffer test command has allcoated:
+ * Example of how to display how many DPDK buffer test command has allocated:
  * @cliexstart{show dpdk version}
  * DPDK Version:        DPDK 16.11.0
  * DPDK EAL init args:  -c 1 -n 4 --huge-dir /run/vpp/hugepages --file-prefix vpp -w 0000:00:08.0 -w 0000:00:09.0 --master-lcore 0 --socket-mem 256