ofproto-dpif-xlate: Remove mirror assert.
During the revalidation/upcall, mirror could be removed. Instead of crash
the process, we can simply skip the deleted mirror.
The issue had been triggered multiple times by ovs-tcpdump in my test.
Fixes: ("ofproto-dpif: Modularize mirror code.")
Tested-by: Adrian Moreno
@@ -2142,9 +2142,14 @@ mirror_packet(struct xlate_ctx *ctx, struct xbundle *xbundle,
int snaplen;
/* Get the details of the mirror represented by the rightmost 1-bit. */
- ovs_assert(mirror_get(xbridge->mbridge, raw_ctz(mirrors),
+ if (OVS_UNLIKELY(!mirror_get(xbridge->mbridge, raw_ctz(mirrors),
&vlans, &dup_mirrors,
- &out, &snaplen, &out_vlan));
+ &out, &snaplen, &out_vlan))) {
+ /* The mirror got reconfigured before we got to read it's
+ * configuration. */
+ mirrors = zero_rightmost_1bit(mirrors);
+ continue;
+ }
/* If this mirror selects on the basis of VLAN, and it does not select
