提交 03599c94 编写于 作者: T Thomas Graf 提交者: Jesse Gross

openvswitch: Avoid useless holes in struct vport

Having the 16bit port_no in between a set of pointers creates
an unwanted and useless hole in the struct.
Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NJesse Gross <jesse@nicira.com>
上级 9151991c
...@@ -68,10 +68,10 @@ struct vport_err_stats { ...@@ -68,10 +68,10 @@ struct vport_err_stats {
/** /**
* struct vport - one port within a datapath * struct vport - one port within a datapath
* @rcu: RCU callback head for deferred destruction. * @rcu: RCU callback head for deferred destruction.
* @port_no: Index into @dp's @ports array.
* @dp: Datapath to which this port belongs. * @dp: Datapath to which this port belongs.
* @upcall_portid: The Netlink port to use for packets received on this port that * @upcall_portid: The Netlink port to use for packets received on this port that
* miss the flow table. * miss the flow table.
* @port_no: Index into @dp's @ports array.
* @hash_node: Element in @dev_table hash table in vport.c. * @hash_node: Element in @dev_table hash table in vport.c.
* @dp_hash_node: Element in @datapath->ports hash table in datapath.c. * @dp_hash_node: Element in @datapath->ports hash table in datapath.c.
* @ops: Class structure. * @ops: Class structure.
...@@ -81,9 +81,9 @@ struct vport_err_stats { ...@@ -81,9 +81,9 @@ struct vport_err_stats {
*/ */
struct vport { struct vport {
struct rcu_head rcu; struct rcu_head rcu;
u16 port_no;
struct datapath *dp; struct datapath *dp;
u32 upcall_portid; u32 upcall_portid;
u16 port_no;
struct hlist_node hash_node; struct hlist_node hash_node;
struct hlist_node dp_hash_node; struct hlist_node dp_hash_node;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册