Hi Nicira,
I need to send switch_config messages to each switch to enable flow
expiry messages (OpenFlow 0.8.9 / 0x97). Since this functionality
doesn't appear to be in Nox by default I added it myself. If you're
interested you can pull the change from our repo -- commit
1802ee173609d45abb7ae03d282e0570109ece17.
Let me know if you don't know the location of our Nox repo.
Glen
PS. Here's the patch in case you're curious:
diff --git a/src/nox/apps/pyrt/context.i b/src/nox/apps/pyrt/context.i
index 8676b8e..9b53c4a 100644
--- a/src/nox/apps/pyrt/context.i
+++ b/src/nox/apps/pyrt/context.i
@@ -111,8 +111,6 @@ public:
ethernetaddr addr, uint32_t mask, uint32_t config);
void send_aggregate_stats_request(uint64_t datapath_ids, const
struct ofp_match& match, uint8_t table_id);
- int send_switch_config(uint64_t datapath_id, uint16_t flags);
-
private:
PyContext();
diff --git a/src/nox/apps/pyrt/pycontext.cc b/src/nox/apps/pyrt/pycontext.cc
index 3acdcd9..a525ae3 100644
--- a/src/nox/apps/pyrt/pycontext.cc
+++ b/src/nox/apps/pyrt/pycontext.cc
@@ -411,31 +411,6 @@ PyContext::send_port_mod(uint64_t datapath_id,
uint16_t port_no, ethernetaddr ad
return error;
}
-int
-PyContext::send_switch_config(uint64_t datapath_id, uint16_t flags)
-{
- ofp_switch_config* osc = NULL;
- size_t msize = sizeof(ofp_switch_config);
- boost::shared_array<uint8_t> raw_sr(new uint8_t[msize]);
-
- // Send OFPT_STATS_REQUEST
- osc = (ofp_switch_config*) raw_sr.get();
- osc->header.type = OFPT_SET_CONFIG;
- osc->header.version = OFP_VERSION;
- osc->header.length = htons(msize);
- osc->header.xid = 0;
- osc->flags = htons(flags);
- osc->miss_send_len = htons(OFP_DEFAULT_MISS_SEND_LEN);
-
- int error =
c->send_openflow_command(datapathid::from_host(datapath_id),
- &osc->header, false);
- if (error == EAGAIN) {
- vlog().log(vlog().get_module_val("pyrt"), Vlog::LEVEL_ERR,
- "unable to send switch_config");
- }
-
- return error;
-}
bool
PyContext::unregister_handler(uint32_t rule_id) {
diff --git a/src/nox/apps/pyrt/pycontext.hh b/src/nox/apps/pyrt/pycontext.hh
index 814da6b..5cc8222 100644
--- a/src/nox/apps/pyrt/pycontext.hh
+++ b/src/nox/apps/pyrt/pycontext.hh
@@ -143,7 +143,6 @@ public:
ethernetaddr addr, uint32_t mask, uint32_t config);
void send_aggregate_stats_request(uint64_t datapath_ids, const
struct ofp_match& match, uint8_t table_id);
- int send_switch_config(uint64_t datapath_id, uint16_t flags);
/* C++ context */
const container::Context* ctxt;
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org