When multi-queue ports are configured by the user, the testpmd streams
are created by rss_fwd_config_setup() function.
This function may configure to the streams either invalid Rx ports or
invalid Tx ports.
An invalid Tx port is configured when the number of ports is odd.
In this case, the last Tx port will be always invalid.
An invalid Rx port is configured when NUMA support is configured by the
user and the number of forward ports is much smaller than the number of
all ports. In this case, also the Tx port is invalid.
Change calculations to get valid ports.
Fixes:
af75078 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
* if we are in loopback, simply send stuff out through the
* ingress port
*/
- if (port_topology == PORT_TOPOLOGY_LOOP)
+ if (port_topology == PORT_TOPOLOGY_LOOP ||
+ txp >= cur_fwd_config.nb_fwd_ports)
txp = rxp;
fs->rx_port = fwd_ports_ids[rxp];
* Restart from RX queue 0 on next RX port
*/
rxq = 0;
- if (numa_support && (nb_fwd_ports <= (nb_ports >> 1)))
- rxp = (portid_t)
- (rxp + ((nb_ports >> 1) / nb_fwd_ports));
- else
- rxp = (portid_t) (rxp + 1);
+ rxp++;
}
}