I'm forwarding this to vpp-dev as I think this is a vpp/dpdk question more than 
a csit one.


--

Gabriel Ganne

________________________________
From: csit-dev-boun...@lists.fd.io <csit-dev-boun...@lists.fd.io> on behalf of 
adarsh m via csit-dev <csit-...@lists.fd.io>
Sent: Tuesday, January 30, 2018 2:42:46 PM
To: csit-...@lists.fd.io
Subject: Re: [csit-dev] adding interface to vpp


Hi,

I fixed the issue of adding the vendor_id and device_id in the init.c but still 
the interface is not showing in VPP.

Error after fixing :
-------------------------------------------------------------------------------------------
root1@root1-CN21UPSA:~$ sudo service vpp status
● vpp.service - vector packet processing engine
   Loaded: loaded (/lib/systemd/system/vpp.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Tue 2018-01-30 15:18:18 IST; 1min 34s ago
  Process: 12206 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, 
status=0/SUCCESS)
  Process: 12202 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
 Main PID: 12210 (vpp_main)
   CGroup: /system.slice/vpp.service
           └─12210 /usr/bin/vpp -c /etc/vpp/startup.conf

Jan 30 15:18:18 root1-CN21UPSA /usr/bin/vpp[12210]: load_one_plugin:63: Loaded 
plugin: /usr/lib/vpp_api_test_plugins/gtpu_test_plugin.so
Jan 30 15:18:18 root1-CN21UPSA /usr/bin/vpp[12210]: load_one_plugin:63: Loaded 
plugin: /usr/lib/vpp_api_test_plugins/ioam_pot_test_plugin.so
Jan 30 15:18:18 root1-CN21UPSA vpp[12210]: /usr/bin/vpp[12210]: 
dpdk_config:1243: EAL init args: -c 1 -n 4 --huge-dir /run/vpp/hugepages 
--file-prefix vpp -w 0000:0b:00.1 --master-lcore 0 --socket-mem 102
Jan 30 15:18:18 root1-CN21UPSA /usr/bin/vpp[12210]: dpdk_config:1243: EAL init 
args: -c 1 -n 4 --huge-dir /run/vpp/hugepages --file-prefix vpp -w 0000:0b:00.1 
--master-lcore 0 --socket-mem 1024
Jan 30 15:18:18 root1-CN21UPSA vpp[12210]: EAL: No free hugepages reported in 
hugepages-1048576kB
Jan 30 15:18:18 root1-CN21UPSA vpp[12210]: EAL: VFIO support initialized
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: EAL: VFIO support initialized
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: unix_physmem_region_iommu_register: 
ioctl (VFIO_IOMMU_MAP_DMA): Invalid argument
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: dpdk_ipsec_process:1011: not enough 
DPDK crypto resources, default to OpenSSL
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: dpdk_lib_init:221: DPDK drivers 
found no ports...

root1@root1-CN21UPSA:~$ sudo vppctl show interface
              Name               Idx       State          Counter          Count
local0                            0        down
root1@root1-CN21UPSA:~$

-----------------------------------------------------------------------------------------------

As per 
http://dpdk.org/doc/quick-start<https://url10.mailanyone.net/v1/?m=1egWLQ-000701-48&i=57e1b682&c=cckSGLX9KmlphpV41DeLDjX2V8iiFwMWxZm8jQW1OEfJB-YViEknutg81oP5YjkH5Tho1sO1iW9NLaJwmNimgJTyvQ7E-qP_XVDEgWsbyAGHOVxtNp1tBh18c37C14WgdPchsg5ZZ9Y8PBrHTjzgfmsH82c1ApaUHbK6cls2chPYGG-_0SnTwcw4Gwyxndp-ax9pu4cpUXbEp8W9Ir7DtnSS1eWT8dPP0FNytNBxrpE>
1> I Extracted the dpdk
2> Enabled pcap (libpcap headers are required).
3> Built libraries and test application (Linux headers may be needed with 
default config).
4> Reserved huge pages memory.
but since the hardware isnt accessible to me i wasn't able to test by running 
poll-mode driver

