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

2016-09-30 Thread Ilya Maximets
On 30.09.2016 16:36, Aaron Conole wrote:
> Ilya Maximets  writes:
> 
>> Double word removed. Error message rewritten to avoid breaking of the
>> user-visible string.
>>
>> CC: Mark Kavanagh 
>> Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
>> Signed-off-by: Ilya Maximets 
>> ---
>>  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 *,
> 
> 
> 
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


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

2016-09-30 Thread Aaron Conole
Ilya Maximets  writes:

> Double word removed. Error message rewritten to avoid breaking of the
> user-visible string.
>
> CC: Mark Kavanagh 
> Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
> Signed-off-by: Ilya Maximets 
> ---
>  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 *,
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev


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

2016-09-30 Thread Kavanagh, Mark B
>
>Double word removed. Error message rewritten to avoid breaking of the
>user-visible string.
>
>CC: Mark Kavanagh 
>Fixes: 58be5c0eecf3 ("netdev-dpdk: Fix coding style")
>Signed-off-by: Ilya Maximets 
>---
> 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  

> }
>
> free(ovsrcu_get_protected(struct ingress_policer *,
>--
>2.7.4

___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev