diff options
author | Ben Pfaff <blp@ovn.org> | 2020-06-17 14:55:45 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2020-10-16 19:10:02 -0700 |
commit | 807152a4ddfb89b65ef75c6b12937ecd68ea8cb3 (patch) | |
tree | 51136a78ad9c3dc59106214c57e51d4ed3592ab8 /include | |
parent | bbe2e39287476e7ba3e71d064adb8c0735cf0e95 (diff) | |
download | openvswitch-807152a4ddfb89b65ef75c6b12937ecd68ea8cb3.tar.gz |
Use primary/secondary, not master/slave, as names for OpenFlow roles.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openflow/nicira-ext.h | 22 | ||||
-rw-r--r-- | include/openflow/openflow-1.2.h | 6 | ||||
-rw-r--r-- | include/openflow/openflow-1.4.h | 8 | ||||
-rw-r--r-- | include/openvswitch/ofp-connection.h | 6 | ||||
-rw-r--r-- | include/openvswitch/ofp-errors.h | 9 |
5 files changed, 26 insertions, 25 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index dc12101f2..b68804991 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -296,16 +296,16 @@ enum nx_packet_in2_prop_type { * * The other possible roles are a related pair: * - * - Master (NX_ROLE_MASTER) is equivalent to Other, except that there may - * be at most one Master controller at a time: when a controller - * configures itself as Master, any existing Master is demoted to the - * Slave role. + * - Primary (NX_ROLE_PRIMARY) is equivalent to Other, except that there may + * be at most one Primary controller at a time: when a controller + * configures itself as Primary, any existing Primary is demoted to the + * Secondary role. * - * - Slave (NX_ROLE_SLAVE) allows the controller read-only access to + * - Secondary (NX_ROLE_SECONDARY) allows the controller read-only access to * OpenFlow features. In particular attempts to modify the flow table * will be rejected with an OFPBRC_EPERM error. * - * Slave controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED + * Secondary controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED * messages, but they do receive OFPT_PORT_STATUS messages. */ struct nx_role_request { @@ -315,23 +315,23 @@ OFP_ASSERT(sizeof(struct nx_role_request) == 4); enum nx_role { NX_ROLE_OTHER, /* Default role, full access. */ - NX_ROLE_MASTER, /* Full access, at most one. */ - NX_ROLE_SLAVE /* Read-only access. */ + NX_ROLE_PRIMARY, /* Full access, at most one. */ + NX_ROLE_SECONDARY /* Read-only access. */ }; /* NXT_SET_ASYNC_CONFIG. * * Sent by a controller, this message configures the asynchronous messages that * the controller wants to receive. Element 0 in each array specifies messages - * of interest when the controller has an "other" or "master" role; element 1, - * when the controller has a "slave" role. + * of interest when the controller has an "other" or "primary" role; element 1, + * when the controller has a "secondary" role. * * Each array element is a bitmask in which a 0-bit disables receiving a * particular message and a 1-bit enables receiving it. Each bit controls the * message whose 'reason' corresponds to the bit index. For example, the bit * with value 1<<2 == 4 in port_status_mask[1] determines whether the * controller will receive OFPT_PORT_STATUS messages with reason OFPPR_MODIFY - * (value 2) when the controller has a "slave" role. + * (value 2) when the controller has a "secondary" role. * * As a side effect, for service controllers, this message changes the * miss_send_len from default of zero to OFP_DEFAULT_MISS_SEND_LEN (128). diff --git a/include/openflow/openflow-1.2.h b/include/openflow/openflow-1.2.h index 30e220cfb..2952aec14 100644 --- a/include/openflow/openflow-1.2.h +++ b/include/openflow/openflow-1.2.h @@ -176,7 +176,7 @@ enum ofp12_group_capabilities { struct ofp12_role_request { ovs_be32 role; /* One of OFPCR12_ROLE_*. */ uint8_t pad[4]; /* Align to 64 bits. */ - ovs_be64 generation_id; /* Master Election Generation Id */ + ovs_be64 generation_id; /* Primary Election Generation Id */ }; OFP_ASSERT(sizeof(struct ofp12_role_request) == 16); @@ -184,8 +184,8 @@ OFP_ASSERT(sizeof(struct ofp12_role_request) == 16); enum ofp12_controller_role { OFPCR12_ROLE_NOCHANGE, /* Don't change current role. */ OFPCR12_ROLE_EQUAL, /* Default role, full access. */ - OFPCR12_ROLE_MASTER, /* Full access, at most one master. */ - OFPCR12_ROLE_SLAVE, /* Read-only access. */ + OFPCR12_ROLE_PRIMARY, /* Full access, at most one primary. */ + OFPCR12_ROLE_SECONDARY, /* Read-only access. */ }; /* Packet received on port (datapath -> controller). */ diff --git a/include/openflow/openflow-1.4.h b/include/openflow/openflow-1.4.h index 2bfa16b63..be191180b 100644 --- a/include/openflow/openflow-1.4.h +++ b/include/openflow/openflow-1.4.h @@ -274,7 +274,7 @@ struct ofp14_role_status { ovs_be32 role; /* One of OFPCR_ROLE_*. */ uint8_t reason; /* One of OFPCRR_*. */ uint8_t pad[3]; /* Align to 64 bits. */ - ovs_be64 generation_id; /* Master Election Generation Id */ + ovs_be64 generation_id; /* Primary Election Generation Id */ /* Followed by a list of struct ofp14_role_prop_header */ }; @@ -282,9 +282,9 @@ OFP_ASSERT(sizeof(struct ofp14_role_status) == 16); /* What changed about the controller role */ enum ofp14_controller_role_reason { - OFPCRR_MASTER_REQUEST = 0, /* Another controller asked to be master. */ - OFPCRR_CONFIG = 1, /* Configuration changed on the switch. */ - OFPCRR_EXPERIMENTER = 2, /* Experimenter data changed. */ + OFPCRR_PRIMARY_REQUEST = 0, /* Another controller asked to be primary. */ + OFPCRR_CONFIG = 1, /* Configuration changed on the switch. */ + OFPCRR_EXPERIMENTER = 2, /* Experimenter data changed. */ OFPCRR_N_REASONS /* Denotes number of reasons. */ }; diff --git a/include/openvswitch/ofp-connection.h b/include/openvswitch/ofp-connection.h index 5fb143157..1e844e07f 100644 --- a/include/openvswitch/ofp-connection.h +++ b/include/openvswitch/ofp-connection.h @@ -69,10 +69,10 @@ enum ofputil_async_msg_type { const char *ofputil_async_msg_type_to_string(enum ofputil_async_msg_type); struct ofputil_async_cfg { - uint32_t master[OAM_N_TYPES]; - uint32_t slave[OAM_N_TYPES]; + uint32_t primary[OAM_N_TYPES]; + uint32_t secondary[OAM_N_TYPES]; }; -#define OFPUTIL_ASYNC_CFG_INIT (struct ofputil_async_cfg) { .master[0] = 0 } +#define OFPUTIL_ASYNC_CFG_INIT (struct ofputil_async_cfg) { .primary[0] = 0 } enum ofperr ofputil_decode_set_async_config(const struct ofp_header *, bool loose, diff --git a/include/openvswitch/ofp-errors.h b/include/openvswitch/ofp-errors.h index a3f8142df..8c8511d65 100644 --- a/include/openvswitch/ofp-errors.h +++ b/include/openvswitch/ofp-errors.h @@ -115,10 +115,10 @@ enum ofperr { * OFPBIC_BAD_EXP_TYPE. */ /* Expected: 0x0,1,5 in OF1.0 means both OFPBRC_EPERM and - * OFPBRC_IS_SLAVE. */ + * OFPBRC_IS_SECONDARY. */ /* Expected: 0x0,1,5 in OF1.1 means both OFPBRC_EPERM and - * OFPBRC_IS_SLAVE. */ + * OFPBRC_IS_SECONDARY. */ /* ## ------------------ ## */ /* ## OFPET_HELLO_FAILED ## */ @@ -168,8 +168,9 @@ enum ofperr { * code defined the specification. ] */ OFPERR_OFPBRC_BAD_TABLE_ID, - /* OF1.0-1.1(1,5), OF1.2+(1,10). Denied because controller is slave. */ - OFPERR_OFPBRC_IS_SLAVE, + /* OF1.0-1.1(1,5), OF1.2+(1,10). Denied because controller has secondary + * role. (Secondary controllers have only read-only access.) */ + OFPERR_OFPBRC_IS_SECONDARY, /* NX1.0-1.1(1,514), OF1.2+(1,11). Invalid or missing port. [ A * non-standard error (1,514), formerly OFPERR_NXBRC_BAD_IN_PORT is used |