On Wed, Jul 16, 2008 at 11:53 PM, Ben Pfaff <[EMAIL PROTECTED]> wrote:
> "Brandon Heller" <[EMAIL PROTECTED]> writes: > > > I would expect there to be major issues when mixing 32b OF with 64b NOX, > > because some of the fields in openflow.h (at least as of v0.8.1 - haven't > > checked if this got updated) change size depending on 32/64b. Some of > the > > substructures in ofp messages, like flow_expiration, are not 64b > multiples, > > and so padding gets inserted to ensure that all substructs start on 64b > > boundaries. This will have to be addressed with v0.9. > > When you were planning to point this out? I was unaware of the > problems. In fact, I thought I had carefully laid out the > structures to avoid such problems. Obviously not, though. It came up Monday, when the test suite was failing on the HP because the flow_expired message was a different length than expected. I was going to see it for myself and suggest a fix (either adding pad chars or forcing the structs to be packed) before reporting it. Below is a list of some of the differences in size and offset between 32b/64b linux, as reported by Jean - different fields are highlighted in red. -Brandon -----Original Message----- From: Jean Tourrilhes [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2008 3:32 PM To: Heller, Brandon Subject: Offset/List --- 32 bits Linux --- offsetof(struct ofp_switch_features, ports) = 44 offsetof(struct ofp_packet_in, data) = 18 offsetof(struct ofp_packet_out, u) = 16 offsetof(struct ofp_flow_mod, actions) = 60 offsetof(struct ofp_error_msg, data) = 12 offsetof(struct ofp_stats_request, body) = 12 offsetof(struct ofp_stats_reply, body) = 12 offsetof(struct ofp_flow_stats, actions) = 64 sizeof(struct ofp_phy_port) = 36 sizeof(struct ofp_port_status) = 48 sizeof(struct ofp_port_mod) = 44 sizeof(struct ofp_action) = 12 sizeof(struct ofp_match) = 36 sizeof(struct ofp_flow_expired) = 68 sizeof(struct ofp_table_stats) = 52 sizeof(struct ofp_port_stats) = 28 --- 64 bits Linux --- offsetof(struct ofp_switch_features, ports) = 44 offsetof(struct ofp_packet_in, data) = 18 offsetof(struct ofp_packet_out, u) = 16 offsetof(struct ofp_flow_mod, actions) = 60 offsetof(struct ofp_error_msg, data) = 12 offsetof(struct ofp_stats_request, body) = 12 offsetof(struct ofp_stats_reply, body) = 12 offsetof(struct ofp_flow_stats, actions) = 68 sizeof(struct ofp_phy_port) = 36 sizeof(struct ofp_port_status) = 48 sizeof(struct ofp_port_mod) = 44 sizeof(struct ofp_action) = 12 sizeof(struct ofp_match) = 36 sizeof(struct ofp_flow_expired) = 72 sizeof(struct ofp_table_stats) = 56 sizeof(struct ofp_port_stats) = 32
_______________________________________________ nox-dev mailing list [email protected] http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
