> -----邮件原件----- > 发件人: Stephen Hemminger <step...@networkplumber.org> > 发送时间: Saturday, December 25, 2021 3:38 AM > 收件人: Feifei Wang <feifei.wa...@arm.com> > 抄送: tho...@monjalon.net; Ferruh Yigit <ferruh.yi...@intel.com>; Andrew > Rybchenko <andrew.rybche...@oktetlabs.ru>; Ray Kinsella > <m...@ashroe.eu>; dev@dpdk.org; nd <n...@arm.com>; Honnappa > Nagarahalli <honnappa.nagaraha...@arm.com>; Ruifeng Wang > <ruifeng.w...@arm.com> > 主题: 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 <feifei.wa...@arm.com> 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.