But after doing this when i start the vpp it'll stay active for a moment and 
stop immediately.

Log :
----------------------------------------------------------------------------------------------
root1@root1-CN21UPSA:~$ sudo service vpp start
root1@root1-CN21UPSA:~$ sudo service vpp status
● vpp.service - vector packet processing engine
   Loaded: loaded (/lib/systemd/system/vpp.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Tue 2018-01-30 19:10:09 IST; 6ms ago
  Process: 22689 ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
  Process: 22704 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, 
status=0/SUCCESS)
  Process: 22701 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
 Main PID: 22708 (vpp)
   CGroup: /system.slice/vpp.service
           └─22708 /usr/bin/vpp -c /etc/vpp/startup.conf

Jan 30 19:10:09 root1-CN21UPSA systemd[1]: Starting vector packet processing 
engine...
Jan 30 19:10:09 root1-CN21UPSA systemd[1]: Started vector packet processing 
engine.
Jan 30 19:10:09 root1-CN21UPSA vpp[22708]: vlib_plugin_early_init:356: plugin 
path /usr/lib/vpp_plugins
Jan 30 19:10:09 root1-CN21UPSA vpp[22708]: load_one_plugin:184: Loaded plugin: 
acl_plugin.so (Access Control Lists)
root1@root1-CN21UPSA:~$
root1@root1-CN21UPSA:~$ sudo service vpp status
● vpp.service - vector packet processing engine
   Loaded: loaded (/lib/systemd/system/vpp.service; enabled; vendor preset: 
enabled)
   Active: inactive (dead) since Tue 2018-01-30 19:10:11 IST; 5ms ago
  Process: 22736 ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
  Process: 22733 ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf (code=exited, 
status=0/SUCCESS)
  Process: 22730 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, 
status=0/SUCCESS)
  Process: 22727 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
 Main PID: 22733 (code=exited, status=0/SUCCESS)

Jan 30 19:10:11 root1-CN21UPSA systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.
Jan 30 19:10:11 root1-CN21UPSA systemd[1]: Stopped vector packet processing 
engine.
Jan 30 19:10:11 root1-CN21UPSA systemd[1]: vpp.service: Start request repeated 
too quickly.
Jan 30 19:10:11 root1-CN21UPSA systemd[1]: Failed to start vector packet 
processing engine.
root1@root1-CN21UPSA:~$

--------------------------------------------------------------------------------------------------------





On Tuesday 30 January 2018, 4:20:44 PM IST, Gabriel Ganne 
<gabriel.ga...@enea.com> wrote:



I'm sorry, I'm afraid I'm at a loss of ideas.


You should try asking to the vpp-dev mailing list.


--

Gabriel Ganne

________________________________
From: adarsh m <addi.ada...@yahoo.in>
Sent: Tuesday, January 30, 2018 11:38:41 AM
To: Gabriel Ganne
Subject: Re: [csit-dev] adding interface to vpp


Hi,

I am able to compile the DPDK as per the steps given in the doc 
http://dpdk.org/doc/quick-start<https://url10.mailanyone.net/v1/?m=1egTJZ-0003jf-3w&i=57e1b682&c=VgM04HZF9r4lY3cXRQCzv_OIb40UQOy-VSfBWMVJbCirKcrINzHLEsYdmgX35cSvpS6FdUWE4_Wfzjx_LeCVtzyDzS44BsJAafd_rw_Ek8cONLgYCcdef0lithOr91VPm0i6V6LMNx7h11whXFg2A_BL_sDygOQYlLws21go8oSelJz8CZshCjJH3_1C99alz99SzeyEMZkabAIofaMh6LGf21zVNKT32rQQ9Yc-CdQ>


but since i dont have the hardware with me here i cannot test the "Run 
poll-mode driver test (with a cable between ports)" part

I did try to start VPP after doing this step but found that now vpp is also not 
starting.


