@@ -182,6 +182,7 @@ struct xlate_ctx {
struct xlate_in *xin;
struct xlate_out *xout;
+ struct xlate_cfg *xcfg;
const struct xbridge *xbridge;
/* Flow at the last commit. */
@@ -512,9 +513,22 @@ struct xlate_cfg {
static OVSRCU_TYPE(struct xlate_cfg *) xcfgp = OVSRCU_INITIALIZER(NULL); static struct xlate_cfg *new_xcfg = NULL;
+static struct xlate_cfg *
+xlate_get_cfg(const struct xlate_ctx *ctx) {
+ struct xlate_cfg *cfg = NULL;
+
+ if (ctx && ctx->xcfg) {
+ cfg = ctx->xcfg;
+ } else {
+ cfg = ovsrcu_get(struct xlate_cfg *, &xcfgp);
+ }
+
+ return cfg;
+}
+
typedef void xlate_actions_handler(const struct ofpact *, size_t ofpacts_len,
struct xlate_ctx *, bool);
-
static bool may_receive(const struct xport *, struct xlate_ctx *); static void do_xlate_actions(const struct ofpact *, size_t ofpacts_len,
struct xlate_ctx *, bool); @@ -1965,7 +1979,7 @@ mirror_packet(struct xlate_ctx *ctx, struct xbundle *xbundle,
/* Send the packet to the mirror. */
if (out) {