#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_ring.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_interrupts.h>
nic_xstats_display(portid_t port_id)
{
struct rte_eth_xstat *xstats;
- int cnt_xstats, idx_xstat, idx_name;
+ int cnt_xstats, idx_xstat;
struct rte_eth_xstat_name *xstats_names;
printf("###### NIC extended statistics for port %-2d\n", port_id);
/* Display xstats */
for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++)
- for (idx_name = 0; idx_name < cnt_xstats; idx_name++)
- if (xstats_names[idx_name].id == xstats[idx_xstat].id) {
- printf("%s: %"PRIu64"\n",
- xstats_names[idx_name].name,
- xstats[idx_xstat].value);
- break;
- }
+ printf("%s: %"PRIu64"\n",
+ xstats_names[idx_xstat].name,
+ xstats[idx_xstat].value);
free(xstats_names);
free(xstats);
}
}
/**
- * For the RSS forwarding test, each core is assigned on every port a transmit
- * queue whose index is the index of the core itself. This approach limits the
- * maximumm number of processing cores of the RSS test to the maximum number of
- * TX queues supported by the devices.
- *
- * Each core is assigned a single stream, each stream being composed of
- * a RX queue to poll on a RX port for input messages, associated with
- * a TX queue of a TX port where to send forwarded packets.
+ * For the RSS forwarding test all streams distributed over lcores. Each stream
+ * being composed of a RX queue to poll on a RX port for input messages,
+ * associated with a TX queue of a TX port where to send forwarded packets.
* All packets received on the RX queue of index "RxQj" of the RX port "RxPi"
* are sent on the TX queue "TxQl" of the TX port "TxPk" according to the two
* following rules:
portid_t txp;
queueid_t rxq;
queueid_t nb_q;
- lcoreid_t lc_id;
+ streamid_t sm_id;
nb_q = nb_rxq;
if (nb_q > nb_txq)
setup_fwd_config_of_each_lcore(&cur_fwd_config);
rxp = 0; rxq = 0;
- for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_streams; lc_id++) {
+ for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
struct fwd_stream *fs;
- fs = fwd_streams[lc_id];
+ fs = fwd_streams[sm_id];
if ((rxp & 0x1) == 0)
txp = (portid_t) (rxp + 1);