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>
Tue, 26 Jan 2016 19:40:35 +0000 (11:40 -0800)
commitae7ad0a15ef5c9c045419e1dbcfb7b98b05c7b5a
tree36d6d644f4f46bb5687ddf3a5c2cb471ae843596
parent02ab4b1a6a173979a51cabd7000a34546d517e60
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