Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I am running Oracle VirtualBox and i have created two interfaces. I run DPDK and i add one interface to DPDK and i see that it goes missing from my ifconfig.
Screen shots below:
root#VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ifconfig
eth1 Link encap:Ethernet HWaddr 08:00:27:3f:34:56
inet addr:192.168.0.123 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe3f:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:132 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20982 (20.9 KB) TX bytes:3724 (3.7 KB)
eth2 Link encap:Ethernet HWaddr 08:00:27:f7:13:f5
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fef7:13f5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51932 errors:0 dropped:0 overruns:0 frame:0
TX packets:660805 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32407739 (32.4 MB) TX bytes:1647410289 (1.6 GB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1681 errors:0 dropped:0 overruns:0 frame:0
TX packets:1681 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:358901 (358.9 KB) TX bytes:358901 (358.9 KB)
root#VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ./dpdk_nic_bind.py --status
Network devices using DPDK-compatible driver
Network devices using kernel driver
0000:00:03.0 '82540EM Gigabit Ethernet Controller' if=eth1 drv=e1000 unused=igb_uio,vfio-pci *Active*
0000:00:08.0 '82540EM Gigabit Ethernet Controller' if=eth2 drv=e1000 unused=igb_uio,vfio-pci *Active*
Other network devices
root#VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ./dpdk_nic_bind.py -b igb_uio 0000:00:08.0
root#VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ./dpdk_nic_bind.py --status
Network devices using DPDK-compatible driver
0000:00:08.0 '82540EM Gigabit Ethernet Controller' drv=igb_uio unused=vfio-pci
Network devices using kernel driver
0000:00:03.0 '82540EM Gigabit Ethernet Controller' if=eth1 drv=e1000 unused=igb_uio,vfio-pci *Active*
Other network devices
I dont see my eth2 that i had added I modified to use a DPDK compatible driver.
root#VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ifconfig
eth1 Link encap:Ethernet HWaddr 08:00:27:3f:34:56
inet addr:192.168.0.123 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe3f:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:182 errors:0 dropped:0 overruns:0 frame:0
TX packets:86 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27757 (27.7 KB) TX bytes:12789 (12.7 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1705 errors:0 dropped:0 overruns:0 frame:0
TX packets:1705 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:360948 (360.9 KB) TX bytes:360948 (360.9 KB)
DPDK's igb_uio driver does not generate 'netdev' interfaces, so I cannot see any interface via ifconfig. (However, they are registered as 'rte_eth_dev' in the DPDK application.) I should use KNI drivers to have 'netdev' interfaces
Related
I'm new to dpdk and using dpdk-stable-17.11.2 on docker.
OS is Ubuntu 14.04 and the kernel is 3.19.0-80-generic.
I've followed the dpdk-setup.sh as below and bind the igb_uio driver to my device.
[14] x86_64-native-linuxapp-gcc
[17] Insert IGB UIO module
[18] Insert VFIO module
[19] Insert KNI module
[20] Setup hugepage mappings for non-NUMA systems
[21] Setup hugepage mappings for NUMA systems
[22] Display current Ethernet/Crypto device settings
[23] Bind Ethernet/Crypto device to IGB UIO module
[24] Bind Ethernet/Crypto device to VFIO module
[25] Setup VFIO permissions
Network devices using DPDK-compatible driver
============================================
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
Network devices using kernel driver
===================================
0000:03:00.0 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' if=eth1 drv=bnx2x unused=igb_uio,vfio-pci *Active*
0000:04:00.0 'NetXtreme BCM5751 Gigabit Ethernet PCI Express 1677' if=eth0 drv=tg3 unused=igb_uio,vfio-pci *Active*
0000:07:00.0 'NX3031 Multifunction 1/10-Gigabit Server Adapter 0100' if=eth3 drv=netxen_nic unused=igb_uio,vfio-pci
0000:07:00.1 'NX3031 Multifunction 1/10-Gigabit Server Adapter 0100' if=eth4 drv=netxen_nic unused=igb_uio,vfio-pci
I got errors when running testpmd.
EAL: Detected 32 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: No probed ethernet devices
PANIC in main():
Empty set of forwarding logical cores - check the core mask supplied in the command parameters
5: [x86_64-native-linuxapp-gcc/app/testpmd() [0x46504f]]
4: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fe9117c9f45]]
3: [x86_64-native-linuxapp-gcc/app/testpmd(main+0x8fb) [0x460aab]]
2: [x86_64-native-linuxapp-gcc/app/testpmd(__rte_panic+0xb8) [0x458a7a]]
1: [x86_64-native-linuxapp-gcc/app/testpmd(rte_dump_stack+0x1a) [0x4ea2aa]]
What have I missed?
I changed CONFIG_RTE_LIBRTE_BNX2X_PMD=n to CONFIG_RTE_LIBRTE_BNX2X_PMD=y in the $RTE_SDK/config/common_base.
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
[...]
EAL: No probed ethernet devices
This error has solved.
0000:03:00.1 'NetXtreme II BCM57810 10 Gigabit Ethernet 168e' drv=igb_uio unused=vfio-pci
[...]
EAL: No probed ethernet devices
BCM57810 seems to be unsupported by the current version of Broadcom PMD:
https://dpdk.org/doc/guides/nics/bnxt.html
As a workaround you can try to use a supported NIC instead (if possible) or a virtual device (might be much slower).
PANIC in main():
Empty set of forwarding logical cores - check the core mask supplied in the command parameters
You did not list the your command line options, but you definitely should check it for a lcore mask or core list or core map. Here is the list of EAL command line options:
https://dpdk.org/doc/guides/testpmd_app_ug/run_app.html
I have a bluno (arduino uno with a built-in BLE[TI CC2540]) and laptop (ubuntu) with a built-in Bluetooth module.
I want to make a Bleutooth BLE communication program between arduino and linux.
I want to send data from linux to arduino.
Any help would be awesome!
(reference) below operation confirm
$sudo hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 6C:71:D9:B1:A5:1A ACL MTU: 1022:8 SCO MTU: 183:5
UP RUNNING PSCAN ISCAN
RX bytes:1786 acl:16 sco:0 events:99 errors:0
TX bytes:1407 acl:12 sco:0 commands:65 errors:0
$ hciconfig hci0 up
$ sudo hcitool lescan
LE Scan ...
D0:39:72:C4:CA:72 (unknown)
D0:39:72:C4:CA:72 Bluno
And where exactly is your problem respectively at which stage is your development currently?
In general:
You have somehow to talk with the bluetooth module on your linux system (Raspberry?). For this you need e.g. API-calls to give and read command from you bluetooth module. If there are no read-to-use APIs then you need to write it yourself, reading the manual of the module and communicating with it using SPI, I2C,...
After a successful hardware-communication with your bluetooth module on the linux system, you have to communicate with the BLE module. For this developing a protocol with cyclic redundancy checks,... would be a good idea, insted of sending plain "chars".
Host is Windows 8.1; provider is VirtualBox 4.3.4; Vagrant version is 1.3.5.
Host has just a single NIC, wired, with IP 192.168.1.100.
Vagrantfiles reads:
config.vm.box = "precise64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "init.pp"
puppet.options="--verbose --debug"
However, following vagrant up, the VM gets a completely wrong IP address. ifconfig for the guest reads:
vagrant#vagrant-ubuntu-precise-64:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:1a:b6:5e
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.25
inet6 addr: fe80::a00:27ff:fe1a:b65e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:356 errors:0 dropped:0 overruns:0 frame:0
TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38937 (38.9 KB) TX bytes:33157 (33.1 KB)
Why is Vagrant totally ignoring the port forwarding setting on the vagrantfile? IP address should be 192.168.1.xand instead I get this random 10.0.2.15. Any ideas?
Edit: Host can't even ping 10.0.2.15. No response, even when the VM is up. Something is very broken.
Edit 2: Now I'm getting /sbin/ip addr flush dev eth1 2> /dev/null on 2 different systems. Argh.
Ssh into the machine
Delete the file /etc/udev/rules.d/70-persistent-net.rules
Exit the machine
Do a "vagrant reload"
I think that does the trick =]
port-forwarding means that packets received on mentioned port will be forwarded to the guest. in your example localhost:8080 should redirected to the vm's service listening on vm's 80 port.
Regarding "random" 10.0.2.15, usually this IP assigned to the guest if VM configured with NAT attachment, this mean that guest absolutely invisible from outside (except port-forward, but this access possible only via host). And of course you can't ping guest from the host only in opposite direction (from guest to host).
I configured vagrant with virtualbox with the given Vagrantfile settings below. I can connect to web server running on the virtual machine from the host machine (HM).
I also can ping to the server from a network machine, but when I try to access the web server from network, the Virtual machine(VM) gets the request and says it responds (apache), but the network machine (NM) does not get the response.
How should I configure vagrant or virtualbox to access from NM? I tried changing eth1's to eth0 on the VM interfaces file , but it didnt work. Vagrant cant up the machine.
Thanks in advance
Vagrantfile:
config.vm.define "web" do |web|
web.vm.box = "raring"
web.vm.network "public_network", ip: "192.168.0.53", bridge: 'eth0'
web.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", 1024]
end
end
Host machine interface
eth0 Link encap:Ethernet HWaddr 54:04:a6:68:7d:85
inet addr:192.168.0.102 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:576 Metric:1
RX packets:142100 errors:0 dropped:0 overruns:0 frame:0
TX packets:110704 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61653460 (61.6 MB) TX bytes:14976111 (14.9 MB)
Interrupt:55 Base address:0xa000
Virtual machine interface
eth0 Link encap:Ethernet HWaddr 08:00:27:49:4c:f1
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe49:4cf1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:386 errors:0 dropped:0 overruns:0 frame:0
TX packets:276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41117 (41.1 KB) TX bytes:36296 (36.2 KB)
eth1 Link encap:Ethernet HWaddr 08:00:27:c3:16:90
inet addr:192.168.0.53 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fec3:1690/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:946 errors:0 dropped:0 overruns:0 frame:0
TX packets:1017 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:116117 (116.1 KB) TX bytes:90515 (90.5 KB)
virtual machine /etc/network/interfaces file:
# The primary network interface
auto eth0
iface eth0 inet dhcp
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth1
iface eth1 inet static
address 192.168.0.53
netmask 255.255.255.0
#VAGRANT-END
apache response on the VM:
192.168.0.100 - - [16/Nov/2013:10:39:10 +0000] "GET / HTTP/1.1" "curl/7.32.0" 200 7466 6005
This problem comes up not from vagrant or vagrant setup, but because of bad apache configuration in virtual machine (VM).
Modify yours apache site configuration in the VM:
vim /etc/apache2/sites-enabled/yours_site_config.conf
Change a server name to: ServerName 192.168.0.53
After restarting apache check the results in your browser.
E.g.:
<VirtualHost *:80>
ServerAdmin servers#localhost
ServerName 192.168.0.53
DocumentRoot /var/www
</VirtualHost>
192.168.0.53 - this is an inet addr of yours VM.
I'm using GNU/Linux Ubuntu 13.04 Raring Ringtail x32 bits. I have a wireless network connection in my house and I want that others computers connected see my localhost.
I created a web page using Python Django 1.4 and it listen in http://localhost:8000/. I read about it, but, I don't undertood about how to setting up my local ip.
When I write this in the terminal ifconfig, it shows this:
eth0 Link encap:Ethernet HWaddr 18:a9:05:dd:32:fc
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth1 Link encap:Ethernet HWaddr 90:4c:e5:3b:fe:c3
inet addr:192.168.1.18 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::924c:e5ff:fe3b:fec3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9880 errors:0 dropped:0 overruns:0 frame:7882
TX packets:9386 errors:12 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9839915 (9.8 MB) TX bytes:1643176 (1.6 MB)
Interrupt:16 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1535 errors:0 dropped:0 overruns:0 frame:0
TX packets:1535 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:222541 (222.5 KB) TX bytes:222541 (222.5 KB)
How to setting up it to see my local website in others computers using my wireless connection.
Thanks so much for your help!
You can bind your Django server to your machine's IP address and then hit that on your other machines on the same LAN:
$ python manage.py runserver 192.168.1.18:8000
Just add this to your normal runserver command:
python manage.py runserver 0.0.0.0:8000
Then others on your local network can access it through:
http://192.168.1.18:8000