From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 38B1EA2EFC for ; Wed, 18 Sep 2019 18:54:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D8061D41D; Wed, 18 Sep 2019 18:54:02 +0200 (CEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by dpdk.org (Postfix) with ESMTP id 870321BF79 for ; Wed, 18 Sep 2019 18:54:01 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id x2so948364wmj.2 for ; Wed, 18 Sep 2019 09:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5IiPR44VfAV129I7LztB1TaNYloa97SIMYZsRE/lcGQ=; b=W8IZ/S9SOkJ468FEr0VKmBNUv/QH+8c5lQFNV9nHTZ5ZKT9NJEETza4RYfUZf7zvNZ FbHTJ5VtyJlqlD0lqoPtvuo1l3Q+5+i6zlU5isasdyHsPRtWKsDOgEx2FlEls7dJNilu 5BoIESpMLX3k7x9EjQ1Hz944AM0S9515shIF3R6f+36XGsKUzm9s4H4K0Var6zVgC4yK hZyjvQYEpHVifq8Vt/wpo1cfsxKYijeCLjqDEBO5UvYJfFnGvTUrLf6IiXMC65GoT2rA fk9X6HRCxyAQQJbjxtr5IluAIc0ZYSCGRJXKzJSux5FQ7Ge/y1KxExbxWzDNyTNhc8xZ iudg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5IiPR44VfAV129I7LztB1TaNYloa97SIMYZsRE/lcGQ=; b=PJVOZUvPwSsIr4r3Yph/yEtDGm+TGwlj8kMl+Ud06g3VKzxmDW1SxEenm01Y2imU6i aFrVyx7X3HpRwojDIEA5f+Gvani89+dOkTjZF4h5an/ogzDcLXWg36PLxOtn+3zA9JWE TYM1I+N2ndQyUJDNbxaSojUmr9MdMmKzob1K+TvmNH/03KLmD79lwH7nDEhkKaVrsB7a MV4Y6OdT/sTYqMYCbXVChNbOlWzpuS6nkYbT7WA7UfMKex5HdMLjlBpFjC/6JamkazZS JeypsEuFGPKyVXEqoMjnIiZHpdHFUVFxKnQIal2RffsI3XjbrhfrJrzDItztFna61Bl0 82Rg== X-Gm-Message-State: APjAAAVCpXBSWAs+I6uJ+vBGEr8ZdCnR9TjsDRcer2k1zKqJxetOMFqz UtrjaOL33ZIqEqvQwQEhQ5+N0pfqDrQMlMM3zBk= X-Google-Smtp-Source: APXvYqwdYRBDYfLcSgCHrvx2J8v85fVjt8mBpHzl+fM25Xu8aCj6589l1hmlK3RsZqy8QyNmM1OkjCaVKJ52Fu1Q2KM= X-Received: by 2002:a05:600c:2290:: with SMTP id 16mr3485186wmf.161.1568825641130; Wed, 18 Sep 2019 09:54:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: madhukar mythri Date: Wed, 18 Sep 2019 22:23:09 +0530 Message-ID: To: Derek Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Usage of example vhost (vhost-switch) 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: , Errors-To: users-bounces@dpdk.org Sender: "users" IP addresses are not required to set. Did you cross check the log-file of OVS, whether started successfully on the PF. On Wed, Sep 18, 2019, 7:25 PM Derek wrote: > Hi, Madhukar > > The io forwarding mode is set. > One question is > when using pktgen generates packets to the host, in addition to the vlan > id and mac, does it need to set the IP of source NIC and dst NIC? > > Thanks, > Derek > > madhukar mythri =E6=96=BC 2019=E5=B9=B49=E6= =9C=8818=E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=885:00=E5=AF=AB=E9=81= =93=EF=BC=9A > >> Did you configured the testpmd with "io" forwarding mode? >> you can cross-check with this command: "show config rxtx". >> For more information, you can go-through this testpmd documentation unde= r >> "4.4.7" section: >> https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html >> >> ~~ Madhukar. >> >> On Wed, Sep 18, 2019 at 9:39 AM Derek wrote: >> >>> Hi, >>> >>> I try to run the vhost example in DPDK. >>> >>> The steps I did are: >>> >>> (1) The guest vm created by QEMU using the shell script >>> #!/bin/bash >>> >>> USER_SOCK=3D"/tmp/sock0" >>> MPATH=3D"/dev/hugepages" >>> MEMSZ=3D2048 >>> IMG=3D/home/derek/ubuntu-guest.img >>> >>> qemu-system-x86_64 \ >>> -boot c \ >>> -machine accel=3Dkvm -cpu host \ >>> -m ${MEMSZ} -object >>> >>> memory-backend-file,id=3Dhugemem,size=3D${MEMSZ}M,mem-path=3D/dev/hugep= ages,share=3Don >>> \ >>> -mem-prealloc -smp 2 -numa node,memdev=3Dhugemem \ >>> -chardev socket,id=3Dchar1,path=3D/tmp/sock0,server \ >>> -netdev type=3Dvhost-user,id=3Dhostnet1,chardev=3Dchar1 \ >>> -device virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D52:54:00:00:00= :14 \ >>> -drive format=3Draw,file=3D${IMG} -vnc :4,password -monitor stdio >>> >>> (2) run the vhost-switch on the host >>> #> ./build/vhost-switch -l 0-3 -n 4--2 uge-dir /dev/hugepages >>> --socket-mem >>> 1024 --log-level 8 -w 00000:73:00.1 -- --socket-file /tmp/sock0 --clien= t >>> -p >>> 0x1 --stats 20 >>> >>> (3) The guest vm is started successfully. Then, in the guest vm i did >>> #> ./x86_64-native-gcc/app/testpmd -l 0-1 -- -i >>> > start tx_first >>> >>> I can see the TX packets on the host's vhost-switch stats and got the >>> message >>> VHOST_DATA: (0) mac 52:54:00:00:00:14 and vlan 1000 registered >>> >>> Device statistics =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> Statistics for device 0 >>> ----------------------- >>> TX total: 32 >>> TX dropped: 0 >>> TX successful: 32 >>> RX total: 0 >>> RX dropped: 0 >>> RX successful: 0 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> >>> >>> My question is that how can I inject packets to the MAC address and VLA= N >>> ID >>> 1000. >>> I've tried to setup a pktgen on another host whose physical NIC is >>> directly >>> connected to the physical NIC port of the host. Then, set pktgen's dst >>> mac >>> to 52:54:00:00:00:14 and vlan id to 1000. But the "Device statistics" i= s >>> not changed. >>> >>> Any idea for this problem? Very thanks. >>> >>