From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <users-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43BB242526 for <public@inbox.dpdk.org>; Wed, 6 Sep 2023 10:41:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B76C402BD; Wed, 6 Sep 2023 10:41:17 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 59A7A402BC for <users@dpdk.org>; Wed, 6 Sep 2023 10:41:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693989674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sl625lD/cllkPDxndG+8vMxX57P/74ihSctAFAbLm3k=; b=dXAPBez0RVfdv3HphRGw97RQTo3eviwPtUqhRo0csDKToq2tNLJ2U4B7hy676hEr13tzGQ Af+kVTZZwD85WzU1Jq/JMfVPkGmBLJ36cDZnZvTjipoNijD59k33N9m+2BubKuEqJeH5Uy Gp5P4kJHe4MZDIz+Ruu4dVhB7CEb7RU= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-398-aOa5qD9gNW6JxqAH5Lrv1w-1; Wed, 06 Sep 2023 04:41:13 -0400 X-MC-Unique: aOa5qD9gNW6JxqAH5Lrv1w-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5009ee2287aso3711791e87.2 for <users@dpdk.org>; Wed, 06 Sep 2023 01:41:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693989672; x=1694594472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sl625lD/cllkPDxndG+8vMxX57P/74ihSctAFAbLm3k=; b=Ejvtu585LU7Rhqj1zRXiinfGMGiRulO+fXEZvVQstzaKReL/vmZmVI/l+XBhPejSTz guowhacJj2LN1VuZa/InSw9FDOk/swOZAkQGTBgOdX9LFG9HD99SIythL0kwzKeHnlQc 4uvGpVQXNOKh1aLNNTCMG1cRSSb7ShaoAfEvBadX08uX/7rTY/q4z6+Q39L8rlTpeF8l +kSIpHp39RM6awtlfNvYn6mz7h0zCRnn1AaAvN2cEhpjVo9x+/M0b4y8RiGMVuANgBAB llyH1O4QkGATfrXiwYO+2ALzEcfDGth5QBd9q444acnJph9I30bwXUhhgVvbtRYiJEpR JRiw== X-Gm-Message-State: AOJu0YxgZ+/mJ1NpswLt/Lbh0auqWgzz2PqsWXKqyeRpf+YKaOtHETio H5wdSHpfQEWSwYaulMyza4wTMDMbZ5QcBngDJC0ta9IXqyzZ3G+PmwaqKgN6VKeimsgsHabPV8W 9Ft9K3uHbsUcVDvugCfXSzg== X-Received: by 2002:ac2:4d99:0:b0:500:9a29:bcb0 with SMTP id g25-20020ac24d99000000b005009a29bcb0mr1663469lfe.42.1693989672154; Wed, 06 Sep 2023 01:41:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEPw27D+SVHngu0G1OOPW+fVopMQkIrwu6zvqySQhyrgkxD4rfVvboVWcMVJRjhakK8s7rNcN8jKeXxmhYM4bk= X-Received: by 2002:ac2:4d99:0:b0:500:9a29:bcb0 with SMTP id g25-20020ac24d99000000b005009a29bcb0mr1663451lfe.42.1693989671762; Wed, 06 Sep 2023 01:41:11 -0700 (PDT) MIME-Version: 1.0 References: <TYAPR01MB63789A595A31264F5D55C5DBBCEFA@TYAPR01MB6378.jpnprd01.prod.outlook.com> <CAJFAV8wMPNDiLCJeNe6tCFCnWNyrm8ge=tO1=2QC0WYa7SFqyA@mail.gmail.com> <TYAPR01MB6378C37C45474FA50408061CBCEFA@TYAPR01MB6378.jpnprd01.prod.outlook.com> In-Reply-To: <TYAPR01MB6378C37C45474FA50408061CBCEFA@TYAPR01MB6378.jpnprd01.prod.outlook.com> From: David Marchand <david.marchand@redhat.com> Date: Wed, 6 Sep 2023 10:41:00 +0200 Message-ID: <CAJFAV8yp_13mR9J+-sc3j52WgkvB-8BPeabpGtk4J-YjXZiFsQ@mail.gmail.com> Subject: Re: Implementing a simple TAP PMD to dpdk-vhost structure To: =?UTF-8?B?Tmljb2xzb24gS2VuICjjg4vjgrPjg6vjgr3jg7Mg44Kx44OzKQ==?= <ken.nicolson@jp.panasonic.com> Cc: "users@dpdk.org" <users@dpdk.org>, Maxime Coquelin <maxime.coquelin@redhat.com>, "Xia, Chenbo" <chenbo.xia@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions <users.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/users>, <mailto:users-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/users/> List-Post: <mailto:users@dpdk.org> List-Help: <mailto:users-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/users>, <mailto:users-request@dpdk.org?subject=subscribe> Errors-To: users-bounces@dpdk.org On Wed, Sep 6, 2023 at 9:53=E2=80=AFAM Nicolson Ken (=E3=83=8B=E3=82=B3=E3= =83=AB=E3=82=BD=E3=83=B3 =E3=82=B1=E3=83=B3) <ken.nicolson@jp.panasonic.com> wrote: > > Alternatively, did you consider using testpmd with the vhost pmd instea= d ? > > I've tried that before, but as far as I can see from net/vhost/rte_eth_ho= st.c it uses rte_vost_enqueue/dequeue_burst() to basically act as a loopbac= k for the Guest OS. I use: > > $ sudo dpdk-testpmd -l 0-3 -n 4 --vdev 'net_tap0' --vdev 'net_vhost1,ifac= e=3D/tmp/sock0,client=3D1' -- -i > > But if I feed data in using "tcpreplay -I dtap0 ...", "show port stats al= l" shows everything going into the TAP but nothing is forward to vhost. Well, pinging from a dtap0 netdev in the host to a virtio-net netdev in a guest works me. testpmd> set verbose 3 Change verbose level from 0 to 3 testpmd> start io packet forwarding - ports=3D2 - cores=3D1 - streams=3D2 - NUMA support enabled, MP allocation mode: native Logical Core 1 (socket 1) forwards packets on 2 streams: RX P=3D0/Q=3D0 (socket 0) -> TX P=3D1/Q=3D0 (socket 0) peer=3D02:00:00:00= :00:01 RX P=3D1/Q=3D0 (socket 0) -> TX P=3D0/Q=3D0 (socket 0) peer=3D02:00:00:00= :00:00 port 0/queue 0: received 16 packets src=3D26:9B:E2:29:7E:C6 - dst=3D33:33:00:00:00:16 - pool=3Dmb_pool_0 - type=3D0x86dd - length=3D90 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV6_EXT - sw ptype: L2_ETHER L3_IPV6_EXT - l2_len=3D14 - l3_len=3D48 - Receive queue=3D0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN src=3D26:9B:E2:29:7E:C6 - dst=3D33:33:00:00:00:16 - pool=3Dmb_pool_0 - type=3D0x86dd - length=3D90 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV6_EXT - sw ptype: L2_ETHER L3_IPV6_EXT - l2_len=3D14 - l3_len=3D48 - Receive queue=3D0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN src=3D26:9B:E2:29:7E:C6 - dst=3D33:33:FF:29:7E:C6 - pool=3Dmb_pool_0 - type=3D0x86dd - length=3D86 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV6 - s= w ptype: L2_ETHER L3_IPV6 - l2_len=3D14 - l3_len=3D40 - Receive queue=3D0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN Are you seeing the vhost port getting initialised in testpmd output? How are you sure that nothing is forwarded? --=20 David Marchand