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 <skarim...@gmail.com> 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 <s3m2e1.6s...@gmail.com> 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: >> Name Idx 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' <repeats 43 times>, >> 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' <repeats 63 times>, 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 Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-