[ovs-dev] [PATCH 3/3] lib/netdev-dpdk: increase ring name length for dpdkr ports

Daniele Di Proietto diproiettod at vmware.com
Tue Feb 23 18:08:11 UTC 2016


Apologies for the delay and thanks for the patch and the review!

I applied this to master

On 25/01/2016 07:43, "dev on behalf of Aaron Conole"
<dev-bounces at openvswitch.org on behalf of aconole at redhat.com> wrote:

>Mauricio Vasquez B <mauricio.vasquezbernal at studenti.polito.it> writes:
>> A ring name length of 10 characters is not enough for dpdkr ports
>> starting from dpdkr10, then it is increased to RTE_RING_NAMESIZE
>> characters.
>>
>> Signed-off-by: Mauricio Vasquez B
>><mauricio.vasquezbernal at studenti.polito.it>
>> ---
>>  lib/netdev-dpdk.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>> index ac81f2f..7caa70c 100644
>> --- a/lib/netdev-dpdk.c
>> +++ b/lib/netdev-dpdk.c
>> @@ -1939,7 +1939,7 @@ dpdk_ring_create(const char dev_name[], unsigned
>>int port_no,
>>                   unsigned int *eth_port_id)
>>  {
>>      struct dpdk_ring *ivshmem;
>> -    char ring_name[10];
>> +    char ring_name[RTE_RING_NAMESIZE];
>>      int err;
>>  
>>      ivshmem = dpdk_rte_mzalloc(sizeof *ivshmem);
>> @@ -1948,7 +1948,7 @@ dpdk_ring_create(const char dev_name[], unsigned
>>int port_no,
>>      }
>>  
>>      /* XXX: Add support for multiquque ring. */
>> -    err = snprintf(ring_name, 10, "%s_tx", dev_name);
>> +    err = snprintf(ring_name, sizeof(ring_name), "%s_tx", dev_name);
>>      if (err < 0) {
>>          return -err;
>>      }
>> @@ -1961,7 +1961,7 @@ dpdk_ring_create(const char dev_name[], unsigned
>>int port_no,
>>          return ENOMEM;
>>      }
>>  
>> -    err = snprintf(ring_name, 10, "%s_rx", dev_name);
>> +    err = snprintf(ring_name, sizeof(ring_name), "%s_rx", dev_name);
>>      if (err < 0) {
>>          return -err;
>>      }
>
>LGTM.
>
>Acked-by: Aaron Conole <aconole at redhat.com>
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list