Skip to content

Commit

Permalink
lib/ofp: Consolidate some struct field orders
Browse files Browse the repository at this point in the history
Avoid "holes" in structs by moving "small" members together.

Signed-off-by: Helmut Schaa <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
helmut-jacob authored and blp committed Dec 13, 2013
1 parent ac0bdaa commit e082203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/ofp-actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ struct ofpact_learn {
uint16_t idle_timeout; /* Idle time before discarding (seconds). */
uint16_t hard_timeout; /* Max time before discarding (seconds). */
uint16_t priority; /* Priority level of flow entry. */
uint8_t table_id; /* Table to insert flow entry. */
uint64_t cookie; /* Cookie for new flow. */
enum ofputil_flow_mod_flags flags;
uint8_t table_id; /* Table to insert flow entry. */
uint16_t fin_idle_timeout; /* Idle timeout after FIN, if nonzero. */
uint16_t fin_hard_timeout; /* Hard timeout after FIN, if nonzero. */

Expand Down
8 changes: 4 additions & 4 deletions lib/ofp-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ struct ofputil_flow_stats {
struct match match;
ovs_be64 cookie;
uint8_t table_id;
uint32_t duration_sec;
uint32_t duration_nsec;
uint16_t priority;
uint16_t idle_timeout;
uint16_t hard_timeout;
uint32_t duration_sec;
uint32_t duration_nsec;
int idle_age; /* Seconds since last packet, -1 if unknown. */
int hard_age; /* Seconds since last change, -1 if unknown. */
uint64_t packet_count; /* Packet count, UINT64_MAX if unknown. */
Expand Down Expand Up @@ -359,8 +359,8 @@ enum ofperr ofputil_decode_aggregate_stats_reply(
/* Flow removed message, independent of protocol. */
struct ofputil_flow_removed {
struct match match;
uint16_t priority;
ovs_be64 cookie;
uint16_t priority;
uint8_t reason; /* One of OFPRR_*. */
uint8_t table_id; /* 255 if message didn't include table ID. */
uint32_t duration_sec;
Expand Down Expand Up @@ -770,9 +770,9 @@ struct ofputil_flow_update {
uint16_t idle_timeout;
uint16_t hard_timeout;
uint8_t table_id;
uint16_t priority;
ovs_be64 cookie;
struct match *match;
uint16_t priority;
struct ofpact *ofpacts;
size_t ofpacts_len;

Expand Down

0 comments on commit e082203

Please sign in to comment.