Re: [vpp-dev] cmake is on

2018-09-09 Thread Kingwel Xie
Many thx!

From: vpp-dev@lists.fd.io  On Behalf Of Damjan Marion via 
Lists.Fd.Io
Sent: Friday, September 07, 2018 4:30 PM
To: Damjan Marion 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] cmake is on


I just did it:

https://gerrit.fd.io/r/#/c/14711/


--
Damjan


On 7 Sep 2018, at 09:25, Damjan Marion via Lists.Fd.Io 
mailto:dmarion=me@lists.fd.io>> wrote:


Dear Kingwei,

That should be easy to fix. Can you just remove it and submit patch, so i can 
merge it?

Thanks,

--
Damjan


On 7 Sep 2018, at 02:39, Kingwel Xie 
mailto:kingwel@ericsson.com>> wrote:

Hi Damijan,

Thanks for the great job done. It is now much faster.

We noticed a difference between using cmake and automake in the latest code:

Vppinfra/qsort.c is included in vppinfra/CMakefile.txt but not in vppinfra.am, 
which creates a situation that cmake image would be linked to the qsort.c but 
automake linked to glibc.

The reason why we noticed is there is a buffer overrun bug in qsort.c that 
causes cli crashed occasionally.

Please comment how to fix. Personally I’d like to remove qsort.c, like before.

Regards,
Kingwel

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Damjan Marion 
via Lists.Fd.Io
Sent: Sunday, September 02, 2018 8:48 PM
To: vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: vpp-dev@lists.fd.io
Subject: [vpp-dev] cmake is on


Dear all,

We just switched from autotools to cmake and retired all autotools related 
files in src/.

All verify jobs are ok, and we also tried it on 3 different x86 and 2 different 
ARM Aarch64 machines.

Due to blast radius, i will not be surprised that some small issues pop out, 
but i don't expect anything hard to fix.

Let us know if you hit something...

PS As a part of this change, CentOS 7 build are now using devtoolset-7, so they 
are compiled with gcc-7, which also means images have support for Skylake 
Servers (AVX512).

--
Damjan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10420): https://lists.fd.io/g/vpp-dev/message/10420
Mute This Topic: https://lists.fd.io/mt/25155374/675642
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  
[dmar...@me.com]
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10421): https://lists.fd.io/g/vpp-dev/message/10421
Mute This Topic: https://lists.fd.io/mt/25155374/675642
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  
[dmar...@me.com]
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10449): https://lists.fd.io/g/vpp-dev/message/10449
Mute This Topic: https://lists.fd.io/mt/25155374/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] vl_api_sw_interface_dump problem

2018-09-09 Thread Damjan Marion via Lists.Fd.Io

Dear Emma, Chore,

Patch 14647 is not valid solution to the problem. DPDK_DEVICE_FLAG_ADMIN_UP is 
not valid hw interface flag.
From that code section, you can see that dpdk_update_link_state() function is 
called which is supposed to update link speed and duplex after link goes up.

Can you change LINK_STATE_ELOGS  in src/plugins/dpdk/device/init.c to 1, 
recompile vpp and capture link state events with "show event-logger" after 
problem happens?

-- 
Damjan

> On 9 Sep 2018, at 08:50, emma sdi  wrote:
> 
> Dear community
> 
> I have the same problem, and commit this suggestion in 
> https://gerrit.fd.io/r/#/c/14647/ .
> Please someone review this code, it seems OK to me.
> 
> Cheers,
> Khers
> 
> On Mon, Sep 3, 2018 at 12:18 PM sadjad  > wrote:
> Hi Dear VPP
> I tried to solve this problem. so i changed device.c in dpdk plugin as you 
> can see below:
> 
> On branch stable/1807
> Your branch is up-to-date with 'origin/stable/1807'.
> Changes not staged for commit:
> 
> modified:   src/plugins/dpdk/device/device.c
> 
> diff --git a/src/plugins/dpdk/device/device.c 
> b/src/plugins/dpdk/device/device.c
> index d5ab2585..159a395e 100644
> --- a/src/plugins/dpdk/device/device.c
> +++ b/src/plugins/dpdk/device/device.c
> @@ -547,11 +547,12 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 
> hw_if_index, u32 flags)
>  
>if (xd->flags & DPDK_DEVICE_FLAG_PMD_INIT_FAIL)
>  return clib_error_return (0, "Interface not initialized");
> -
> +  u32 hw_flags = hif->flags;
>if (is_up)
>  {
> + hw_flags |= DPDK_DEVICE_FLAG_ADMIN_UP;
>vnet_hw_interface_set_flags (vnm, xd->hw_if_index,
> -  VNET_HW_INTERFACE_FLAG_LINK_UP);
> +  hw_flags);
>if ((xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) == 0)
> dpdk_device_start (xd);
>xd->flags |= DPDK_DEVICE_FLAG_ADMIN_UP;
> @@ -561,7 +562,8 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 
> hw_if_index, u32 flags)
>  }
>else
>  {
> -  vnet_hw_interface_set_flags (vnm, xd->hw_if_index, 0);
> + hw_flags &= ~DPDK_DEVICE_FLAG_ADMIN_UP;
> +  vnet_hw_interface_set_flags (vnm, xd->hw_if_index, hw_flags);
>if ((xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) != 0)
> dpdk_device_stop (xd);
>xd->flags &= ~DPDK_DEVICE_FLAG_ADMIN_UP;
> 
> and problem is fixed. what is your idea?
> 
> Best Regards
> 
> On Mon, Sep 3, 2018 at 5:54 AM chore  > wrote:
> Hi Dear VPP
> I wrote a small api client like vpp_api_test that contains sw_interface_dump 
> api. when i was trying to use this api client i faced a problem in 
> "stable/1807".
> At first i disconnected one of my links and my api client printed below 
> output:
>  
> GigabitEthernet0/9/0 duplex half speed 0
> admin: down
> link: down
> 
> Then i connected the link and got this:
> 
> GigabitEthernet0/9/0 duplex full speed 1000
> admin: down
> link: down
> 
> At the end i changed admin status of link and saw below output: 
> 
> GigabitEthernet0/9/0 duplex bogus speed 0
> admin: up
> link: up
> 
> and show hardware-interface GigabitEthernet0/9/0:
>   NameIdx   Link  Hardware
> GigabitEthernet0/9/0   2 up   GigabitEthernet0/9/0
>   Ethernet address 08:00:27:94:50:ba
>   Intel 82540EM (e1000)
> carrier up full duplex speed 1000 mtu 9202
> flags: admin-up pmd maybe-multiseg tx-offload intel-phdr-cksum
> rx queues 1, rx desc 1024, tx queues 1, tx desc 1024
> cpu socket 0
> 
> based on last results, it seems to be a problem in vl_api_sw_interface_dump.
> If I want to describe this problem more, I have to say that 'duplex' and 
> 'speed' api returned values are wrong. however you can see correct values in  
> "show hardware-interface" cli output.
> 
> In addition, GDB output shows that both 'speed' and 'duplex' are zero in 
> replied mp.
> 
> Breakpoint 1, vl_api_sw_interface_details_t_handler (mp=0x3005eabc) at 
> interface-api.c:24
> 24  int speed = 0;
> (gdb) p *mp
> $2 = {_vl_msg_id = 21504, context = 0, sw_if_index = 33554432, 
> sup_sw_if_index = 33554432, l2_address_length = 100663296, l2_address = 
> "\b\000'\224P\272\000", 
>   interface_name = "GigabitEthernet0/9/0", '\000' , 
> admin_up_down = 1 '\001', link_up_down = 1 '\001', link_duplex = 0 '\000', 
>   link_speed = 0 '\000', link_mtu = 61987, mtu = {673382400, 0, 0, 0}, sub_id 
> = 0, sub_dot1ad = 0 '\000', sub_dot1ah = 0 '\000', sub_number_of_tags = 0 
> '\000', 
>   sub_outer_vlan_id = 0, sub_inner_vlan_id = 0, sub_exact_match = 0 '\000', 
> sub_default = 0 '\000', sub_outer_vlan_id_any = 0 '\000', 
>   sub_inner_vlan_id_any = 0 '\000', vtr_op = 0, vtr_push_dot1q = 0, vtr_tag1 
> = 0, vtr_tag2 = 0, tag = '\000' , outer_tag = 0, 
>   b_dmac = "\000\000\000\000\000", b_smac = "\000\000\000\000\000", b_vlanid 
> = 0, i_sid = 0}
> 
> 
> 

[vpp-dev] hqos configuration in vpp (Connection refused)

2018-09-09 Thread Reza Mirzaei
Hi 

I want to config vpp in a way that it can use hqos according to this
tutorial [1], but when i set hqos feature for an interface in
/etc/vpp/starttup.conf and then restart vpp service, it's not clear for
me that why vpp service can not be started. can anyone help me to solve
this problem? 

My modifications on /etc/vpp/startup.conf are as follows: 

 ... 

 cpu { 

 main-core 0
  corelist-workers 1, 2
  corelist-hqos-threads 3
 } 

 dpdk { 

 socket-mem 2048,2048 

 dev :0b:00.0 {
  num-rx-queues 2 hqos
  } 

 num-mbufs 100 

 } 

... 

Output of _VPPCTL_ command after _SERVICE VPP RESTART_: 

   clib_socket_init: connect (fd 3, '/run/vpp/cli.sock'):
Connection refused 

Best regards 

Reza 

Links:
--
[1] https://docs.fd.io/vpp/16.12/qos_doc.html
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10447): https://lists.fd.io/g/vpp-dev/message/10447
Mute This Topic: https://lists.fd.io/mt/25396306/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] vl_api_sw_interface_dump problem