Log :
root1@root1-CN21UPSA:~$ sudo service vpp start
root1@root1-CN21UPSA:~$ sudo service vpp status
● vpp.service - vector packet processing engine
   Loaded: loaded (/lib/systemd/system/vpp.service; enabled; vendor preset: 
enabled)
   Active: inactive (dead) since Tue 2018-01-30 15:53:15 IST; 3s ago
  Process: 16337 ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
  Process: 16333 ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf (code=exited, 
status=0/SUCCESS)
  Process: 16329 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, 
status=0/SUCCESS)
  Process: 16327 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
 Main PID: 16333 (code=exited, status=0/SUCCESS)

Jan 30 15:53:15 root1-CN21UPSA systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.
Jan 30 15:53:15 root1-CN21UPSA systemd[1]: Stopped vector packet processing 
engine.
Jan 30 15:53:15 root1-CN21UPSA systemd[1]: vpp.service: Start request repeated 
too quickly.
Jan 30 15:53:15 root1-CN21UPSA systemd[1]: Failed to start vector packet 
processing engine.
root1@root1-CN21UPSA:~$
On Tuesday 30 January 2018, 3:35:47 PM IST, Gabriel Ganne 
<gabriel.ga...@enea.com> wrote:



dpdk_lib_init() says that DPDK drivers found no ports.


Are you able to run dpdk alone ?

For example, does this work as expected: 
http://dpdk.org/doc/quick-start<https://url10.mailanyone.net/v1/?m=1egTJZ-0003jf-3w&i=57e1b682&c=VgM04HZF9r4lY3cXRQCzv_OIb40UQOy-VSfBWMVJbCirKcrINzHLEsYdmgX35cSvpS6FdUWE4_Wfzjx_LeCVtzyDzS44BsJAafd_rw_Ek8cONLgYCcdef0lithOr91VPm0i6V6LMNx7h11whXFg2A_BL_sDygOQYlLws21go8oSelJz8CZshCjJH3_1C99alz99SzeyEMZkabAIofaMh6LGf21zVNKT32rQQ9Yc-CdQ>


--

Gabriel Ganne

________________________________
From: adarsh m <addi.ada...@yahoo.in>
Sent: Tuesday, January 30, 2018 10:57:45 AM
To: Gabriel Ganne
Subject: Re: [csit-dev] adding interface to vpp


Hi,

I fixed the issue of adding the vendor_id and device_id in the init.c but still 
the interface is not showing in VPP.

FIX :
 /* virtio */
    if (d->vendor_id == 0x1af4 &&
            (d->device_id == VIRTIO_PCI_LEGACY_DEVICEID_NET ||
             d->device_id == VIRTIO_PCI_MODERN_DEVICEID_NET))
      ;
    /* vmxnet3 */
    else if (d->vendor_id == 0x15ad && d->device_id == 0x07b0)
      ;
    /* bnx2 */
    else if (d->vendor_id == 0x14e4 && d->device_id == 0x163b)
      ;
    /* all Intel network devices */
    else if (d->vendor_id == 0x8086 && d->device_class == 
PCI_CLASS_NETWORK_ETHERNET)
      ;
    /* all Intel QAT devices VFs */
    else if (d->vendor_id == 0x8086 && d->device_class == 
PCI_CLASS_PROCESSOR_CO &&
        (d->device_id == 0x0443 || d->device_id == 0x37c9 || d->device_id == 
0x19e3))
      ;
    /* Cisco VIC */
    else if (d->vendor_id == 0x1137 && d->device_id == 0x0043)
      ;
    /* Chelsio T4/T5 */
    else if (d->vendor_id == 0x1425 && (d->device_id & 0xe000) == 0x4000)
      ;
    /* Amazen Elastic Network Adapter */
    else if (d->vendor_id == 0x1d0f && d->device_id >= 0xec20 && d->device_id 
<= 0xec21)
      ;
    /* Mellanox  */
    else if (d->vendor_id == 0x15b3 && d->device_id >= 0x1013 && d->device_id 
<= 0x101a)
      {
        continue;
      }
    else
      {
        clib_warning ("Unsupported PCI device 0x%04x:0x%04x found "
              "at PCI address %s\n", (u16) d->vendor_id, (u16) d->device_id,
              pci_addr);
        continue;
      }




LOG :

