diff mbox

[ovs-dev,2/2] netdev-dpdk: Fix issues introduced by recent style fix.

Message ID 1475218835-7867-3-git-send-email-i.maximets@samsung.com
State Rejected
Headers show

Commit Message

Ilya Maximets Sept. 30, 2016, 7 a.m. UTC
Double word removed. Error message rewritten to avoid breaking of the
user-visible string.

CC: Mark Kavanagh <mark.b.kavanagh@intel.com>
Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/netdev-dpdk.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Mark Kavanagh Sept. 30, 2016, 8:29 a.m. UTC | #1
>
>Double word removed. Error message rewritten to avoid breaking of the
>user-visible string.
>
>CC: Mark Kavanagh <mark.b.kavanagh@intel.com>
>Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
>Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>---
> lib/netdev-dpdk.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
>diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>index 3847b1f..6679f45 100644
>--- a/lib/netdev-dpdk.c
>+++ b/lib/netdev-dpdk.c
>@@ -495,7 +495,7 @@ dpdk_mp_get(int socket_id, int mtu)
>                               - sizeof(struct rte_mbuf);
>     /* XXX: this is a really rough method of provisioning memory.
>      * It's impossible to determine what the exact memory requirements are when
>-     * when the number of ports and rxqs that utilize a particular mempool can
>+     * the number of ports and rxqs that utilize a particular mempool can

Thanks for the catch.

>      * change dynamically at runtime. For now, use this rough heurisitic.
>      */
>     if (mtu >= ETHER_MTU) {
>@@ -1024,8 +1024,9 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
>         && !(dev->vhost_driver_flags & RTE_VHOST_USER_CLIENT)) {
>         VLOG_ERR("Removing port '%s' while vhost device still attached.",
>                  netdev->name);
>-        VLOG_ERR("To restore connectivity after re-adding of port, VM on "
>-                 "socket '%s' must be restarted.", dev->vhost_id);
>+        VLOG_ERR("Restart the VM on socket '%s"
>+                 "' to restore connectivity after re-adding of port",
>+                 dev->vhost_id);

Thanks for documenting this in the coding style doc. It's clear now how logs should be formatted across multiple lines.

Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com> 

>     }
>
>     free(ovsrcu_get_protected(struct ingress_policer *,
>--
>2.7.4
Aaron Conole Sept. 30, 2016, 1:36 p.m. UTC | #2
Ilya Maximets <i.maximets@samsung.com> writes:

> Double word removed. Error message rewritten to avoid breaking of the
> user-visible string.
>
> CC: Mark Kavanagh <mark.b.kavanagh@intel.com>
> Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  lib/netdev-dpdk.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 3847b1f..6679f45 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -495,7 +495,7 @@ dpdk_mp_get(int socket_id, int mtu)
>                                - sizeof(struct rte_mbuf);
>      /* XXX: this is a really rough method of provisioning memory.
>       * It's impossible to determine what the exact memory requirements are when
> -     * when the number of ports and rxqs that utilize a particular mempool can
> +     * the number of ports and rxqs that utilize a particular mempool can
>       * change dynamically at runtime. For now, use this rough heurisitic.
>       */
>      if (mtu >= ETHER_MTU) {
> @@ -1024,8 +1024,9 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
>          && !(dev->vhost_driver_flags & RTE_VHOST_USER_CLIENT)) {
>          VLOG_ERR("Removing port '%s' while vhost device still attached.",
>                   netdev->name);
> -        VLOG_ERR("To restore connectivity after re-adding of port, VM on "
> -                 "socket '%s' must be restarted.", dev->vhost_id);
> +        VLOG_ERR("Restart the VM on socket '%s"
> +                 "' to restore connectivity after re-adding of port",
> +                 dev->vhost_id);

Sorry, I might have misunderstood - you write not to break up log
messages in 1/1.  Here, it looks like the log message is still broken
up?  Did I fail to grok the intention?

>      }
>  
>      free(ovsrcu_get_protected(struct ingress_policer *,
Ilya Maximets Sept. 30, 2016, 1:40 p.m. UTC | #3
On 30.09.2016 16:36, Aaron Conole wrote:
> Ilya Maximets <i.maximets@samsung.com> writes:
> 
>> Double word removed. Error message rewritten to avoid breaking of the
>> user-visible string.
>>
>> CC: Mark Kavanagh <mark.b.kavanagh@intel.com>
>> Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
>>  lib/netdev-dpdk.c | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>> index 3847b1f..6679f45 100644
>> --- a/lib/netdev-dpdk.c
>> +++ b/lib/netdev-dpdk.c
>> @@ -495,7 +495,7 @@ dpdk_mp_get(int socket_id, int mtu)
>>                                - sizeof(struct rte_mbuf);
>>      /* XXX: this is a really rough method of provisioning memory.
>>       * It's impossible to determine what the exact memory requirements are when
>> -     * when the number of ports and rxqs that utilize a particular mempool can
>> +     * the number of ports and rxqs that utilize a particular mempool can
>>       * change dynamically at runtime. For now, use this rough heurisitic.
>>       */
>>      if (mtu >= ETHER_MTU) {
>> @@ -1024,8 +1024,9 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
>>          && !(dev->vhost_driver_flags & RTE_VHOST_USER_CLIENT)) {
>>          VLOG_ERR("Removing port '%s' while vhost device still attached.",
>>                   netdev->name);
>> -        VLOG_ERR("To restore connectivity after re-adding of port, VM on "
>> -                 "socket '%s' must be restarted.", dev->vhost_id);
>> +        VLOG_ERR("Restart the VM on socket '%s"
>> +                 "' to restore connectivity after re-adding of port",
>> +                 dev->vhost_id);
> 
> Sorry, I might have misunderstood - you write not to break up log
> messages in 1/1.  Here, it looks like the log message is still broken
> up?  Did I fail to grok the intention?

It's safe here because line broken right after '%s' qualifier. This
doesn't break any 'grep'-ability.

> 
>>      }
>>  
>>      free(ovsrcu_get_protected(struct ingress_policer *,
> 
> 
>
diff mbox

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 3847b1f..6679f45 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -495,7 +495,7 @@  dpdk_mp_get(int socket_id, int mtu)
                               - sizeof(struct rte_mbuf);
     /* XXX: this is a really rough method of provisioning memory.
      * It's impossible to determine what the exact memory requirements are when
-     * when the number of ports and rxqs that utilize a particular mempool can
+     * the number of ports and rxqs that utilize a particular mempool can
      * change dynamically at runtime. For now, use this rough heurisitic.
      */
     if (mtu >= ETHER_MTU) {
@@ -1024,8 +1024,9 @@  netdev_dpdk_vhost_destruct(struct netdev *netdev)
         && !(dev->vhost_driver_flags & RTE_VHOST_USER_CLIENT)) {
         VLOG_ERR("Removing port '%s' while vhost device still attached.",
                  netdev->name);
-        VLOG_ERR("To restore connectivity after re-adding of port, VM on "
-                 "socket '%s' must be restarted.", dev->vhost_id);
+        VLOG_ERR("Restart the VM on socket '%s"
+                 "' to restore connectivity after re-adding of port",
+                 dev->vhost_id);
     }
 
     free(ovsrcu_get_protected(struct ingress_policer *,