2018-09-09 Thread emma sdi
Dear community

I have the same problem, and commit this suggestion in
https://gerrit.fd.io/r/#/c/14647/.
Please someone review this code, it seems OK to me.

Cheers,
Khers

On Mon, Sep 3, 2018 at 12:18 PM sadjad  wrote:

> Hi Dear VPP
> I tried to solve this problem. so i changed device.c in dpdk plugin as you
> can see below:
>
> On branch stable/1807
> Your branch is up-to-date with 'origin/stable/1807'.
> Changes not staged for commit:
>
> modified:   src/plugins/dpdk/device/device.c
>
> diff --git a/src/plugins/dpdk/device/device.c
> b/src/plugins/dpdk/device/device.c
> index d5ab2585..159a395e 100644
> --- a/src/plugins/dpdk/device/device.c
> +++ b/src/plugins/dpdk/device/device.c
> @@ -547,11 +547,12 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32
> hw_if_index, u32 flags)
>
>if (xd->flags & DPDK_DEVICE_FLAG_PMD_INIT_FAIL)
>  return clib_error_return (0, "Interface not initialized");
> -
> +  u32 hw_flags = hif->flags;
>if (is_up)
>  {
> + hw_flags |= DPDK_DEVICE_FLAG_ADMIN_UP;
>vnet_hw_interface_set_flags (vnm, xd->hw_if_index,
> -  VNET_HW_INTERFACE_FLAG_LINK_UP);
> +  hw_flags);
>if ((xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) == 0)
> dpdk_device_start (xd);
>xd->flags |= DPDK_DEVICE_FLAG_ADMIN_UP;
> @@ -561,7 +562,8 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32
> hw_if_index, u32 flags)
>  }
>else
>  {
> -  vnet_hw_interface_set_flags (vnm, xd->hw_if_index, 0);
> + hw_flags &= ~DPDK_DEVICE_FLAG_ADMIN_UP;
> +  vnet_hw_interface_set_flags (vnm, xd->hw_if_index, hw_flags);
>if ((xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) != 0)
> dpdk_device_stop (xd);
>xd->flags &= ~DPDK_DEVICE_FLAG_ADMIN_UP;
>
> and problem is fixed. what is your idea?
>
> Best Regards
>
> On Mon, Sep 3, 2018 at 5:54 AM chore  wrote:
>
>> Hi Dear VPP
>> I wrote a small api client like vpp_api_test that contains
>> sw_interface_dump api. when i was trying to use this api client i faced a
>> problem in "stable/1807".
>> At first i disconnected one of my links and my api client printed below
>> output:
>>
>> GigabitEthernet0/9/0 duplex half speed 0
>> admin: down
>> link: down
>>
>> Then i connected the link and got this:
>>
>> GigabitEthernet0/9/0 duplex full speed 1000
>> admin: down
>> link: down
>>
>> At the end i changed admin status of link and saw below output:
>>
>> GigabitEthernet0/9/0 duplex bogus speed 0
>> admin: up
>> link: up
>>
>> and show hardware-interface GigabitEthernet0/9/0:
>>   NameIdx   Link  Hardware
>> GigabitEthernet0/9/0   2 up   GigabitEthernet0/9/0
>>   Ethernet address 08:00:27:94:50:ba
>>   Intel 82540EM (e1000)
>> carrier up full duplex speed 1000 mtu 9202
>> flags: admin-up pmd maybe-multiseg tx-offload intel-phdr-cksum
>> rx queues 1, rx desc 1024, tx queues 1, tx desc 1024
>> cpu socket 0
>>
>> based on last results, it seems to be a problem in
>> vl_api_sw_interface_dump.
>> If I want to describe this problem more, I have to say that 'duplex' and
>> 'speed' api returned values are wrong. however you can see correct values
>> in  "show hardware-interface" cli output.
>>
>> In addition, GDB output shows that both 'speed' and 'duplex' are zero in
>> replied mp.
>>
>> Breakpoint 1, vl_api_sw_interface_details_t_handler (mp=0x3005eabc) at
>> interface-api.c:24
>> 24  int speed = 0;
>> (gdb) p *mp
>> $2 = {_vl_msg_id = 21504, context = 0, sw_if_index = 33554432,
>> sup_sw_if_index = 33554432, l2_address_length = 100663296, l2_address =
>> "\b\000'\224P\272\000",
>>   interface_name = "GigabitEthernet0/9/0", '\000' ,
>> admin_up_down = 1 '\001', link_up_down = 1 '\001', link_duplex = 0 '\000',
>>   link_speed = 0 '\000', link_mtu = 61987, mtu = {673382400, 0, 0, 0},
>> sub_id = 0, sub_dot1ad = 0 '\000', sub_dot1ah = 0 '\000',
>> sub_number_of_tags = 0 '\000',
>>   sub_outer_vlan_id = 0, sub_inner_vlan_id = 0, sub_exact_match = 0
>> '\000', sub_default = 0 '\000', sub_outer_vlan_id_any = 0 '\000',
>>   sub_inner_vlan_id_any = 0 '\000', vtr_op = 0, vtr_push_dot1q = 0,
>> vtr_tag1 = 0, vtr_tag2 = 0, tag = '\000' , outer_tag = 0,
>>   b_dmac = "\000\000\000\000\000", b_smac = "\000\000\000\000\000",
>> b_vlanid = 0, i_sid = 0}
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#10342): https://lists.fd.io/g/vpp-dev/message/10342
> Mute This Topic: https://lists.fd.io/mt/25162112/675776
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [s3m2e1.6s...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10446): https://lists.fd.io/g/vpp-dev/message/10446
Mute This Topic: https://lists.fd.io/mt/25162112/21656
Group Owner: vpp-dev+ow...@lists.fd.io