datapath: Avoid useless holes in struct vport
authorThomas Graf <tgraf@suug.ch>
Tue, 4 Dec 2012 17:39:13 +0000 (09:39 -0800)
committerJesse Gross <jesse@nicira.com>
Tue, 4 Dec 2012 18:08:31 +0000 (10:08 -0800)
Having the 16bit port_no in between a set of pointers creates
an unwanted and useless hole in the struct.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/vport.h

index 5a7caf5..de65000 100644 (file)
@@ -74,7 +74,6 @@ struct vport_err_stats {
 /**
  * struct vport - one port within a datapath
  * @rcu: RCU callback head for deferred destruction.
- * @port_no: Index into @dp's @ports array.
  * @dp: Datapath to which this port belongs.
  * @kobj: Represents /sys/class/net/<devname>/brport.
  * @linkname: The name of the link from /sys/class/net/<datapath>/brif to this
@@ -82,6 +81,7 @@ struct vport_err_stats {
  * device gets renamed.)  Set to the null string when no link exists.
  * @upcall_pid: The Netlink port to use for packets received on this port that
  * miss the flow table.
+ * @port_no: Index into @dp's @ports array.
  * @hash_node: Element in @dev_table hash table in vport.c.
  * @dp_hash_node: Element in @datapath->ports hash table in datapath.c.
  * @ops: Class structure.
@@ -93,11 +93,11 @@ struct vport_err_stats {
  */
 struct vport {
        struct rcu_head rcu;
-       u16 port_no;
        struct datapath *dp;
        struct kobject kobj;
        char linkname[IFNAMSIZ];
        u32 upcall_pid;
+       u16 port_no;
 
        struct hlist_node hash_node;
        struct hlist_node dp_hash_node;