dpif-netdev: Purge all ukeys when reconfigure pmd.
authorAlex Wang <ee07b291@gmail.com>
Tue, 25 Aug 2015 23:36:46 +0000 (16:36 -0700)
committerAlex Wang <ee07b291@gmail.com>
Wed, 2 Sep 2015 05:57:59 +0000 (05:57 +0000)
commite4e74c3a2b9a83544cb976e5049fb65da9ecbed5
treec0f27f679786c6c3ac119a832b74fc4296642bd5
parentdba82d38b81894abfa574149105e27dafe9bd6b5
dpif-netdev: Purge all ukeys when reconfigure pmd.

When dpdk configuration changes, all pmd threads are recreated
and rx queues of each port are reloaded.  After this process,
rx queue could be mapped to a different pmd thread other than
the one before reconfiguration.  However, this is totally
transparent to ofproto layer modules.  So, if the ofproto-dpif-upcall
module still holds ukeys generated before pmd thread recreation,
this old ukey will collide with the ukey for the new upcalls
from same traffic flow, causing flow installation failure.

To fix the bug, this commit adds a new call-back function
in dpif layer for notifying upper layer the purging of datapath
(e.g. pmd thread deletion in dpif-netdev).  So, the
ofproto-dpif-upcall module can react properly with deleting
the ukeys and with collecting flows' last stats.

Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Alex Wang <ee07b291@gmail.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Tested-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
lib/dpif-netdev.c
lib/dpif-netlink.c
lib/dpif-provider.h
lib/dpif.c
lib/dpif.h
ofproto/ofproto-dpif-upcall.c