X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=bb2bf5a4ae2873c3447d5b949c4334f28336af14;hb=309eaa2bc4f9367cb1ca6ec91b583a7a6cabf079;hp=5e99fcab188390d276a5e9a80407118b20609aa6;hpb=9628cd42d45f47b17c5273a75db79826f1672c82;p=openvswitch diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 5e99fcab..bb2bf5a4 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1277,6 +1277,15 @@ ofproto_port_del(struct ofproto *ofproto, uint16_t odp_port) return error; } +/* Checks if 'ofproto' thinks 'odp_port' should be included in floods. Returns + * true if 'odp_port' exists and should be included, false otherwise. */ +bool +ofproto_port_is_floodable(struct ofproto *ofproto, uint16_t odp_port) +{ + struct ofport *ofport = get_port(ofproto, odp_port); + return ofport && !(ofport->opp.config & OFPPC_NO_FLOOD); +} + int ofproto_send_packet(struct ofproto *p, const struct flow *flow, const union ofp_action *actions, size_t n_actions,