mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
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>
This commit is contained in:
13
lib/dpif.h
13
lib/dpif.h
@@ -787,6 +787,19 @@ struct dpif_upcall {
|
||||
struct nlattr *actions; /* Argument to OVS_ACTION_ATTR_USERSPACE. */
|
||||
};
|
||||
|
||||
/* A callback to notify higher layer of dpif about to be purged, so that
|
||||
* higher layer could try reacting to this (e.g. grabbing all flow stats
|
||||
* before they are gone). This function is currently implemented only by
|
||||
* dpif-netdev.
|
||||
*
|
||||
* The caller needs to provide the 'aux' pointer passed down by higher
|
||||
* layer from the dpif_register_notify_cb() function and the 'pmd_id' of
|
||||
* the polling thread.
|
||||
*/
|
||||
typedef void dp_purge_callback(void *aux, unsigned pmd_id);
|
||||
|
||||
void dpif_register_dp_purge_cb(struct dpif *, dp_purge_callback *, void *aux);
|
||||
|
||||
/* A callback to process an upcall, currently implemented only by dpif-netdev.
|
||||
*
|
||||
* The caller provides the 'packet' and 'flow' to process, the corresponding
|
||||
|
Reference in New Issue
Block a user