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 3486943005 for ; Tue, 8 Aug 2023 05:23:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A872243247; Tue, 8 Aug 2023 05:23:14 +0200 (CEST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by mails.dpdk.org (Postfix) with ESMTP id EF86A40A87 for ; Tue, 8 Aug 2023 05:23:12 +0200 (CEST) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2b9b6e943ebso74704071fa.1 for ; Mon, 07 Aug 2023 20:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691464992; x=1692069792; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=dG0TA4Zpc0DA73+8NL2/HKKXSUgfdsWh/mcPvIeYLfk=; b=MkotyZdqjgGXSbNdTNG6UP+x7fP1Mm8sIO+S2VtnPa76UcEdKaLfzpm7db5iIzLCNc MQQ9zTHIPy5fksRj/7VHZXBC/hUlNTD2eaHP5IqQOGZo7umOs5buPq2jxzQWUL4yDBa7 vXeqeGfNgeq3uPe0/1Q2pTg/W8pyWqFutOYwJVENh8v+yd3Imd0y1gGswnmbHAmyDve+ EYs7ANAE1YXPYT4zB2uyIu+U0YZVIozBHdfu7fNzdxJRowKBuu5AnlcNrP2yBXNl6QF9 8QQy4LAvdj0hI8o8bjp36RPOsblH6kTPUvNAvCmEG6xDA3h3OabMTIO2faK8K7rtAPTH pNfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691464992; x=1692069792; h=cc: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=dG0TA4Zpc0DA73+8NL2/HKKXSUgfdsWh/mcPvIeYLfk=; b=TF7GkLdGFN4bpgYWrDqSdzVoaBBgQEu2f2jP4FH/Hyx8NrT+6SdFtWcdxs/QZQenQk 5W7qZ1ySOpycgFdp8+4lLnJXUiLeujvHJxJ7RKWcpdjr1BuJ1KWkTsHjJvtoPMF99B9e fzMw94KEaBmgehlHeoVT2z7L2DAF/s9/8aTiAcKM1NJYCue8uPVGblkdpuNNJvJiXaqx HIcb1xePKR2Y9mX/sFYjjHQZAsidk0I+JXJh2Hi9J/A2T9oBTJRLOPWa4slLwt9cOA5E 3iOM2NTT7Y5+Ewlc8zwB89XsHyo6axy+Kp8QOXS9e8O3es4MHht3cWG6Ip/hOtJ6LSDn 6YWg== X-Gm-Message-State: AOJu0Yw6mErZQNc9AzZZe3y1yittU8HVXJa1MMFmskRN6uIju6JDZBqr +l6TInVXG4VAvEMJij4fbzVldi6V2DX/2ajdl8oxaf5qCAE= X-Google-Smtp-Source: AGHT+IGLH3h3HO7C6zBPtm6PNB4ErHDCqFNgdEHmQU7a2kejBJJnSB11rpDWdnrgsTqWYkiLQuMmw0jN0dX134KgTwo= X-Received: by 2002:a05:6512:ea3:b0:4fd:daa0:aed8 with SMTP id bi35-20020a0565120ea300b004fddaa0aed8mr3141908lfb.4.1691464991833; Mon, 07 Aug 2023 20:23:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fuji Nafiul Date: Tue, 8 Aug 2023 09:23:01 +0600 Message-ID: Subject: Fwd: Help Running Example Cc: users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000fd0356060260e192" 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 --000000000000fd0356060260e192 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ---------- Forwarded message --------- From: Fuji Nafiul Date: Tue, Aug 8, 2023 at 9:22=E2=80=AFAM Subject: Re: Help Running Example To: Alan Beadle In the case of the " number of ports must be even " error, it's a simple one. if you look into the code, you will see that it is checking for the number of ports and it is giving an error if the port number is not even as the skeleton app mainly receives packet on 1 port and forward them to a different port (as far as I remember). So, for the sake of simplicity, if you have odd numbers of ports or just a single port, don't worry, just comment out the port number checking and you can even comment out the tx part ( rte_eth_tx_burst() ) and rather free all received packets. Then run and monitor the packet counting which will give you a kick start and later you can try replying to arp requests to expose IP by which you will be able to establish udp/tcp connection.. I suggest try udp first (I also only worked with UDP in dpdk) and you will get a lot of help about this from "bond" app in the official examples. On Sun, Aug 6, 2023 at 9:34=E2=80=AFPM Alan Beadle wr= ote: > Hi, > > I need some help getting DPDK working. I am running Ubuntu 20.04 with > a modified Linux 5.4 kernel, but I have also tried the stock Ubuntu > 5.15 kernel with the same results. > > Here is my NIC info from lspci: > 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (3) > I219-LM (rev 09) > > I built and installed DPDK from source, and applied the following boot > flags: "intel_iommu=3Don iommu=3Dpt" > > After booting I did the following as root: > echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages > ifconfig enp0s31f6 down > dpdk-devbind.py --bind=3Dvfio-pci 0000:00:1f.6 > > All of this appeared to work. > > I tried running the "skeleton" example program and got the following > output: > sudo ./build/basicfwd > EAL: Detected CPU lcores: 16 > EAL: Detected NUMA nodes: 1 > EAL: Detected shared linkage of DPDK > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > EAL: Selected IOVA mode 'VA' > EAL: VFIO support initialized > EAL: 0000:00:1f.6 VFIO group is not viable! Not all devices in IOMMU > group bound to VFIO or unbound > EAL: Requested device 0000:00:1f.6 cannot be used > TELEMETRY: No legacy callbacks, legacy socket not created > EAL: Error - exiting with code: 1 > Cause: Error: number of ports must be even > > I'm not at all familiar with DPDK or VFIO. What might the problem be? > > -Alan > --000000000000fd0356060260e192 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


---------- Forwarded message ---------
From: Fuji Nafiul <nafiul.fuji@gmail.com>= ;
Date: Tue, Aug 8, 2023 at 9:22=E2=80=AFAM
Subject: Re: Help = Running Example
To: Alan Beadle <ab.beadle@gmail.com>


In the cas= e of the " number of ports must be even " error, it's a simple one. if you lo= ok into the code, you will see that it is checking for the number of ports = and it is giving an error if the port number is not even as the skeleton ap= p mainly receives packet on 1 port and forward them to a different port (as= far as I remember). So, for the sake of simplicity, if you have odd number= s of ports or just a single port, don't worry, just comment out the por= t number checking and you can even comment out the tx part ( rte_eth_tx_bur= st() ) and rather free all received packets. Then run and monitor the packe= t counting which will give you a kick start and later you can try replying = to arp requests to expose IP by which you will be able to establish udp/tcp= connection.. I suggest try udp first (I also only worked with UDP in dpdk)= and you will get a lot of help about this from "bond" app in the= official=C2=A0examples.=C2=A0

On Sun, Aug 6, 2023 at 9:34=E2=80=AFPM Alan B= eadle <ab.beadl= e@gmail.com> wrote:
Hi,

I need some help getting DPDK working. I am running Ubuntu 20.04 with
a modified Linux 5.4 kernel, but I have also tried the stock Ubuntu
5.15 kernel with the same results.

Here is my NIC info from lspci:
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (3)
I219-LM (rev 09)

I built and installed DPDK from source, and applied the following boot
flags: "intel_iommu=3Don iommu=3Dpt"

After booting I did the following as root:
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
ifconfig enp0s31f6 down
dpdk-devbind.py --bind=3Dvfio-pci 0000:00:1f.6

All of this appeared to work.

I tried running the "skeleton" example program and got the follow= ing output:
sudo ./build/basicfwd
EAL: Detected CPU lcores: 16
EAL: Detected NUMA nodes: 1
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
EAL: 0000:00:1f.6 VFIO group is not viable! Not all devices in IOMMU
group bound to VFIO or unbound
EAL: Requested device 0000:00:1f.6 cannot be used
TELEMETRY: No legacy callbacks, legacy socket not created
EAL: Error - exiting with code: 1
=C2=A0 Cause: Error: number of ports must be even

I'm not at all familiar with DPDK or VFIO. What might the problem be?
-Alan
--000000000000fd0356060260e192--