netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] openvswitch: Reset key metadata for packet execution.
@ 2015-02-10 21:35 Pravin B Shelar
  2015-02-11 22:40 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Pravin B Shelar @ 2015-02-10 21:35 UTC (permalink / raw)
  To: davem; +Cc: netdev, Pravin B Shelar

Userspace packet execute command pass down flow key for given
packet. But userspace can skip some parameter with zero value.
Therefore kernel needs to initialize key metadata to zero.

Fixes: 0714812134 ("openvswitch: Eliminate memset() from flow_extract.")
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 net/openvswitch/flow.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index da2fae0..5e41bf2 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -717,6 +717,8 @@ int ovs_flow_key_extract_userspace(const struct nlattr *attr,
 {
 	int err;
 
+ 	memset(key, 0, OVS_SW_FLOW_KEY_METADATA_SIZE);
+
 	/* Extract metadata from netlink attributes. */
 	err = ovs_nla_get_flow_metadata(attr, key, log);
 	if (err)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] openvswitch: Reset key metadata for packet execution.
  2015-02-10 21:35 [PATCH net] openvswitch: Reset key metadata for packet execution Pravin B Shelar
@ 2015-02-11 22:40 ` David Miller
  2015-02-11 22:57   ` Pravin Shelar
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2015-02-11 22:40 UTC (permalink / raw)
  To: pshelar; +Cc: netdev

From: Pravin B Shelar <pshelar@nicira.com>
Date: Tue, 10 Feb 2015 13:35:16 -0800

> Userspace packet execute command pass down flow key for given
> packet. But userspace can skip some parameter with zero value.
> Therefore kernel needs to initialize key metadata to zero.
> 
> Fixes: 0714812134 ("openvswitch: Eliminate memset() from flow_extract.")
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Applied, but...

> + 	memset(key, 0, OVS_SW_FLOW_KEY_METADATA_SIZE);

There's a space before the TAB in that indentation, and git even
warns about this when applying patches.

I fixed it up, but this is one of the basic things you should be
dealing with before submitting your changes.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] openvswitch: Reset key metadata for packet execution.
  2015-02-11 22:40 ` David Miller
@ 2015-02-11 22:57   ` Pravin Shelar
  0 siblings, 0 replies; 3+ messages in thread
From: Pravin Shelar @ 2015-02-11 22:57 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On Wed, Feb 11, 2015 at 2:40 PM, David Miller <davem@davemloft.net> wrote:
> From: Pravin B Shelar <pshelar@nicira.com>
> Date: Tue, 10 Feb 2015 13:35:16 -0800
>
>> Userspace packet execute command pass down flow key for given
>> packet. But userspace can skip some parameter with zero value.
>> Therefore kernel needs to initialize key metadata to zero.
>>
>> Fixes: 0714812134 ("openvswitch: Eliminate memset() from flow_extract.")
>> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
>
> Applied, but...
>
>> +     memset(key, 0, OVS_SW_FLOW_KEY_METADATA_SIZE);
>
> There's a space before the TAB in that indentation, and git even
> warns about this when applying patches.
>
> I fixed it up, but this is one of the basic things you should be
> dealing with before submitting your changes.
>

Thanks for fixing the patch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-11 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 21:35 [PATCH net] openvswitch: Reset key metadata for packet execution Pravin B Shelar
2015-02-11 22:40 ` David Miller
2015-02-11 22:57   ` Pravin Shelar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).