projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cfm: Report opup as undefined if not in extended mode.
[openvswitch]
/
ofproto
/
ofproto.c
diff --git
a/ofproto/ofproto.c
b/ofproto/ofproto.c
index 522b791f48220226863996beec720bdc1a64ea5c..8c10f19a14463002223beef9330f47850d208287 100644
(file)
--- a/
ofproto/ofproto.c
+++ b/
ofproto/ofproto.c
@@
-2298,14
+2298,15
@@
handle_port_desc_stats_request(struct ofconn *ofconn,
const struct ofp_header *request)
{
struct ofproto *p = ofconn_get_ofproto(ofconn);
const struct ofp_header *request)
{
struct ofproto *p = ofconn_get_ofproto(ofconn);
+ enum ofp_version version;
struct ofport *port;
struct list replies;
ofpmp_init(&replies, request);
struct ofport *port;
struct list replies;
ofpmp_init(&replies, request);
+ version = ofputil_protocol_to_ofp_version(ofconn_get_protocol(ofconn));
HMAP_FOR_EACH (port, hmap_node, &p->ports) {
HMAP_FOR_EACH (port, hmap_node, &p->ports) {
- ofputil_append_port_desc_stats_reply(ofconn_get_protocol(ofconn),
- &port->pp, &replies);
+ ofputil_append_port_desc_stats_reply(version, &port->pp, &replies);
}
ofconn_send_replies(ofconn, &replies);
}
ofconn_send_replies(ofconn, &replies);
@@
-3141,6
+3142,7
@@
ofproto_rule_send_removed(struct rule *rule, uint8_t reason)
calc_flow_duration__(rule->created, time_msec(),
&fr.duration_sec, &fr.duration_nsec);
fr.idle_timeout = rule->idle_timeout;
calc_flow_duration__(rule->created, time_msec(),
&fr.duration_sec, &fr.duration_nsec);
fr.idle_timeout = rule->idle_timeout;
+ fr.hard_timeout = rule->hard_timeout;
rule->ofproto->ofproto_class->rule_get_stats(rule, &fr.packet_count,
&fr.byte_count);
rule->ofproto->ofproto_class->rule_get_stats(rule, &fr.packet_count,
&fr.byte_count);
@@
-3209,9
+3211,9
@@
handle_flow_mod(struct ofconn *ofconn, const struct ofp_header *oh)
goto exit_free_ofpacts;
}
goto exit_free_ofpacts;
}
+ if (fm.flags & OFPFF10_EMERG) {
/* We do not support the OpenFlow 1.0 emergency flow cache, which is not
* required in OpenFlow 1.0.1 and removed from OpenFlow 1.1. */
/* We do not support the OpenFlow 1.0 emergency flow cache, which is not
* required in OpenFlow 1.0.1 and removed from OpenFlow 1.1. */
- if (fm.flags & OFPFF_EMERG) {
/* We do not support the emergency flow cache. It will hopefully get
* dropped from OpenFlow in the near future. There is no good error
* code, so just state that the flow table is full. */
/* We do not support the emergency flow cache. It will hopefully get
* dropped from OpenFlow in the near future. There is no good error
* code, so just state that the flow table is full. */
@@
-3454,7
+3456,7
@@
ofproto_compose_flow_refresh_update(const struct rule *rule,
fu.hard_timeout = rule->hard_timeout;
fu.table_id = rule->table_id;
fu.cookie = rule->flow_cookie;
fu.hard_timeout = rule->hard_timeout;
fu.table_id = rule->table_id;
fu.cookie = rule->flow_cookie;
- fu.match =
(struct cls_rule *) &rule->cr
;
+ fu.match =
CONST_CAST(struct cls_rule *, &rule->cr)
;
if (!(flags & NXFMF_ACTIONS)) {
fu.ofpacts = NULL;
fu.ofpacts_len = 0;
if (!(flags & NXFMF_ACTIONS)) {
fu.ofpacts = NULL;
fu.ofpacts_len = 0;