net/virtio: fix incorrect cast of void *
[dpdk.git] / app / test-pmd / config.c
index 3117cb1..ed27ed6 100644 (file)
@@ -292,10 +292,13 @@ nic_xstats_display(portid_t port_id)
        }
 
        /* Display xstats */
-       for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++)
+       for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++) {
+               if (xstats_hide_zero && !xstats[idx_xstat].value)
+                       continue;
                printf("%s: %"PRIu64"\n",
                        xstats_names[idx_xstat].name,
                        xstats[idx_xstat].value);
+       }
        free(xstats_names);
        free(xstats);
 }
@@ -519,6 +522,16 @@ port_infos_display(portid_t port_id)
                }
        }
 
+       printf("Minimum size of RX buffer: %u\n", dev_info.min_rx_bufsize);
+       printf("Maximum configurable length of RX packet: %u\n",
+               dev_info.max_rx_pktlen);
+       if (dev_info.max_vfs)
+               printf("Maximum number of VFs: %u\n", dev_info.max_vfs);
+       if (dev_info.max_vmdq_pools)
+               printf("Maximum number of VMDq pools: %u\n",
+                       dev_info.max_vmdq_pools);
+
+       printf("Current number of RX queues: %u\n", dev_info.nb_rx_queues);
        printf("Max possible RX queues: %u\n", dev_info.max_rx_queues);
        printf("Max possible number of RXDs per queue: %hu\n",
                dev_info.rx_desc_lim.nb_max);
@@ -526,12 +539,22 @@ port_infos_display(portid_t port_id)
                dev_info.rx_desc_lim.nb_min);
        printf("RXDs number alignment: %hu\n", dev_info.rx_desc_lim.nb_align);
 
+       printf("Current number of TX queues: %u\n", dev_info.nb_tx_queues);
        printf("Max possible TX queues: %u\n", dev_info.max_tx_queues);
        printf("Max possible number of TXDs per queue: %hu\n",
                dev_info.tx_desc_lim.nb_max);
        printf("Min possible number of TXDs per queue: %hu\n",
                dev_info.tx_desc_lim.nb_min);
        printf("TXDs number alignment: %hu\n", dev_info.tx_desc_lim.nb_align);
+
+       printf("Global RX offload capabilities: %"PRIx64"\n",
+               dev_info.rx_offload_capa);
+       printf("Queue RX offload capabilities: %"PRIx64"\n",
+               dev_info.rx_queue_offload_capa);
+       printf("Global TX offload capabilities: %"PRIx64"\n",
+               dev_info.tx_offload_capa);
+       printf("Queue TX offload capabilities: %"PRIx64"\n",
+               dev_info.tx_queue_offload_capa);
 }
 
 void
@@ -1902,7 +1925,7 @@ simple_fwd_config_setup(void)
                fwd_streams[i]->rx_queue  = 0;
                fwd_streams[i]->tx_port   = fwd_ports_ids[j];
                fwd_streams[i]->tx_queue  = 0;
-               fwd_streams[i]->peer_addr = j;
+               fwd_streams[i]->peer_addr = fwd_streams[i]->tx_port;
                fwd_streams[i]->retry_enabled = retry_enabled;
 
                if (port_topology == PORT_TOPOLOGY_PAIRED) {
@@ -1910,7 +1933,7 @@ simple_fwd_config_setup(void)
                        fwd_streams[j]->rx_queue  = 0;
                        fwd_streams[j]->tx_port   = fwd_ports_ids[i];
                        fwd_streams[j]->tx_queue  = 0;
-                       fwd_streams[j]->peer_addr = i;
+                       fwd_streams[j]->peer_addr = fwd_streams[j]->tx_port;
                        fwd_streams[j]->retry_enabled = retry_enabled;
                }
        }
@@ -2866,6 +2889,12 @@ set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)
        }
 }
 
+void
+set_xstats_hide_zero(uint8_t on_off)
+{
+       xstats_hide_zero = on_off;
+}
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {