mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
vswitchd: Add serial number configuration.
Signed-off-by: Kirill A. Kornilov <kornilov@zelax.ru> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
parent
eb540c0f5f
commit
8e371aa497
3
NEWS
3
NEWS
@ -1,6 +1,9 @@
|
||||
Post-v2.13.0
|
||||
---------------------
|
||||
- ovs-vswitchd no longer deletes datapath flows on exit by default.
|
||||
- OpenFlow:
|
||||
* The OpenFlow ofp_desc/serial_num may now be configured by setting the
|
||||
value of other-config:dp-sn in the Bridge table.
|
||||
|
||||
|
||||
v2.13.0 - xx xxx xxxx
|
||||
|
@ -815,6 +815,13 @@ ofproto_set_dp_desc(struct ofproto *p, const char *dp_desc)
|
||||
p->dp_desc = nullable_xstrdup(dp_desc);
|
||||
}
|
||||
|
||||
void
|
||||
ofproto_set_serial_desc(struct ofproto *p, const char *serial_desc)
|
||||
{
|
||||
free(p->serial_desc);
|
||||
p->serial_desc = nullable_xstrdup(serial_desc);
|
||||
}
|
||||
|
||||
int
|
||||
ofproto_set_snoops(struct ofproto *ofproto, const struct sset *snoops)
|
||||
{
|
||||
|
@ -351,6 +351,7 @@ void ofproto_set_threads(int n_handlers, int n_revalidators);
|
||||
void ofproto_type_set_config(const char *type,
|
||||
const struct smap *other_config);
|
||||
void ofproto_set_dp_desc(struct ofproto *, const char *dp_desc);
|
||||
void ofproto_set_serial_desc(struct ofproto *p, const char *serial_desc);
|
||||
int ofproto_set_snoops(struct ofproto *, const struct sset *snoops);
|
||||
int ofproto_set_netflow(struct ofproto *,
|
||||
const struct netflow_options *nf_options);
|
||||
|
@ -288,6 +288,7 @@ static void bridge_configure_ipfix(struct bridge *);
|
||||
static void bridge_configure_spanning_tree(struct bridge *);
|
||||
static void bridge_configure_tables(struct bridge *);
|
||||
static void bridge_configure_dp_desc(struct bridge *);
|
||||
static void bridge_configure_serial_desc(struct bridge *);
|
||||
static void bridge_configure_aa(struct bridge *);
|
||||
static void bridge_aa_refresh_queued(struct bridge *);
|
||||
static bool bridge_aa_need_refresh(struct bridge *);
|
||||
@ -939,6 +940,7 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
|
||||
bridge_configure_spanning_tree(br);
|
||||
bridge_configure_tables(br);
|
||||
bridge_configure_dp_desc(br);
|
||||
bridge_configure_serial_desc(br);
|
||||
bridge_configure_aa(br);
|
||||
}
|
||||
free(managers);
|
||||
@ -4123,6 +4125,13 @@ bridge_configure_dp_desc(struct bridge *br)
|
||||
smap_get(&br->cfg->other_config, "dp-desc"));
|
||||
}
|
||||
|
||||
static void
|
||||
bridge_configure_serial_desc(struct bridge *br)
|
||||
{
|
||||
ofproto_set_serial_desc(br->ofproto,
|
||||
smap_get(&br->cfg->other_config, "dp-sn"));
|
||||
}
|
||||
|
||||
static struct aa_mapping *
|
||||
bridge_aa_mapping_find(struct bridge *br, const int64_t isid)
|
||||
{
|
||||
|
@ -1261,6 +1261,18 @@
|
||||
Human readable description of datapath. It is a maximum 256
|
||||
byte-long free-form string to describe the datapath for
|
||||
debugging purposes, e.g. <code>switch3 in room 3120</code>.
|
||||
The value is returned by the switch as a part of reply to OFPMP_DESC
|
||||
request (ofp_desc). The OpenFlow specification (e.g. 1.3.5) describes
|
||||
the ofp_desc structure to contaion "NULL terminated ASCII strings".
|
||||
For the compatibility reasons no more than 255 ASCII characters should be used.
|
||||
</column>
|
||||
|
||||
<column name="other_config" key="dp-sn">
|
||||
Serial number. It is a maximum 32 byte-long free-form string to
|
||||
provide an additional switch identification. The value is returned
|
||||
by the switch as a part of reply to OFPMP_DESC request (ofp_desc).
|
||||
Same as mentioned in the description of <ref column="other-config" key="dp-desc"/>,
|
||||
the string should be no more than 31 ASCII characters for the compatibility.
|
||||
</column>
|
||||
|
||||
<column name="other_config" key="disable-in-band"
|
||||
|
Loading…
x
Reference in New Issue
Block a user