+
+/* In reaction to dpif purge, purges all 'ukey's with same 'pmd_id'. */
+static void
+dp_purge_cb(void *aux, unsigned pmd_id)
+{
+ struct udpif *udpif = aux;
+ size_t i;
+
+ udpif_pause_revalidators(udpif);
+ for (i = 0; i < N_UMAPS; i++) {
+ struct ukey_op ops[REVALIDATE_MAX_BATCH];
+ struct udpif_key *ukey;
+ struct umap *umap = &udpif->ukeys[i];
+ size_t n_ops = 0;
+
+ CMAP_FOR_EACH(ukey, cmap_node, &umap->cmap) {
+ if (ukey->pmd_id == pmd_id) {
+ delete_op_init(udpif, &ops[n_ops++], ukey);
+ if (n_ops == REVALIDATE_MAX_BATCH) {
+ push_ukey_ops(udpif, umap, ops, n_ops);
+ n_ops = 0;
+ }
+ }
+ }
+
+ if (n_ops) {
+ push_ukey_ops(udpif, umap, ops, n_ops);
+ }
+
+ ovsrcu_quiesce();
+ }
+ udpif_resume_revalidators(udpif);
+}