examples/l3fwd-power: enable one-shot Rx interrupt and polling switch
authorCunming Liang <cunming.liang@intel.com>
Mon, 20 Jul 2015 03:02:29 +0000 (11:02 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Jul 2015 21:13:57 +0000 (23:13 +0200)
commitaee3bc79cc3440c3012575dfe0df51bdea68bf28
tree097ea3713aa1de72bacd3ba4d3dac746ae45d08b
parentc3cd3de0ab50ad25609db936027ca84c6e4d1112
examples/l3fwd-power: enable one-shot Rx interrupt and polling switch

The patch demonstrates how to handle per rx queue interrupt in a NAPI-like
implementation in userspace. The working thread mainly runs in polling mode
and switch to interrupt mode only if there is no packet received in recent polls.
The working thread returns to polling mode immediately once it receives an
interrupt notification caused by the incoming packets.
The sample keeps running in polling mode if the binding PMD hasn't supported
the rx interrupt yet. Now only ixgbe(pf/vf) and igb support it.

Signed-off-by: Danny Zhou <danny.zhou@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
examples/l3fwd-power/main.c