[dpdk-dev] [PATCH v6 09/10] examples/l2fwd-event: add graceful teardown
Pavan Nikhilesh Bhagavatula
pbhagavatula at marvell.com
Mon Oct 21 18:56:13 CEST 2019
>Hi Pavan,
>
>snipped
>>
>> Add graceful teardown that addresses both event mode and poll
>mode.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
>> ---
>snipped
>> + if (rsrc->event_mode) {
>> + struct l2fwd_event_resources *evt_rsrc =
>> + rsrc->evt_rsrc;
>> + for (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++)
>> + rte_event_eth_rx_adapter_stop(
>> + evt_rsrc->rx_adptr.rx_adptr[i]);
>Question from my end, for a graceful tear down first we stop the RX
>adapter then ensure after all events from worker are either dropped or
>transmit. Then we continue to TX adapter is stop. Is this right way?
The general rule of thumb is to stop producers before consumers.
>> + for (i = 0; i < evt_rsrc->tx_adptr.nb_tx_adptr; i++)
>> + rte_event_eth_tx_adapter_stop(
>> + evt_rsrc->tx_adptr.tx_adptr[i]);
>Should we call `rte_cleanup` to clean up the service core usage?
Since we are exiting from here I don't think we explicitly need to do a
cleanup of service config.
>
>> }
>> printf("Bye...\n");
>>
>> --
>> 2.17.1
More information about the dev
mailing list