dpif-netdev: Rework of rx queue management.
authorIlya Maximets <i.maximets@samsung.com>
Tue, 26 Jan 2016 06:12:33 +0000 (09:12 +0300)
committerDaniele Di Proietto <diproiettod@vmware.com>
Wed, 27 Jan 2016 04:58:27 +0000 (20:58 -0800)
commit8381ecaa9c8ff4185e89b90abf95b80e2eb52dab
treef2067be5d49b791ee0dd7230371decbb8949e276
parent5b5868191c8792726fc3237dfff84dcbbf3da6ae
dpif-netdev: Rework of rx queue management.

Current rx queue management model is buggy and will not work properly
without additional barriers and other syncronization between PMD
threads and main thread.

Known BUGS of current model:
* While reloading, two PMD threads, one already reloaded and
  one not yet reloaded, can poll same queue of the same port.
  This behavior may lead to dpdk driver failure, because they
  are not thread-safe.
* Same bug as fixed in commit e4e74c3a2b
  ("dpif-netdev: Purge all ukeys when reconfigure pmd.") but
  reproduced while only reconfiguring of pmd threads without
  restarting, because addition may change the sequence of
  other ports, which is important in time of reconfiguration.

Introducing the new model, where distribution of queues made by main
thread with minimal synchronizations and without data races between
pmd threads. Also, this model should work faster, because only
needed threads will be interrupted for reconfiguraition and total
computational complexity of reconfiguration is less.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
lib/dpif-netdev.c