From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9EE2242508 for ; Wed, 6 Sep 2023 09:15:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6ECC24029E; Wed, 6 Sep 2023 09:15:57 +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 D66FC4029D for ; Wed, 6 Sep 2023 09:15:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693984555; 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=8cmZJtOFASpoJ5R4RKb/GiU80Zy5tDrvN7tJjtU49to=; b=XiIKyTU3vpOVVxrXw/oAMg+4JGHcA9G/VGlvXYYSQpNMyYrn70ghAGsiWeIKp9JyJsAJ3Y tEY2mTNUIwiotqBtYSnqs/UTl6y7fp3jzK66FgS+sBq0SUJQHlyQzjbPtz24Rmbt7m7XN2 6ROqvPhBEDu6qNrEJ7JfxU66d97ia1w= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-468-A8FTUsF7MiKX5LL_JcM9tQ-1; Wed, 06 Sep 2023 03:15:54 -0400 X-MC-Unique: A8FTUsF7MiKX5LL_JcM9tQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BDE7F38149A5; Wed, 6 Sep 2023 07:15:53 +0000 (UTC) Received: from [10.39.208.8] (unknown [10.39.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1D9B40C2070; Wed, 6 Sep 2023 07:15:52 +0000 (UTC) Message-ID: Date: Wed, 6 Sep 2023 09:15:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Implementing a simple TAP PMD to dpdk-vhost structure To: David Marchand , =?UTF-8?B?Tmljb2xzb24gS2VuICjjg4vjgrPjg6vjgr3jg7Mg44Kx44OzKQ==?= Cc: "users@dpdk.org" , "Xia, Chenbo" References: From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On 9/6/23 08:07, David Marchand wrote: > Hello Ken, > > On Wed, Sep 6, 2023 at 3:56 AM Nicolson Ken (ニコルソン ケン) > wrote: >> >> Hi all, >> >> Using dpdk 22.11.2 on Ubuntu 22.04 >> >> I have a really simple use case, but I cannot find how to implement it. I've set up QEMU with all the required virtio support, so I just need to configure my Host OS-side. I want to send data from a PCAP file via tcpreplay from the Host to the Guest, so I use this command line: >> >> $ sudo /home/integ/dpdk-stable-22.11.2/build/examples/dpdk-vhost -l 0-3 -n 4 --socket-mem 1024 --vdev 'net_tap0' -- --socket-file /tmp/sock0 --client -p 1 >> >> However, this fails with: >> >> EAL: Detected CPU lcores: 20 >> EAL: Detected NUMA nodes: 1 >> EAL: Detected static linkage of DPDK >> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket >> EAL: Selected IOVA mode 'PA' >> VHOST_PORT: Failed to get VMDq info. >> EAL: Error - exiting with code: 1 >> Cause: Cannot initialize network ports >> >> The offending code is from examples/vhost/main.c: >> >> if (dev_info.max_vmdq_pools == 0) { >> RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDq info.\n"); >> return -1; >> } >> >> This is because the TAP PMD doesn't support VMDq pools. >> >> Is there an easy way to get this to work? > > This sounds strange to require VMDq support... > Copying Maxime and Chenbo who probably know better about this example code. > > Alternatively, did you consider using testpmd with the vhost pmd instead ? > > Maybe you could use testpmd application instead, with net_tap PMD and a net_pcap PMD? An alternative to net_tap could be to use Virtio-user PMD with Vhost- kernel backend. Maxime