X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=ofproto%2Fofproto.h;h=7504027c2c6bbad6826643fefd68fff19e9cf94e;hb=4e548ad9e60f8248090a467fefcc58da5f298c96;hp=1b8709a5f4ebb4fea503e72d11053f7915925756;hpb=9efd308e957c26ab42a5210cc9fc7300c7d021f0;p=cascardo%2Fovs.git diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 1b8709a5f..7504027c2 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. + * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ #include "smap.h" #include "sset.h" #include "stp.h" +#include "lacp.h" #ifdef __cplusplus extern "C" { @@ -45,6 +46,12 @@ struct ofport; struct ofproto; struct shash; struct simap; +struct smap; +struct netdev_stats; +struct ovs_list; +struct lldp_status; +struct aa_settings; +struct aa_mapping_settings; /* Needed for the lock annotations. */ extern struct ovs_mutex ofproto_mutex; @@ -109,6 +116,9 @@ struct ofproto_port_rstp_status { uint16_t port_id; enum rstp_port_role role; enum rstp_state state; + rstp_identifier designated_bridge_id; + uint16_t designated_port_id; + uint32_t designated_path_cost; int tx_count; /* Number of BPDUs transmitted. */ int rx_count; /* Number of valid BPDUs received. */ int error_count; /* Number of bad BPDUs received. */ @@ -123,6 +133,8 @@ struct ofproto_port_rstp_settings { bool admin_edge_port; bool auto_edge; bool mcheck; + uint8_t admin_p2p_mac_state; + bool admin_port_state; }; struct ofproto_stp_settings { @@ -176,6 +188,11 @@ struct ofproto_mcast_snooping_settings { unsigned int max_entries; /* Size of the multicast snooping table. */ }; +struct ofproto_mcast_snooping_port_settings { + bool flood; /* If true, flood multicast traffic */ + bool flood_reports; /* If true, flood Reports traffic */ +}; + /* How the switch should act if the controller cannot be contacted. */ enum ofproto_fail_mode { OFPROTO_FAIL_SECURE, /* Preserve flow table. */ @@ -267,7 +284,7 @@ int ofproto_port_dump_done(struct ofproto_port_dump *); ) #define OFPROTO_FLOW_LIMIT_DEFAULT 200000 -#define OFPROTO_MAX_IDLE_DEFAULT 1500 +#define OFPROTO_MAX_IDLE_DEFAULT 10000 /* ms */ const char *ofproto_port_open_type(const char *datapath_type, const char *port_type); @@ -297,8 +314,10 @@ void ofproto_set_mac_table_config(struct ofproto *, unsigned idle_time, int ofproto_set_mcast_snooping(struct ofproto *ofproto, const struct ofproto_mcast_snooping_settings *s); int ofproto_port_set_mcast_snooping(struct ofproto *ofproto, void *aux, - bool flood); + const struct ofproto_mcast_snooping_port_settings *s); void ofproto_set_threads(int n_handlers, int n_revalidators); +void ofproto_set_n_dpdk_rxqs(int n_rxqs); +void ofproto_set_cpu_mask(const char *cmask); void ofproto_set_dp_desc(struct ofproto *, const char *dp_desc); int ofproto_set_snoops(struct ofproto *, const struct sset *snoops); int ofproto_set_netflow(struct ofproto *, @@ -328,6 +347,7 @@ bool ofproto_port_bfd_status_changed(struct ofproto *, ofp_port_t ofp_port); int ofproto_port_get_bfd_status(struct ofproto *, ofp_port_t ofp_port, struct smap *); int ofproto_port_is_lacp_current(struct ofproto *, ofp_port_t ofp_port); +int ofproto_port_get_lacp_stats(const struct ofport *, struct lacp_slave_stats *); int ofproto_port_set_stp(struct ofproto *, ofp_port_t ofp_port, const struct ofproto_port_stp_settings *); int ofproto_port_get_stp_status(struct ofproto *, ofp_port_t ofp_port, @@ -421,6 +441,16 @@ int ofproto_mirror_unregister(struct ofproto *, void *aux); int ofproto_mirror_get_stats(struct ofproto *, void *aux, uint64_t *packets, uint64_t *bytes); +void ofproto_port_set_lldp(struct ofproto *ofproto, ofp_port_t ofp_port, + const struct smap *cfg); +int ofproto_set_aa(struct ofproto *ofproto, void *aux, + const struct aa_settings *s); +int ofproto_aa_mapping_register(struct ofproto *ofproto, void *aux, + const struct aa_mapping_settings *s); +int ofproto_aa_mapping_unregister(struct ofproto *ofproto, void *aux); +int ofproto_aa_vlan_get_queued(struct ofproto *ofproto, struct ovs_list *list); +unsigned int ofproto_aa_vlan_get_queue_size(struct ofproto *ofproto); + int ofproto_set_flood_vlans(struct ofproto *, unsigned long *flood_vlans); bool ofproto_is_mirror_output_bundle(const struct ofproto *, void *aux); @@ -429,14 +459,18 @@ struct ofproto_table_settings { char *name; /* Name exported via OpenFlow or NULL. */ unsigned int max_flows; /* Maximum number of flows or UINT_MAX. */ - /* These members determine the handling of an attempt to add a flow that - * would cause the table to have more than 'max_flows' flows. + /* These members, together with OpenFlow OFPT_TABLE_MOD, determine the + * handling of an attempt to add a flow that would cause the table to have + * more than 'max_flows' flows: * - * If 'groups' is NULL, overflows will be rejected with an error. + * - If 'enable_eviction' is false and OFPT_TABLE_MOD does not enable + * eviction, overflows will be rejected with an error. * - * If 'groups' is nonnull, an overflow will cause a flow to be removed. - * The flow to be removed is chosen to give fairness among groups - * distinguished by different values for the subfields within 'groups'. */ + * - If 'enable_eviction' is true or OFPT_TABLE_MOD enables eviction, an + * overflow will cause a flow to be removed. The flow to be removed + * is chosen to give fairness among groups distinguished by different + * values for the 'n_groups' subfields within 'groups'. */ + bool enable_eviction; struct mf_subfield *groups; size_t n_groups;