X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=0b85e618cb9dbb74e0e1418357cbac8bbb7dd1d1;hb=a64e37a1d3990b9c2524d166119cb5564dc5d96c;hp=1865277136e2294bed068a0ad031f9c1520549e4;hpb=5de1bb5cc9eb5b52c095a02d8afe68bc34ae0523;p=openvswitch diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 18652771..0b85e618 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -24,6 +24,7 @@ #include #include #include +#include "autopath.h" #include "byte-order.h" #include "cfm.h" #include "classifier.h" @@ -2222,8 +2223,11 @@ xlate_nicira_action(struct action_xlate_ctx *ctx, const struct nx_action_set_tunnel *nast; const struct nx_action_set_queue *nasq; const struct nx_action_multipath *nam; + const struct nx_action_autopath *naa; enum nx_action_subtype subtype = ntohs(nah->subtype); + const struct ofhooks *ofhooks = ctx->ofproto->ofhooks; struct xlate_reg_state state; + uint16_t autopath_port; ovs_be64 tun_id; assert(nah->vendor == htonl(NX_VENDOR_ID)); @@ -2285,6 +2289,15 @@ xlate_nicira_action(struct action_xlate_ctx *ctx, multipath_execute(nam, &ctx->flow); break; + case NXAST_AUTOPATH: + naa = (const struct nx_action_autopath *) nah; + autopath_port = (ofhooks->autopath_cb + ? ofhooks->autopath_cb(&ctx->flow, ntohl(naa->id), + &ctx->tags, ctx->ofproto->aux) + : OFPP_NONE); + autopath_execute(naa, &ctx->flow, autopath_port); + break; + /* If you add a new action here that modifies flow data, don't forget to * update the flow key in ctx->flow at the same time. */ @@ -4415,5 +4428,6 @@ static const struct ofhooks default_ofhooks = { default_normal_ofhook_cb, NULL, NULL, + NULL, NULL };