Re: [dpdk-dev] [RFC v2 2/5] ethdev: add simple power management API and callback

2020-08-13 Thread Liang, Ma
On 11 Aug 11:27, Liang Ma wrote: > +static uint16_t > +rte_ethdev_pmgmt_umait(uint16_t port_id, uint16_t qidx, > + struct rte_mbuf **pkts __rte_unused, uint16_t nb_rx, > + uint16_t max_pkts __rte_unused, void *_ __rte_unused) > +{ > + > + struct rte_eth_dev *dev = &rte

[dpdk-dev] [RFC v2 2/5] ethdev: add simple power management API and callback

2020-08-11 Thread Liang Ma
Add a simple on/off switch that will enable saving power when no packets are arriving. It is based on counting the number of empty polls and, when the number reaches a certain threshold, entering an architecture-defined optimized power state that will either wait until a TSC timestamp expires, or w