Skip to content

Commit

Permalink
app/testpmd: revert primary process polling all queues fix
Browse files Browse the repository at this point in the history
[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]

For some drivers [1], testpmd forwarding is broken with commit [2].

This is because with [2] testpmd gets queue state from ethdev and
forwarding is done only on queues in started state, but some drivers
don't update queue status properly, and this breaks forwarding for those
drivers.

Drivers should be fixed but more time is required to verify drivers
again, instead reverting [2] for now to not break drivers.
Target is to merge [2] back at the beginning of next release cycle and
fix drivers accordingly.

[1]
Bugzilla ID: 1259

[2]
Fixes: 141a520b35f7 ("app/testpmd: fix primary process not polling all queues")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
  • Loading branch information
ferruhy authored and kevintraynor committed Jul 18, 2023
1 parent 796ccf0 commit 931f667
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions app/test-pmd/testpmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2375,13 +2375,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
ports[port_id].rxq[queue_id].state =
rx_qinfo.queue_state;
} else if (rc == -ENOTSUP) {
/*
* Do not change the rxq state for primary process
* to ensure that the PMDs do not implement
* rte_eth_rx_queue_info_get can forward as before.
*/
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
return;
/*
* Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
* to ensure that the PMDs do not implement
Expand All @@ -2407,13 +2400,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
ports[port_id].txq[queue_id].state =
tx_qinfo.queue_state;
} else if (rc == -ENOTSUP) {
/*
* Do not change the txq state for primary process
* to ensure that the PMDs do not implement
* rte_eth_tx_queue_info_get can forward as before.
*/
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
return;
/*
* Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
* to ensure that the PMDs do not implement
Expand Down Expand Up @@ -2481,7 +2467,8 @@ start_packet_forwarding(int with_tx_first)
return;

if (stream_init != NULL) {
update_queue_state();
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
update_queue_state();
for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
stream_init(fwd_streams[i]);
}
Expand Down Expand Up @@ -3139,7 +3126,8 @@ start_port(portid_t pid)
pl[cfg_pi++] = pi;
}

update_queue_state();
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
update_queue_state();

if (at_least_one_port_successfully_started && !no_link_check)
check_all_ports_link_status(RTE_PORT_ALL);
Expand Down

0 comments on commit 931f667

Please sign in to comment.