From 35c33856b41546a1eb650bf69f1f38fc14cc2f79 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 5 Apr 2011 16:34:09 -0700 Subject: [PATCH] ofproto: Rename ofproto_iface_*() functions to ofproto_port_*(). This makes ofproto use the term "port" consistently for a single purpose (which is unfortunately different from the term "interface" used in the OVS database, but at least it is now internally consistent). --- ofproto/ofproto.c | 10 +++++----- ofproto/ofproto.h | 10 +++++----- vswitchd/bridge.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 49f6645e..222585aa 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -593,7 +593,7 @@ ofproto_set_sflow(struct ofproto *ofproto, /* Clears the CFM configuration from 'port_no' on 'ofproto'. */ void -ofproto_iface_clear_cfm(struct ofproto *ofproto, uint32_t port_no) +ofproto_port_clear_cfm(struct ofproto *ofproto, uint32_t port_no) { struct ofport *ofport = get_port(ofproto, port_no); if (ofport && ofport->cfm){ @@ -609,9 +609,9 @@ ofproto_iface_clear_cfm(struct ofproto *ofproto, uint32_t port_no) * * This function has no effect if 'ofproto' does not have a port 'port_no'. */ void -ofproto_iface_set_cfm(struct ofproto *ofproto, uint32_t port_no, - const struct cfm *cfm, - const uint16_t *remote_mps, size_t n_remote_mps) +ofproto_port_set_cfm(struct ofproto *ofproto, uint32_t port_no, + const struct cfm *cfm, + const uint16_t *remote_mps, size_t n_remote_mps) { struct ofport *ofport; @@ -646,7 +646,7 @@ ofproto_iface_set_cfm(struct ofproto *ofproto, uint32_t port_no, * 'port_no' or if that port does not have CFM configured. The caller must not * modify or destroy the returned object. */ const struct cfm * -ofproto_iface_get_cfm(struct ofproto *ofproto, uint32_t port_no) +ofproto_port_get_cfm(struct ofproto *ofproto, uint32_t port_no) { struct ofport *ofport = get_port(ofproto, port_no); return ofport ? ofport->cfm : NULL; diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 2e01fba6..cd3671c4 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -166,11 +166,11 @@ int ofproto_set_netflow(struct ofproto *, void ofproto_set_sflow(struct ofproto *, const struct ofproto_sflow_options *); /* Configuration of individual interfaces. */ -void ofproto_iface_clear_cfm(struct ofproto *, uint32_t port_no); -void ofproto_iface_set_cfm(struct ofproto *, uint32_t port_no, - const struct cfm *, - const uint16_t *remote_mps, size_t n_remote_mps); -const struct cfm *ofproto_iface_get_cfm(struct ofproto *, uint32_t port_no); +void ofproto_port_clear_cfm(struct ofproto *, uint32_t port_no); +void ofproto_port_set_cfm(struct ofproto *, uint32_t port_no, + const struct cfm *, + const uint16_t *remote_mps, size_t n_remote_mps); +const struct cfm *ofproto_port_get_cfm(struct ofproto *, uint32_t port_no); /* Configuration querying. */ uint64_t ofproto_get_datapath_id(const struct ofproto *); diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 83e35376..876ed54c 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1253,7 +1253,7 @@ iface_refresh_cfm_stats(struct iface *iface) size_t i; mon = iface->cfg->monitor; - cfm = ofproto_iface_get_cfm(iface->port->bridge->ofproto, iface->dp_ifidx); + cfm = ofproto_port_get_cfm(iface->port->bridge->ofproto, iface->dp_ifidx); if (!cfm || !mon) { return false; @@ -1591,7 +1591,7 @@ cfm_unixctl_show(struct unixctl_conn *conn, return; } - cfm = ofproto_iface_get_cfm(iface->port->bridge->ofproto, iface->dp_ifidx); + cfm = ofproto_port_get_cfm(iface->port->bridge->ofproto, iface->dp_ifidx); if (!cfm) { unixctl_command_reply(conn, 501, "CFM not enabled"); @@ -3447,7 +3447,7 @@ iface_configure_cfm(struct iface *iface) mon = iface->cfg->monitor; if (!mon) { - ofproto_iface_clear_cfm(iface->port->bridge->ofproto, iface->dp_ifidx); + ofproto_port_clear_cfm(iface->port->bridge->ofproto, iface->dp_ifidx); return; } @@ -3466,8 +3466,8 @@ iface_configure_cfm(struct iface *iface) remote_mps[i] = mon->remote_mps[i]->mpid; } - ofproto_iface_set_cfm(iface->port->bridge->ofproto, iface->dp_ifidx, - &cfm, remote_mps, mon->n_remote_mps); + ofproto_port_set_cfm(iface->port->bridge->ofproto, iface->dp_ifidx, + &cfm, remote_mps, mon->n_remote_mps); free(remote_mps); } -- 2.30.2