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 1782743005 for ; Tue, 8 Aug 2023 05:25:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F0D143247; Tue, 8 Aug 2023 05:25:46 +0200 (CEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id CD2A540A87 for ; Tue, 8 Aug 2023 05:25:45 +0200 (CEST) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4fe4762173bso8544004e87.3 for ; Mon, 07 Aug 2023 20:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691465145; x=1692069945; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U4QxGLTRmbRJ478vb5NwKbhqxD4hQRD8BB+tCnBb3jQ=; b=BPGxQJjTsGc7GteAiraEfK6nkBYjSPo867+0ewOQmY1EJqgwSMWmay+2SnosPuHADi vW33YWAcboeQnTC08QHDilvA6nSUk6jQWewqe3VbAcrB9Tk/jtgxdl5WPiUR4erOnDl5 LS/T8XG36GNhPgKjV812VdhO1kirMmHSQ/GFrVW8vSVOokUbrwkS9HloKQZa44O6PPe9 OFNPUec+VBItFz8EXTjtxptF6a/L3w4Bp8MHfc3BQmaoFoi8oor3spAm5noRucEs/1oZ XMseRXiFV8V+s5XObzoczbie5NKPbbR3J3TIBSJN3G8+MdsyNWgMflnPhaunxXqWzb8n ug0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691465145; x=1692069945; h=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=U4QxGLTRmbRJ478vb5NwKbhqxD4hQRD8BB+tCnBb3jQ=; b=CYRTOMMeiauW6NYwxm5hruaY873HMzI/Cu01SGxGDxVoLOythMbyShqXDIqiD9ZpJR q5gNBoXzm/JpOOxNlWNTQqZVYn/5HkuQJAOrfKgyVZGu2r/QUSkpxVSY/+b8mYOKlTtb xApLwUY/nn+EeDMQvGap4+W81RttVIpnWcpDBPuBbfNADQ9cZNg5kb/dqqfEDMG1Cog8 oetvkhSlpjfkMP+WIaJ6E3MN+0PRY5bKNtmoYjsHK4rupJEhM0CmGqobMoSFFq8HhGI/ F5qMvqqZIeLSAqmbaAmAiuoqzkE+TQfp49Py7nZgiKp+RMvYyaUbb4vVKcSFBFNdDVWz 4DAA== X-Gm-Message-State: AOJu0Yw3NwU4NEqB4zKWnyBnkvh9pNAzkMyEZ6kaFHkFJpI860r87zf5 css6MalHVVaA6oRuNQesnOvTyx1M/JEng2zk3bA+zFT8Na4Fhw== X-Google-Smtp-Source: AGHT+IH4svOl0hzCY823zS06c0Aze36b3OujG81V0BelmZzyKDYdH7QlPi9eAqOCrpBDqBu1VZImR0gGBfkcQMhNo7Y= X-Received: by 2002:a05:6512:ad5:b0:4fe:a2c:24b0 with SMTP id n21-20020a0565120ad500b004fe0a2c24b0mr7397087lfu.26.1691465144809; Mon, 07 Aug 2023 20:25:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fuji Nafiul Date: Tue, 8 Aug 2023 09:25:34 +0600 Message-ID: Subject: Re: Help Running Example To: Alan Beadle Cc: users@dpdk.org Content-Type: multipart/alternative; boundary="0000000000001b401f060260eb6f" 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 --0000000000001b401f060260eb6f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 > --0000000000001b401f060260eb6f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In the case of the " number of ports must be even &qu= ot; error, it's a simple one. if you look into the code, you will see t= hat 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 po= rt 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 ev= en comment out the tx part ( rte_eth_tx_burst() ) and rather free all recei= ved 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=C2=A0examples.=C2=A0

On Sun, Aug 6, 2023 at 9:34=E2=80=AFPM Alan Beadle <ab.beadle@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
--0000000000001b401f060260eb6f--