DPDK usage discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "David Marchand" <david.marchand@redhat.com>,
	"Nicolson Ken (ニコルソン ケン)" <ken.nicolson@jp.panasonic.com>
Cc: "users@dpdk.org" <users@dpdk.org>, "Xia, Chenbo" <chenbo.xia@intel.com>
Subject: Re: Implementing a simple TAP PMD to dpdk-vhost structure
Date: Wed, 6 Sep 2023 09:15:50 +0200	[thread overview]
Message-ID: <ecc583e5-df02-c7c1-5427-e9b7becc0389@redhat.com> (raw)
In-Reply-To: <CAJFAV8wMPNDiLCJeNe6tCFCnWNyrm8ge=tO1=2QC0WYa7SFqyA@mail.gmail.com>



On 9/6/23 08:07, David Marchand wrote:
> Hello Ken,
> 
> On Wed, Sep 6, 2023 at 3:56 AM Nicolson Ken (ニコルソン ケン)
> <ken.nicolson@jp.panasonic.com> 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


  reply	other threads:[~2023-09-06  7:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  1:56 Nicolson Ken (ニコルソン ケン)
2023-09-06  6:07 ` David Marchand
2023-09-06  7:15   ` Maxime Coquelin [this message]
2023-09-06  8:28     ` Nicolson Ken (ニコルソン ケン)
2023-09-06  8:43       ` Maxime Coquelin
2023-09-06  7:52   ` Nicolson Ken (ニコルソン ケン)
2023-09-06  8:41     ` David Marchand
2023-09-07  6:22       ` Nicolson Ken (ニコルソン ケン)
2023-09-07  7:21         ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecc583e5-df02-c7c1-5427-e9b7becc0389@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=ken.nicolson@jp.panasonic.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).