> -----邮件原件----- > 发件人: Stephen Hemminger <[email protected]> > 发送时间: Saturday, December 25, 2021 3:38 AM > 收件人: Feifei Wang <[email protected]> > 抄送: [email protected]; Ferruh Yigit <[email protected]>; Andrew > Rybchenko <[email protected]>; Ray Kinsella > <[email protected]>; [email protected]; nd <[email protected]>; Honnappa > Nagarahalli <[email protected]>; Ruifeng Wang > <[email protected]> > 主题: Re: [RFC PATCH v1 2/4] ethdev: add API for direct re-arm mode > > On Sat, 25 Dec 2021 00:46:10 +0800 > Feifei Wang <[email protected]> wrote: > > > +rte_eth_direct_rxrearm_map(uint16_t rx_port_id, uint16_t rx_queue_id, > > + uint16_t tx_port_id, uint16_t tx_queue_id) { > > + struct rte_eth_dev *dev; > > + > > + dev = &rte_eth_devices[rx_port_id]; > > + (*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); > > + > > Indirect calls are expensive, maybe better to combine these? Thanks for your comment. I'm a little confused about this.
Whether 'expensive' is due to 'enable direct_rearm mode' and 'map queue' use different api, and we should combine them into the same API. If this, I think you are right, and just one api is enough to enable direct rearm mode and map queue.

