uint64_t packets, uint64_t bytes);
struct ofbundle {
- struct ofproto_dpif *ofproto; /* Owning ofproto. */
struct hmap_node hmap_node; /* In struct ofproto's "bundles" hmap. */
+ struct ofproto_dpif *ofproto; /* Owning ofproto. */
void *aux; /* Key supplied by ofproto's client. */
char *name; /* Identifier for log messages. */
return -1;
}
}
+
+static int
+get_cfm_health(const struct ofport *ofport_)
+{
+ struct ofport_dpif *ofport = ofport_dpif_cast(ofport_);
+
+ return ofport->cfm ? cfm_get_health(ofport->cfm) : -1;
+}
\f
/* Spanning Tree. */
if (table_id > 0 && table_id < N_TABLES) {
struct table_dpif *table = &ofproto->tables[table_id];
if (table->other_table) {
- ctx->tags |= (rule
+ ctx->tags |= (rule && rule->tag
? rule->tag
: rule_calculate_tag(&ctx->flow,
&table->other_table->wc,
eth_pop_vlan(packet);
eh = packet->l2;
- assert(eh->eth_type == ctx->flow.dl_type);
+
+ /* If the Ethernet type is less than ETH_TYPE_MIN, it's likely an 802.2
+ * LLC frame. Calculating the Ethernet type of these frames is more
+ * trouble than seems appropriate for a simple assertion. */
+ assert(ntohs(eh->eth_type) < ETH_TYPE_MIN
+ || eh->eth_type == ctx->flow.dl_type);
+
memcpy(eh->eth_src, ctx->flow.dl_src, sizeof eh->eth_src);
memcpy(eh->eth_dst, ctx->flow.dl_dst, sizeof eh->eth_dst);
set_cfm,
get_cfm_fault,
get_cfm_remote_mpids,
+ get_cfm_health,
set_stp,
get_stp_status,
set_stp_port,