From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by dpdk.org (Postfix) with ESMTP id C346F2C8 for ; Tue, 20 Jun 2017 12:52:37 +0200 (CEST) Received: from 172.30.72.55 (EHLO nkgeml412-hub.china.huawei.com) ([172.30.72.55]) by dggrg02-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id APS04145; Tue, 20 Jun 2017 18:52:34 +0800 (CST) Received: from FRAEML703-CAH.china.huawei.com (10.206.14.34) by nkgeml412-hub.china.huawei.com (10.98.56.73) with Microsoft SMTP Server (TLS) id 14.3.235.1; Tue, 20 Jun 2017 18:52:34 +0800 Received: from FRAEML521-MBS.china.huawei.com ([169.254.2.97]) by fraeml703-cah.china.huawei.com ([10.206.14.34]) with mapi id 14.03.0301.000; Tue, 20 Jun 2017 12:52:29 +0200 From: "Avi Cohen (A)" To: "ovs-discuss@openvswitch.org" , "users@dpdk.org" Thread-Topic: OVS-DPDK - TAP0 - vdev (af_packet) device is linkdown Thread-Index: AdLpqLc3x/Psn8fHR0SpX9suVx3gcQAClrMg Date: Tue, 20 Jun 2017 10:52:28 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.200.202.183] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.5948FE73.0052, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.2.97, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e617eeac5ef397f84a14248e666a341d Subject: Re: [dpdk-users] OVS-DPDK - TAP0 - vdev (af_packet) device is linkdown X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 10:52:39 -0000 Update=20 I see in log file the following error msgs .. libvirtd[1734]: Failed to open file '/sys/class/net/tap0/operstate': No suc= h file or directory libvirtd[1734]: unable to read: /sys/class/net/tap0/operstate: No such file= or directory kernel: [ 38.948590] IPv6: ADDRCONF(NETDEV_UP): tap0: link is not ready > -----Original Message----- > From: Avi Cohen (A) > Sent: Tuesday, 20 June, 2017 12:41 PM > To: 'ovs-discuss@openvswitch.org'; 'users@dpdk.org' > Subject: OVS-DPDK - TAP0 - vdev (af_packet) device is linkdown >=20 > Hello All, >=20 > I did upgrade to dpdk-17.05 and ovs-2-7.1 and create a vdev - af_packet > device according the config script below This tap device connects the ovs= - > dpdk to a name space The problem is that this tap00 device is linkdown - > (never reach RUNNING state ) - hence no pkt is received transmitted on = this > interface although the tap0 creation in ovs is OK, I'm attaching the co= nfig > script and output of netstat and ifconfig in the namespace Can someone > please tell me how to activate the tap0 ? >=20 > Config script : >=20 >=20 > cd ../dpdk-17.05/usertools/ > modprobe uio > insmod ../x86_64-native-linuxapp-gcc/kmod/igb_uio.ko > ifconfig ens3 down >=20 > ./dpdk-devbind.py --bind=3Digb_uio 0000:00:03.0 ./dpdk-devbind.py --statu= s >=20 > cd - >=20 > pkill -9 ovs > rm -rf /usr/local/var/run/openvswitch > rm -rf /usr/local/etc/openvswitch/ > rm -f /usr/local/etc/openvswitch/conf.db > mkdir -p /usr/local/etc/openvswitch > mkdir -p /usr/local/var/run/openvswitch >=20 >=20 > ./ovsdb/ovsdb-tool create /usr/local/etc/openvswitch/conf.db > ./vswitchd/vswitch.ovsschema ./ovsdb/ovsdb-server -- > remote=3Dpunix:/usr/local/var/run/openvswitch/db.sock -- > remote=3Ddb:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach > ./utilities/ovs-vsctl --no-wait init >=20 > echo 8192 > /sys/devices/system/node/node0/hugepages/hugepages- > 2048kB/nr_hugepages > echo 8192 > /sys/devices/system/node/node1/hugepages/hugepages- > 2048kB/nr_hugepages >=20 > mkdir -p /mnt/huge > mkdir -p /mnt/huge_2mb > mount -t hugetlbfs none /mnt/huge_2mb -o pagesize=3D2MB >=20 > modprobe openvswitch > export DB_SOCK=3D/usr/local/var/run/openvswitch/db.sock >=20 > ./utilities/ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init= =3Dtrue > ./vswitchd/ovs-vswitchd unix:$DB_SOCK --pidfile --detach ./utilities/ovs-= vsctl > set Open_vSwitch . other_config:pmd-cpu-mask=3D0x80 >=20 >=20 >=20 > utilities/ovs-vsctl --may-exist add-br br-int \ > -- set Bridge br-int datapath_type=3Dnetdev \ > -- br-set-external-id br-int bridge-id br-int \ > -- set bridge br-int fail-mode=3Dstandalone >=20 >=20 >=20 > ip tuntap add dev tap0 mode tap >=20 > ovs-vsctl add-port br-int tap0 -- set Interface tap0 type=3Ddpdk \ > options:dpdk-devargs=3Deth_af_packet0,iface=3Dtap0 >=20 >=20 >=20 > ip netns add red > ip link set tap0 netns red > ip netns exec red ip addr add 1.1.1.20/24 dev tap0 ip netns exec red ip l= ink set > tap0 up >=20 >=20 >=20 >=20 > utilities/ovs-vsctl --may-exist add-port br-int vxlan0 \ > -- set interface vxlan0 type=3Dvxlan options:remote_ip=3D172.31.100.44 > options:key=3D1000 >=20 >=20 >=20 >=20 > utilities/ovs-vsctl --may-exist add-br br-phy \ > -- set Bridge br-phy datapath_type=3Dnetdev \ > -- br-set-external-id br-phy bridge-id br-phy \ > -- set bridge br-phy fail-mode=3Dstandalone \ > other_config:hwaddr=3D02:d7:d1:26:84:e5 >=20 >=20 > utilities/ovs-vsctl --timeout 10 --may-exist add-port br-phy dpdk0 -- set > Interface dpdk0 type=3Ddpdk options:dpdk-devargs=3D0000:00:03.0 >=20 >=20 >=20 >=20 > ip addr add 172.31.100.80/24 dev br-phy >=20 >=20 >=20 > ip link set br-phy up > ip link set br-int up > iptables -F >=20 >=20 > utilities/ovs-appctl ovs/route/show >=20 >=20 > ip netns exec red bash > ifconfig lo up >=20 > ################################# > netstat -v -s -e > Ip: > 7 total packets received > 0 forwarded > 0 incoming packets discarded > 7 incoming packets delivered > 14 requests sent out > Icmp: > 7 ICMP messages received > 0 input ICMP message failed. > ICMP input histogram: > destination unreachable: 7 > 14 ICMP messages sent > 0 ICMP messages failed > ICMP output histogram: > destination unreachable: 7 > echo request: 7 > IcmpMsg: > InType3: 7 > OutType3: 7 > OutType8: 7 > Tcp: > 0 active connections openings > 0 passive connection openings > 0 failed connection attempts > 0 connection resets received > 0 connections established > 0 segments received > 0 segments send out > 0 segments retransmited > 0 bad segments received. > 0 resets sent > Udp: > 0 packets received > 0 packets to unknown port received. > 0 packet receive errors > 0 packets sent > UdpLite: > TcpExt: > 0 packet headers predicted > IpExt: > InOctets: 784 > OutOctets: 1372 > InNoECTPkts: 7 > root@ip-172-31-100-80:/home/ubuntu/openvswitch-2.7.0# ifconfig > 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:7 errors:0 dropped:0 overruns:0 frame:0 > TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1 > RX bytes:784 (784.0 B) TX bytes:784 (784.0 B) >=20 > tap0 Link encap:Ethernet HWaddr 1a:ef:3c:87:d7:67 > inet addr:1.1.1.20 Bcast:0.0.0.0 Mask:255.255.255.0 > UP BROADCAST PROMISC 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) >=20 > Best Regards >=20 > avi >=20 >=20 >=20 >=20 >=20