From add3e639a98080ac5b870a3424e481217bcc32d8 Mon Sep 17 00:00:00 2001 From: Glen Gibb Date: Mon, 12 Oct 2009 23:10:26 -0700 Subject: [PATCH] Replace NXFER_* with OFPRR_* constants --- datapath/flow.c | 4 ++-- datapath/hwtable_dummy/hwtable_dummy.c | 2 +- datapath/hwtable_nf2/nf2_flowtable.c | 2 +- datapath/table-hash.c | 4 ++-- datapath/table-linear.c | 2 +- udatapath/switch-flow.c | 4 ++-- udatapath/switch-flow.h | 2 +- udatapath/table-hash.c | 4 ++-- udatapath/table-linear.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/datapath/flow.c b/datapath/flow.c index 4eea4cd..5823e81 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -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; } diff --git a/datapath/hwtable_dummy/hwtable_dummy.c b/datapath/hwtable_dummy/hwtable_dummy.c index 5be4727..82150d0 100644 --- a/datapath/hwtable_dummy/hwtable_dummy.c +++ b/datapath/hwtable_dummy/hwtable_dummy.c @@ -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) diff --git a/datapath/hwtable_nf2/nf2_flowtable.c b/datapath/hwtable_nf2/nf2_flowtable.c index 38e62c6..75eb322 100644 --- a/datapath/hwtable_nf2/nf2_flowtable.c +++ b/datapath/hwtable_nf2/nf2_flowtable.c @@ -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) diff --git a/datapath/table-hash.c b/datapath/table-hash.c index 0ef4a3a..7db1e0f 100644 --- a/datapath/table-hash.c +++ b/datapath/table-hash.c @@ -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; diff --git a/datapath/table-linear.c b/datapath/table-linear.c index 7df8567..cfb5168 100644 --- a/datapath/table-linear.c +++ b/datapath/table-linear.c @@ -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; diff --git a/udatapath/switch-flow.c b/udatapath/switch-flow.c index b375acc..2651580 100644 --- a/udatapath/switch-flow.c +++ b/udatapath/switch-flow.c @@ -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; diff --git a/udatapath/switch-flow.h b/udatapath/switch-flow.h index cbb1813..e7c0e27 100644 --- a/udatapath/switch-flow.h +++ b/udatapath/switch-flow.h @@ -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 */ diff --git a/udatapath/table-hash.c b/udatapath/table-hash.c index 36dd435..1bdf211 100644 --- a/udatapath/table-hash.c +++ b/udatapath/table-hash.c @@ -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++; } diff --git a/udatapath/table-linear.c b/udatapath/table-linear.c index 95571ce..4dd6e94 100644 --- a/udatapath/table-linear.c +++ b/udatapath/table-linear.c @@ -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++; }