[dpdk-dev] [PATCH v6 8/8] l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switch

2015-02-28 Thread Stephen Hemminger
On Fri, 27 Feb 2015 12:56:16 +0800 Cunming Liang wrote: > +/* ethernet addresses of ports */ > +static rte_spinlock_t locks[RTE_MAX_ETHPORTS]; Comment is incorrect this is a lock array not an address array. > static struct rte_eth_conf port_conf = { > .rxmode = { > -

[dpdk-dev] [PATCH v6 8/8] l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switch

2015-02-28 Thread Stephen Hemminger
On Fri, 27 Feb 2015 12:56:16 +0800 Cunming Liang wrote: > + /* Enable one-shot rx interrupt */ > + rte_spinlock_lock(&(locks[port_id])); > + rte_eth_dev_rx_intr_enable(port_id, queue_id); > + rte_spinlock_unlock(&(locks[port_id])); > + If always requires locks like this, then

[dpdk-dev] [PATCH v6 8/8] l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switch

2015-02-27 Thread Cunming Liang
From: "Zhou, Danny" Demonstrate how to handle per rx queue interrupt in a NAPI-like implementation in usersapce. PDK polling thread mainly works in polling mode and switch to interrupt mode only if there is no any packet received in recent polls. Usersapce interrupt