[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140320130426.GF16640@casper.infradead.org>
Date: Thu, 20 Mar 2014 13:04:26 +0000
From: Thomas Graf <tgraf@...g.ch>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, nhorman@...driver.com,
andy@...yhouse.net, dborkman@...hat.com, ogerlitz@...lanox.com,
jesse@...ira.com, pshelar@...ira.com, azhou@...ira.com,
ben@...adent.org.uk, stephen@...workplumber.org,
jeffrey.t.kirsher@...el.com, vyasevic@...hat.com,
xiyou.wangcong@...il.com, john.r.fastabend@...el.com,
edumazet@...gle.com
Subject: Re: [patch net-next RFC 1/4] openvswitch: split flow structures into
ovs specific and generic ones
On 03/19/14 at 04:33pm, Jiri Pirko wrote:
> After this, flow related structures can be used in other code.
LGTM. Definitely makes sense to share flow definition
between OVS and a possible HW switch API.
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> + /* Ethernet+IPv4 specific members. */
> + unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
> + unsigned char ar_sip[4]; /* sender IP address */
> + unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
> + unsigned char ar_tip[4]; /* target IP address */
> +} __packed;
>
> -struct sw_flow_mask {
> +struct ovs_flow_mask {
> int ref_count;
> struct rcu_head rcu;
Perhaps move rcu_head to the end if you are touching it anyway.
> struct list_head list;
> - struct sw_flow_key_range range;
> - struct sw_flow_key key;
> + struct sw_flow_mask mask;
> };
>
> -struct sw_flow_match {
> +struct ovs_flow_match {
> struct sw_flow_key *key;
> struct sw_flow_key_range range;
> struct sw_flow_mask *mask;
> @@ -163,36 +106,20 @@ struct sw_flow_stats {
> };
> };
>
> -struct sw_flow {
> +struct ovs_flow {
> struct rcu_head rcu;
Same here.
> struct hlist_node hash_node[2];
> u32 hash;
>
> - struct sw_flow_key key;
> - struct sw_flow_key unmasked_key;
> - struct sw_flow_mask *mask;
> + struct sw_flow flow;
> struct sw_flow_actions __rcu *sf_acts;
> struct sw_flow_stats stats;
> };
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists