Re: [ovs-dev] [PATCH 1/3] dpif-netlink-rtnl: Tidy up some code.

2017-05-23 Thread Joe Stringer
On 22 May 2017 at 10:36, Eric Garver  wrote:
> On Fri, May 19, 2017 at 01:27:34PM -0700, Joe Stringer wrote:
>> Simplify and refactor a couple of bits of code for improved readability.
>>
>> Signed-off-by: Joe Stringer 
>> ---
>>  lib/dpif-netlink-rtnl.c | 20 ++--
>>  1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
>> index 7faad5248037..0ca6529e9d82 100644
>> --- a/lib/dpif-netlink-rtnl.c
>> +++ b/lib/dpif-netlink-rtnl.c
>> @@ -1,5 +1,6 @@
>>  /*
>>   * Copyright (c) 2017 Red Hat, Inc.
>> + * Copyright (c) 2017 Nicira, Inc.
>>   *
>>   * Licensed under the Apache License, Version 2.0 (the "License");
>>   * you may not use this file except in compliance with the License.
>> @@ -369,17 +370,16 @@ dpif_netlink_rtnl_port_create(struct netdev *netdev)
>>  err = dpif_netlink_rtnl_verify(tnl_cfg, type, name);
>>  if (!err) {
>>  return 0;
>> -} else {
>> -err = dpif_netlink_rtnl_destroy(name);
>> -if (err) {
>> -static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 
>> 5);
>> -
>> -VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
>> - "deleted: %s", name, ovs_strerror(err));
>> -return err;
>> -}
>> -err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, 
>> flags);
>>  }
>> +err = dpif_netlink_rtnl_destroy(name);
>> +if (err) {
>> +static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
>> +
>> +VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
>> + "deleted: %s", name, ovs_strerror(err));
>> +return err;
>> +}
>> +err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
>>  }
>>  if (err) {
>>  return err;
>> --
>> 2.11.1
>>
>
> Acked-by: Eric Garver 

Thanks, applied to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/3] dpif-netlink-rtnl: Tidy up some code.

2017-05-22 Thread Joe Stringer
On 19 May 2017 at 15:47, Greg Rose  wrote:
> On Fri, 2017-05-19 at 13:27 -0700, Joe Stringer wrote:
>> Simplify and refactor a couple of bits of code for improved readability.
>>
>> Signed-off-by: Joe Stringer 
>> ---
>>  lib/dpif-netlink-rtnl.c | 20 ++--
>>  1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
>> index 7faad5248037..0ca6529e9d82 100644
>> --- a/lib/dpif-netlink-rtnl.c
>> +++ b/lib/dpif-netlink-rtnl.c
>> @@ -1,5 +1,6 @@
>>  /*
>>   * Copyright (c) 2017 Red Hat, Inc.
>> + * Copyright (c) 2017 Nicira, Inc.
>
> ???
>
> The patch itself looks fine but changing a copyright seems strange.

Thanks for the reviews.

While reviewing the earlier revisions of the series, I collected a
bunch of changes, some that I submitted as suggestions which ended up
folded into the merged series, and some which I figured I could just
submit later so that we didn't have to keep going back and forth on
the series. Looks like this hunk was brought in when I rebased my
changes.

Fair enough though, there's nothing particularly interesting about
this particular patch that would warrant this. I can skip it.

- Joe
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/3] dpif-netlink-rtnl: Tidy up some code.

2017-05-22 Thread Eric Garver
On Fri, May 19, 2017 at 01:27:34PM -0700, Joe Stringer wrote:
> Simplify and refactor a couple of bits of code for improved readability.
> 
> Signed-off-by: Joe Stringer 
> ---
>  lib/dpif-netlink-rtnl.c | 20 ++--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
> index 7faad5248037..0ca6529e9d82 100644
> --- a/lib/dpif-netlink-rtnl.c
> +++ b/lib/dpif-netlink-rtnl.c
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright (c) 2017 Red Hat, Inc.
> + * Copyright (c) 2017 Nicira, Inc.
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
> @@ -369,17 +370,16 @@ dpif_netlink_rtnl_port_create(struct netdev *netdev)
>  err = dpif_netlink_rtnl_verify(tnl_cfg, type, name);
>  if (!err) {
>  return 0;
> -} else {
> -err = dpif_netlink_rtnl_destroy(name);
> -if (err) {
> -static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 
> 5);
> -
> -VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
> - "deleted: %s", name, ovs_strerror(err));
> -return err;
> -}
> -err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
>  }
> +err = dpif_netlink_rtnl_destroy(name);
> +if (err) {
> +static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
> +
> +VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
> + "deleted: %s", name, ovs_strerror(err));
> +return err;
> +}
> +err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
>  }
>  if (err) {
>  return err;
> -- 
> 2.11.1
> 

Acked-by: Eric Garver 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/3] dpif-netlink-rtnl: Tidy up some code.

2017-05-19 Thread Greg Rose
On Fri, 2017-05-19 at 13:27 -0700, Joe Stringer wrote:
> Simplify and refactor a couple of bits of code for improved readability.
> 
> Signed-off-by: Joe Stringer 
> ---
>  lib/dpif-netlink-rtnl.c | 20 ++--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
> index 7faad5248037..0ca6529e9d82 100644
> --- a/lib/dpif-netlink-rtnl.c
> +++ b/lib/dpif-netlink-rtnl.c
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright (c) 2017 Red Hat, Inc.
> + * Copyright (c) 2017 Nicira, Inc.

???

The patch itself looks fine but changing a copyright seems strange.

- Greg

>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
> @@ -369,17 +370,16 @@ dpif_netlink_rtnl_port_create(struct netdev *netdev)
>  err = dpif_netlink_rtnl_verify(tnl_cfg, type, name);
>  if (!err) {
>  return 0;
> -} else {
> -err = dpif_netlink_rtnl_destroy(name);
> -if (err) {
> -static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 
> 5);
> -
> -VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
> - "deleted: %s", name, ovs_strerror(err));
> -return err;
> -}
> -err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
>  }
> +err = dpif_netlink_rtnl_destroy(name);
> +if (err) {
> +static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
> +
> +VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
> + "deleted: %s", name, ovs_strerror(err));
> +return err;
> +}
> +err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
>  }
>  if (err) {
>  return err;



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/3] dpif-netlink-rtnl: Tidy up some code.

2017-05-19 Thread Joe Stringer
Simplify and refactor a couple of bits of code for improved readability.

Signed-off-by: Joe Stringer 
---
 lib/dpif-netlink-rtnl.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
index 7faad5248037..0ca6529e9d82 100644
--- a/lib/dpif-netlink-rtnl.c
+++ b/lib/dpif-netlink-rtnl.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017 Red Hat, Inc.
+ * Copyright (c) 2017 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -369,17 +370,16 @@ dpif_netlink_rtnl_port_create(struct netdev *netdev)
 err = dpif_netlink_rtnl_verify(tnl_cfg, type, name);
 if (!err) {
 return 0;
-} else {
-err = dpif_netlink_rtnl_destroy(name);
-if (err) {
-static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
-
-VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
- "deleted: %s", name, ovs_strerror(err));
-return err;
-}
-err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
 }
+err = dpif_netlink_rtnl_destroy(name);
+if (err) {
+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+
+VLOG_WARN_RL(, "RTNL device %s exists and cannot be "
+ "deleted: %s", name, ovs_strerror(err));
+return err;
+}
+err = dpif_netlink_rtnl_create(tnl_cfg, name, type, kind, flags);
 }
 if (err) {
 return err;
-- 
2.11.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev