Re: [PATCH net-next 2/4] openvswitch: Simplify interface ovs_flow_metadata_from_nlattrs()
From: Pravin Shelar <hidden>
Date: 2013-06-13 16:13:22
On Wed, Jun 12, 2013 at 7:52 PM, Jesse Gross [off-list ref] wrote:
On Wed, Jun 12, 2013 at 3:57 PM, Pravin B Shelar [off-list ref] wrote:quoted
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index b15321a..150f181 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c@@ -1122,10 +1122,9 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp, /** * ovs_flow_metadata_from_nlattrs - parses Netlink attributes into a flow key. - * @priority: receives the skb priority - * @mark: receives the skb mark - * @in_port: receives the extracted input port. - * @key: Netlink attribute holding nested %OVS_KEY_ATTR_* Netlink attribute + * @flow: Receives extracted in_port, priority, tun_key and skb_mark. + * @key_len: Length of key in @flow. Used for calculating flow hash. + * @attr: Netlink attribute holding nested %OVS_KEY_ATTR_* Netlink attribute * sequence. * * This parses a series of Netlink attributes that form a flow key, which must@@ -1133,15 +1132,15 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp, * get the metadata, that is, the parts of the flow key that cannot be * extracted from the packet itself. */ -int ovs_flow_metadata_from_nlattrs(u32 *priority, u32 *mark, u16 *in_port, - const struct nlattr *attr) +int ovs_flow_metadata_from_nlattrs(struct sw_flow *flow, int key_len, + const struct nlattr *attr)It looks like key_len isn't actually used in this function. Is there another piece that you meant to include?
right, It is not required in this patch. will send updated patch.