Hi Jay, You might need to load the igb_uio /rte_kni modules and bind the NIC to DPDK (using dpdk_nic_bind.py).
Raja From: Dev <[email protected]> on behalf of "Rhine, Jay (Nokia - US)" <[email protected]> Date: Thursday, June 2, 2016 at 1:37 PM To: Matthew Welch <[email protected]> Cc: "[email protected]" <[email protected]>, "[email protected]" <[email protected]> Subject: Re: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a Compute Matthew, Good thought, but when using the vrouter in dpdk mode there is no vrouter kernel module … I can’t find where this is documented exactly, but that seem to be the case. I have tracked down a little more info. When you run “vif --add 0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --vhost-phys --type physical --pmd --id 0”, you get “vRouter(Response): No such file or directory (2)” on the command line, but you also get the following in the vrouter log: 2016-06-02 16:18:44,141 VROUTER: Error adding vif 0 eth device 1: invalid PMD 1 (must be less than 0) 2016-06-02 16:18:44,141 VROUTER: Deleting vif 0 eth device 2016-06-02 16:18:44,141 VROUTER: error deleting eth dev : already removed I’ve tracked that error down to the following function in “vr_dpdk_interface.c” … Reading this source code it seems that “rte_eth_dev_count()” is returning 0. So apparently, the problem is that I have 0 “rte_eth” devices … “rte_eth” is part of dpdk in some way, but I don’t understand what it is exactly. I feel like I’m very close to getting this vrouter operational … but I’m still missing something. Any thoughts are appreciated. Thanks! Jay Here is the code snippet from “vr_dpdk_interface.c” which is generating the error: static int dpdk_fabric_if_add(struct vr_interface *vif) { int ret; uint8_t port_id; struct rte_pci_addr pci_address; struct vr_dpdk_ethdev *ethdev; struct ether_addr mac_addr; memset(&pci_address, 0, sizeof(pci_address)); memset(&mac_addr, 0, sizeof(mac_addr)); if (vif->vif_flags & VIF_FLAG_PMD) { if (vif->vif_os_idx >= rte_eth_dev_count()) { RTE_LOG(ERR, VROUTER, "Error adding vif %u eth device %s: invalid PMD %u" " (must be less than %u)\n", vif->vif_idx, vif->vif_name, vif->vif_os_idx, (unsigned)rte_eth_dev_count()); return -ENOENT; } ---- Jay Rhine, CISSP From: Matthew Welch [mailto:[email protected]] Sent: Thursday, June 02, 2016 4:24 PM To: Rhine, Jay (Nokia - US) Cc: [email protected]; [email protected] Subject: Re: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a Compute Off the top of my head, does lsmod show the vrouter module? On Thursday, June 2, 2016, Rhine, Jay (Nokia - US) <[email protected]<mailto:[email protected]>> wrote: Folks Okay, I have moved further. I’ve read that contrail-packing is going to go away, but it does contain a “contrail-vrouter-dpdk-init” package. I managed to build that, and install it on the compute. This setup seems like it should work, BUT its failing to create the vhost0, and that’s blocking us from getting any further. Specifically, the vrouter_dpdk_start function from vrouter-functions.sh is fainig to run the following two vif commands, with these errors. vif --add 0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --vhost-phys --type physical --pmd --id 0 vRouter(Response): No such file or directory (2) vif --add vhost0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --type vhost --xconnect 0 --pmd --id 1 vRouter(Response): No such device (19) Does anyone have ideas on this? Thank you very much, Jay Here are the commands and errors in the context of the log: + echo 'Thu Jun 2 15:58:18 EDT 2016: Error Agent configuring vhost0: interface does not exist' Thu Jun 2 15:58:18 EDT 2016: Error Agent configuring vhost0: interface does not exist + break + '[' '!' -L /sys/class/net/vhost0 ']' ++ date + echo 'Thu Jun 2 15:58:18 EDT 2016: Creating vhost0 interface with vif utility...' Thu Jun 2 15:58:18 EDT 2016: Creating vhost0 interface with vif utility... + '[' -z xx:xx:xx:xx:xx:xx ']' + '[' -z 172.16.xx.xx/24 ']' ++ date + echo 'Thu Jun 2 15:58:18 EDT 2016: Adding p2p2 interface with vif utility...' Thu Jun 2 15:58:18 EDT 2016: Adding p2p2 interface with vif utility... Thu Jun 2 15:58:18 EDT 2016: Adding p2p2 interface with vif utility... + vif --add 0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --vhost-phys --type physical --pmd --id 0 vRouter(Response): No such file or directory (2) + '[' 0 '!=' 0 ']' ++ date + echo 'Thu Jun 2 15:58:18 EDT 2016: Adding vhost0 interface with vif utility...' Thu Jun 2 15:58:18 EDT 2016: Adding vhost0 interface with vif utility... + vif --add vhost0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --type vhost --xconnect 0 --pmd --id 1 vRouter(Response): No such device (19) + '[' 0 '!=' 0 ']' ++ date + echo 'Thu Jun 2 15:58:18 EDT 2016: Done starting vRouter/DPDK.' Thu Jun 2 15:58:18 EDT 2016: Done starting vRouter/DPDK. + return 0 + return 0 Thu Jun 2 15:58:18 EDT 2016: Value ---- Jay Rhine, CISSP From: Rhine, Jay (Nokia - US) Sent: Thursday, June 02, 2016 2:01 PM To: [email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>; '[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>' Subject: Help with configure contrail-vrouter-dpdk on a Compute Howdy, In my last email, I said I was having vrouter dpdk compile problems. I do have something compiled now. I had to make a few minor tweaks to get it to compile, so I’m not entirely convinced it’s perfect. However, at this point I’m trying to configure the contrail-vrouter-dpdk on an OpenStack compute node, and I’m struggling to understand how it should be configured. I am using Ubuntu 14.04 and with Contrail 2.2x, I would configure a vhost0 interface in /etc/network/interfaces using the “vif” command to associated it with the correct physical interface. However, the vif command does not seem to work with the Contrail 3.x dpdk based vrouter. I believe this is because there is no longer a vrouter kernel module. There are no startup scripts in the contrail-packages repo for contrail-vrouter-dpdk, and no configuration file for it. I’m able to run it manually like “/usr/bin/contrail-vrouter-dpdk --vdev eth_bond0,mode=4,slave=0000:07:00.1 --no-daemon”. I think maybe I can use the “vdev” option to setup the vhost0 interface, but I cannot figure out the correct syntax. Also, I’m not clear if when using contrail-vrouter-dpdk, I still need to use the “contrail-vrouter-agent” or not. Any help, suggestions, or pointers would be appreciated. Thank you very much, Jay ---- Jay Rhine, CISSP
_______________________________________________ Dev mailing list [email protected] http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
