char *name; /* Identifier for log messages. */
/* Configuration. */
- struct list ports; /* Contains "struct ofport"s. */
+ struct ovs_list ports; /* Contains "struct ofport"s. */
enum port_vlan_mode vlan_mode; /* VLAN mode */
int vlan; /* -1=trunk port, else a 12-bit VLAN ID. */
unsigned long *trunks; /* Bitmap of trunked VLANs, if 'vlan' == -1.
odp_port_t odp_port;
struct ofbundle *bundle; /* Bundle that contains this port, if any. */
- struct list bundle_node; /* In struct ofbundle's "ports" list. */
+ struct ovs_list bundle_node;/* In struct ofbundle's "ports" list. */
struct cfm *cfm; /* Connectivity Fault Management, if any. */
struct bfd *bfd; /* BFD, if any. */
bool may_enable; /* May be enabled in bonds. */
/* Datapath port slated for removal from datapath. */
struct odp_garbage {
- struct list list_node;
+ struct ovs_list list_node;
odp_port_t odp_port;
};
struct dpif_port_dump port_dump;
struct dpif_port port;
struct shash_node *node;
- struct list garbage_list;
+ struct ovs_list garbage_list;
struct odp_garbage *garbage, *next;
struct sset names;
return error;
}
- /* Continue non-recirculation rule lookups from table 0.
+ /* Drop any run away non-recirc rule lookups. Recirc_id has to be
+ * zero when reaching this rule.
*
- * (priority=2), recirc=0, actions=resubmit(, 0)
+ * (priority=2), recirc_id=0, actions=drop
*/
- resubmit = ofpact_put_RESUBMIT(&ofpacts);
- resubmit->in_port = OFPP_IN_PORT;
- resubmit->table_id = 0;
-
+ ofpbuf_clear(&ofpacts);
match_init_catchall(&match);
match_set_recirc_id(&match, 0);
-
error = ofproto_dpif_add_internal_flow(ofproto, &match, 2, 0, &ofpacts,
&unused_rulep);
if (error) {
return error;
}
- /* Drop any run away recirc rule lookups. Recirc_id has to be
- * non-zero when reaching this rule.
+ /* Continue rule lookups for not-matched recirc rules from table 0.
*
- * (priority=1), *, actions=drop
+ * (priority=1), actions=resubmit(, 0)
*/
- ofpbuf_clear(&ofpacts);
+ resubmit = ofpact_put_RESUBMIT(&ofpacts);
+ resubmit->in_port = OFPP_IN_PORT;
+ resubmit->table_id = 0;
+
match_init_catchall(&match);
error = ofproto_dpif_add_internal_flow(ofproto, &match, 1, 0, &ofpacts,
&unused_rulep);
struct ofproto_packet_in *pin, *next_pin;
struct rule_dpif *rule;
struct oftable *table;
- struct list pins;
+ struct ovs_list pins;
ofproto->backer->need_revalidate = REV_RECONFIGURE;
xlate_txn_start();
* waiting for flow restore to complete. */
if (!ofproto_get_flow_restore_wait()) {
struct ofproto_packet_in *pin, *next_pin;
- struct list pins;
+ struct ovs_list pins;
guarded_list_pop_all(&ofproto->pins, &pins);
LIST_FOR_EACH_SAFE (pin, next_pin, list_node, &pins) {
struct ofpbuf *learning_packet;
int error, n_packets, n_errors;
struct mac_entry *e;
- struct list packets;
+ struct ovs_list packets;
list_init(&packets);
ovs_rwlock_rdlock(&ofproto->ml->rwlock);
if (wc) {
wc->masks.recirc_id = UINT32_MAX;
}
- if (flow->recirc_id) {
- /* Start looking up from internal table for post recirculation
- * flows or packets. */
- *table_id = TBL_INTERNAL;
- }
+ *table_id = rule_dpif_lookup_get_init_table_id(flow);
}
return rule_dpif_lookup_from_table(ofproto, flow, wc, take_ref, stats,
OVS_REQUIRES(group->stats_mutex)
{
struct ofputil_bucket *bucket;
- const struct list *buckets;
+ const struct ovs_list *buckets;
group->packet_count = 0;
group->byte_count = 0;
bucket->stats.packet_count += stats->n_packets;
bucket->stats.byte_count += stats->n_bytes;
} else { /* Credit to all buckets */
- const struct list *buckets;
+ const struct ovs_list *buckets;
group_dpif_get_buckets(group, &buckets);
LIST_FOR_EACH (bucket, list_node, buckets) {
{
struct group_dpif *group = group_dpif_cast(group_);
struct ofputil_bucket *bucket;
- const struct list *buckets;
+ const struct ovs_list *buckets;
struct bucket_counter *bucket_stats;
ovs_mutex_lock(&group->stats_mutex);
void
group_dpif_get_buckets(const struct group_dpif *group,
- const struct list **buckets)
+ const struct ovs_list **buckets)
{
*buckets = &group->up.buckets;
}
*
* On success, initializes '*ofprotop' and 'flow' and returns NULL. On failure
* returns a nonnull malloced error message. */
-static char * WARN_UNUSED_RESULT
+static char * OVS_WARN_UNUSED_RESULT
parse_flow_and_packet(int argc, const char *argv[],
struct ofproto_dpif **ofprotop, struct flow *flow,
struct ofpbuf **packetp)