Patchwork [net-next] openvswitch: Avoid useless holes in struct vport

login
register
mail settings
Submitter Thomas Graf
Date Dec. 3, 2012, 10:24 p.m.
Message ID <20121203222432.GB14494@casper.infradead.org>
Download mbox | patch
Permalink /patch/203462/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Thomas Graf - Dec. 3, 2012, 10:24 p.m.
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>
---
 net/openvswitch/vport.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jesse Gross - Dec. 4, 2012, 6:11 p.m.
On Mon, Dec 3, 2012 at 2:24 PM, Thomas Graf <tgraf@suug.ch> wrote:
>
> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index 3f7961e..aee7d43 100644
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -68,10 +68,10 @@  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.
  * @upcall_portid: 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.
@@ -81,9 +81,9 @@  struct vport_err_stats {
  */
 struct vport {
 	struct rcu_head rcu;
-	u16 port_no;
 	struct datapath	*dp;
 	u32 upcall_portid;
+	u16 port_no;
 
 	struct hlist_node hash_node;
 	struct hlist_node dp_hash_node;