[dpdk-dev] [PATCH v5 4/7] ethdev: copy fast-path API into separate structure
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Mon Oct 11 10:39:19 CEST 2021
On 10/11/21 4:18 AM, fengchengwen wrote:
> Sorry to self-reply.
>
> I think it's better the 'struct rte_eth_dev *dev' hold a pointer to the
> 'struct rte_eth_fp_ops', e.g.
>
> struct rte_eth_dev {
> struct rte_eth_fp_ops *fp_ops;
> ... // other field
> }
>
> The eth framework set the pointer in the rte_eth_dev_pci_allocate(), and driver fill
> corresponding callback:
> dev->fp_ops->rx_pkt_burst = xxx_recv_pkts;
> dev->fp_ops->tx_pkt_burst = xxx_xmit_pkts;
> ...
>
> In this way, the behavior of the primary and secondary processes can be unified, which
> is basically the same as that of the original process.
Frankly speaking I see huge value in scheme suggested by
Konstantin to care about ops in stopped state on ethdev value.
So, I like approach in the patch more.
More information about the dev
mailing list