root1@root1-CN21UPSA:~$ sudo service vpp status
● vpp.service - vector packet processing engine
   Loaded: loaded (/lib/systemd/system/vpp.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Tue 2018-01-30 15:18:18 IST; 1min 34s ago
  Process: 12206 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, 
status=0/SUCCESS)
  Process: 12202 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
 Main PID: 12210 (vpp_main)
   CGroup: /system.slice/vpp.service
           └─12210 /usr/bin/vpp -c /etc/vpp/startup.conf

Jan 30 15:18:18 root1-CN21UPSA /usr/bin/vpp[12210]: load_one_plugin:63: Loaded 
plugin: /usr/lib/vpp_api_test_plugins/gtpu_test_plugin.so
Jan 30 15:18:18 root1-CN21UPSA /usr/bin/vpp[12210]: load_one_plugin:63: Loaded 
plugin: /usr/lib/vpp_api_test_plugins/ioam_pot_test_plugin.so
Jan 30 15:18:18 root1-CN21UPSA vpp[12210]: /usr/bin/vpp[12210]: 
dpdk_config:1243: EAL init args: -c 1 -n 4 --huge-dir /run/vpp/hugepages 
--file-prefix vpp -w 0000:0b:00.1 --master-lcore 0 --socket-mem 102
Jan 30 15:18:18 root1-CN21UPSA /usr/bin/vpp[12210]: dpdk_config:1243: EAL init 
args: -c 1 -n 4 --huge-dir /run/vpp/hugepages --file-prefix vpp -w 0000:0b:00.1 
--master-lcore 0 --socket-mem 1024
Jan 30 15:18:18 root1-CN21UPSA vpp[12210]: EAL: No free hugepages reported in 
hugepages-1048576kB
Jan 30 15:18:18 root1-CN21UPSA vpp[12210]: EAL: VFIO support initialized
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: EAL: VFIO support initialized
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: unix_physmem_region_iommu_register: 
ioctl (VFIO_IOMMU_MAP_DMA): Invalid argument
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: dpdk_ipsec_process:1011: not enough 
DPDK crypto resources, default to OpenSSL
Jan 30 15:18:18 root1-CN21UPSA vnet[12210]: dpdk_lib_init:221: DPDK drivers 
found no ports...

root1@root1-CN21UPSA:~$ sudo vppctl show interface
              Name               Idx       State          Counter          Count
local0                            0        down
root1@root1-CN21UPSA:~$


On Tuesday 30 January 2018, 10:35:34 AM IST, adarsh m <addi.ada...@yahoo.in> 
wrote:


Hi,

Ok sure i'll do it thanks a lot :)

Regards,
Adarsh M.


On Monday 29 January 2018, 9:21:55 PM IST, Gabriel Ganne 
<gabriel.ga...@enea.com> wrote:



Assuming dpdk alone works on your platform.


The relevant part of the error is here :
Jan 29 18:00:16 root1-CN21UPSA vpp[2175]: /usr/bin/vpp[2175]: 
dpdk_bind_devices_to_uio:758: Unsupported PCI device 0x14e4:0x163b found at PCI 
address 0000:0b:00.1
If read your ids correctly, your NIC is a Broadcom NetXtreme II BCM5716 Gigabit 
Ethernet.
It's not supported by VPP dpdk's plugin.
See vpp file src/plugins/dpdk/device/init.c lines 726 -> 750

Please add your ids to the list and submit for review. I cannot test this, so 
it's better if you're the one to do it.
Add me as reviewer, I'll +1.



--

Gabriel Ganne

________________________________
From: csit-dev-boun...@lists.fd.io <csit-dev-boun...@lists.fd.io> on behalf of 
adarsh m via csit-dev <csit-...@lists.fd.io>
Sent: Monday, January 29, 2018 1:50:25 PM
To: csit-...@lists.fd.io
Subject: [csit-dev] adding interface to vpp

Hi,

I am trying to add an interface to vpp on one of the ATCA Linux board and have 
followed the steps provided in the tutorial,

but stil when i try to check the interface in vpp it is not showing pls help me 
to get this for if i am wrong somewhere or if there is an issue.

