On 5/11/22 01:49, Honnappa Nagarahalli wrote:
On 4/20/22 11:16, Feifei Wang wrote:
Add API for enabling direct rearm mode and for mapping RX and TX
queues. Currently, the API supports 1:1(txq : rxq) mapping.
Suggested-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>
Signed-off-by: Feifei Wang <feifei.wa...@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.w...@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>
+ (*dev->dev_ops->rx_queue_direct_rearm_enable)(dev,
rx_queue_id);
+ (*dev->dev_ops->rx_queue_direct_rearm_map)(dev, rx_queue_id,
+ tx_port_id, tx_queue_id);
We must check that function pointers are not NULL as usual.
Return values must be checked.
[Feifei] I agree with this, The check for pointer and return value will be added
Isn't is safe to setup map and than enable.
Otherwise we definitely need disable.
[Feifei] I will change code that map first and then set 'rxq->offload' to enable
direct-rearm mode.
Also, what should happen on Tx port unplug? How to continue if we
still have Rx port up and running?
[Feifei] For direct rearm mode, if Tx port unplug, it means there is no buffer
from Tx.
And then, Rx will put buffer from mempool as usual for rearm.
Andrew, when you say 'TX port unplug', do you mean the
'rte_eth_dev_tx_queue_stop' is called? Is calling 'rte_eth_dev_tx_queue_stop'
allowed when the device is running?
I think that deferred start and presence of
rte_eth_dev_tx_queue_stop() implies the possibility to stop
Tx queue. But, yes, application should care about conditions
to have no traffic running to Tx queue.
Anyway, I was talking about hot unplug of the entire
device used as Tx port in above config.