Replace NXFER_* with OFPRR_* constants

This commit is contained in:
Glen Gibb committed 2009-10-14 15:56:36 -07:00
1 parent d1957f2054
commit add3e639a9
9 files changed
+13 -13

No files matched your search

+2 -2
View File
@@ -154,11 +154,11 @@ int flow_timeout(struct sw_flow *flow)
{
if (flow->idle_timeout != OFP_FLOW_PERMANENT
&& time_after64(get_jiffies_64(), flow->used + flow->idle_timeout * HZ))
return NXFER_IDLE_TIMEOUT;
return OFPRR_IDLE_TIMEOUT;
else if (flow->hard_timeout != OFP_FLOW_PERMANENT
&& time_after64(get_jiffies_64(),
flow->created + flow->hard_timeout * HZ))
return NXFER_HARD_TIMEOUT;
return OFPRR_HARD_TIMEOUT;
else
return -1;
}
+1 -1
View File
@@ -164,7 +164,7 @@ tmpl_uninstall_flow(struct datapath *dpinst, struct sw_table *flowtab,
if (flow_matches_desc(&flow->key, key, strict)
&& (!strict || (flow->priority == priority)))
count += do_uninstall(dpinst, flowtab,
flow, NXFER_DELETE);
flow, OFPRR_DELETE);
}
if (count != 0)
+1 -1
View File
@@ -225,7 +225,7 @@ nf2_uninstall_flow(struct datapath *dpinst, struct sw_table *flowtab,
nf2flow);
}
count += do_uninstall(dpinst, flowtab,
flow, NXFER_DELETE);
flow, OFPRR_DELETE);
}
}
if (count != 0)
+2 -2
View File
@@ -154,7 +154,7 @@ static int table_hash_delete(struct datapath *dp, struct sw_table *swt,
struct sw_flow *flow = *bucket;
if (flow && flow_keys_equal(&flow->key, key)
&& flow_has_out_port(flow, out_port))
count = do_delete(dp, bucket, flow, NXFER_DELETE);
count = do_delete(dp, bucket, flow, OFPRR_DELETE);
} else {
unsigned int i;
@@ -163,7 +163,7 @@ static int table_hash_delete(struct datapath *dp, struct sw_table *swt,
struct sw_flow *flow = *bucket;
if (flow && flow_matches_desc(&flow->key, key, strict)
&& flow_has_out_port(flow, out_port))
count += do_delete(dp, bucket, flow, NXFER_DELETE);
count += do_delete(dp, bucket, flow, OFPRR_DELETE);
}
}
th->n_flows -= count;
+1 -1
View File
@@ -127,7 +127,7 @@ static int table_linear_delete(struct datapath *dp, struct sw_table *swt,
if (flow_matches_desc(&flow->key, key, strict)
&& flow_has_out_port(flow, out_port)
&& (!strict || (flow->priority == priority)))
count += do_delete(dp, swt, flow, NXFER_DELETE);
count += do_delete(dp, swt, flow, OFPRR_DELETE);
}
tl->n_flows -= count;
return count;
+2 -2
View File
@@ -259,11 +259,11 @@ bool flow_timeout(struct sw_flow *flow)
uint64_t now = time_msec();
if (flow->idle_timeout != OFP_FLOW_PERMANENT
&& now > flow->used + flow->idle_timeout * 1000) {
flow->reason = NXFER_IDLE_TIMEOUT;
flow->reason = OFPRR_IDLE_TIMEOUT;
return true;
} else if (flow->hard_timeout != OFP_FLOW_PERMANENT
&& now > flow->created + flow->hard_timeout * 1000) {
flow->reason = NXFER_HARD_TIMEOUT;
flow->reason = OFPRR_HARD_TIMEOUT;
return true;
} else {
return false;
+1 -1
View File
@@ -64,7 +64,7 @@ struct sw_flow {
uint64_t created; /* When the flow was created. */
uint64_t packet_count; /* Number of packets seen. */
uint64_t byte_count; /* Number of bytes seen. */
uint8_t reason; /* Reason flow removed (one of NXFER_*). */
uint8_t reason; /* Reason flow removed (one of OFPRR_*). */
uint8_t send_flow_rem; /* Send a flow removed to the controller */
uint8_t emerg_flow; /* Emergency flow indicator */
+2 -2
View File
@@ -176,7 +176,7 @@ static int table_hash_delete(struct datapath *dp, struct sw_table *swt,
struct sw_flow *flow = *bucket;
if (flow && !flow_compare(&flow->key.flow, &key->flow)
&& flow_has_out_port(flow, out_port)) {
dp_send_flow_end(dp, flow, NXFER_DELETE);
dp_send_flow_end(dp, flow, OFPRR_DELETE);
do_delete(bucket);
count = 1;
}
@@ -188,7 +188,7 @@ static int table_hash_delete(struct datapath *dp, struct sw_table *swt,
struct sw_flow *flow = *bucket;
if (flow && flow_matches_desc(&flow->key, key, strict)
&& flow_has_out_port(flow, out_port)) {
dp_send_flow_end(dp, flow, NXFER_DELETE);
dp_send_flow_end(dp, flow, OFPRR_DELETE);
do_delete(bucket);
count++;
}
+1 -1
View File
@@ -156,7 +156,7 @@ static int table_linear_delete(struct datapath *dp, struct sw_table *swt,
if (flow_matches_desc(&flow->key, key, strict)
&& flow_has_out_port(flow, out_port)
&& (!strict || (flow->priority == priority))) {
dp_send_flow_end(dp, flow, NXFER_DELETE);
dp_send_flow_end(dp, flow, OFPRR_DELETE);
do_delete(flow);
count++;
}