Steps :

1> Check the Pcie address of the interface to be added and add it in 
etc/vpp/start.conf
2> Restart vpp
3> Didnt show in VPP so downned the interface and flushed and restarted VPP.


Logs :
root1@root1-CN21UPSA:~$ sudo service vpp status
● vpp.service - vector packet processing engine
   Loaded: loaded (/lib/systemd/system/vpp.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Mon 2018-01-29 18:00:16 IST; 10s ago
  Process: 2132 ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
  Process: 2171 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, 
status=0/SUCCESS)
  Process: 2167 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm 
/dev/shm/vpe-api (code=exited, status=0/SUCCESS)
 Main PID: 2175 (vpp_main)
   CGroup: /system.slice/vpp.service
           └─2175 /usr/bin/vpp -c /etc/vpp/startup.conf

Jan 29 18:00:16 root1-CN21UPSA vpp[2175]: /usr/bin/vpp[2175]: 
dpdk_bind_devices_to_uio:758: Unsupported PCI device 0x14e4:0x163b found at PCI 
address 0000:0b:00.1
Jan 29 18:00:16 root1-CN21UPSA /usr/bin/vpp[2175]: 
dpdk_bind_devices_to_uio:758: Unsupported PCI device 0x14e4:0x163b found at PCI 
address 0000:0b:00.1
Jan 29 18:00:16 root1-CN21UPSA vpp[2175]: /usr/bin/vpp[2175]: dpdk_config:1240: 
EAL init args: -c 1 -n 4 --huge-dir /run/vpp/hugepages --file-prefix vpp -w 
0000:0b:00.1 --master-lcore 0 --socket-mem 1024
Jan 29 18:00:16 root1-CN21UPSA /usr/bin/vpp[2175]: dpdk_config:1240: EAL init 
args: -c 1 -n 4 --huge-dir /run/vpp/hugepages --file-prefix vpp -w 0000:0b:00.1 
--master-lcore 0 --socket-mem 1024
Jan 29 18:00:16 root1-CN21UPSA vpp[2175]: EAL: No free hugepages reported in 
hugepages-1048576kB
Jan 29 18:00:16 root1-CN21UPSA vpp[2175]: EAL: VFIO support initialized
Jan 29 18:00:16 root1-CN21UPSA vnet[2175]: EAL: VFIO support initialized
Jan 29 18:00:16 root1-CN21UPSA vnet[2175]: unix_physmem_region_iommu_register: 
ioctl (VFIO_IOMMU_MAP_DMA): Invalid argument
Jan 29 18:00:16 root1-CN21UPSA vnet[2175]: dpdk_ipsec_process:1011: not enough 
DPDK crypto resources, default to OpenSSL
Jan 29 18:00:16 root1-CN21UPSA vnet[2175]: dpdk_lib_init:221: DPDK drivers 
found no ports...
root1@root1-CN21UPSA:~$ sudo vppctl show interface
              Name               Idx       State          Counter          Count
local0                            0        down
root1@root1-CN21UPSA:~$
root1@root1-CN21UPSA:~$
root1@root1-CN21UPSA:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp10s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default 
qlen 1000
    link/ether 48:62:76:04:01:9c brd ff:ff:ff:ff:ff:ff
3: enp10s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
group default qlen 1000
    link/ether 48:62:76:04:01:9d brd ff:ff:ff:ff:ff:ff
4: enp11s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
group default qlen 1000
    link/ether 48:62:76:04:01:9e brd ff:ff:ff:ff:ff:ff
    inet 172.16.46.1/16 brd 172.16.255.255 scope global enp11s0f0
       valid_lft forever preferred_lft forever
    inet6 fe80::e890:e1b7:d3fa:5280/64 scope link
       valid_lft forever preferred_lft forever
5: enp11s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default 
qlen 1000     <------------------------interface used
    link/ether 48:62:76:04:01:9f brd ff:ff:ff:ff:ff:ff
6: enp12s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN 
group default qlen 1000
    link/ether 48:62:76:04:01:a0 brd ff:ff:ff:ff:ff:ff


_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to