dpif-netdev: Fix non-pmd thread queue id.
authorDaniele Di Proietto <diproiettod@vmware.com>
Wed, 3 Jun 2015 14:55:16 +0000 (15:55 +0100)
committerEthan Jackson <ethan@nicira.com>
Wed, 3 Jun 2015 22:34:58 +0000 (15:34 -0700)
commit3bcc10c0701c241ef62bdb32c5d21c060ad7590b
tree18e7124bd60f785b4b546da4742711e867b5b7f6
parent7762f7c39a8f5f115427b598d9e768f9336af466
dpif-netdev: Fix non-pmd thread queue id.

Non pmd threads have a core_id == UINT32_MAX, while queue ids used by
netdevs range from 0 to the number of CPUs.  Therefore core ids cannot
be used directly to select a queue.

This commit introduces a simple mapping to fix the problem: pmd threads
continue using queues 0 to N (where N is the number of CPUs in the
system), while non pmd threads use queue N+1.

Fixes: d5c199ea7ff7 ("netdev-dpdk: Properly support non pmd threads.")

Reported-by: 차은호 <eunho.cha@atto-research.com
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/dpif-netdev.c