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 B7B3F4301A for ; Wed, 9 Aug 2023 19:36:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32CEF40DDB; Wed, 9 Aug 2023 19:36:13 +0200 (CEST) Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by mails.dpdk.org (Postfix) with ESMTP id 01407400D6 for ; Wed, 9 Aug 2023 19:36:11 +0200 (CEST) Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-55e1a9ff9d4so750847eaf.1 for ; Wed, 09 Aug 2023 10:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691602571; x=1692207371; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=w+C7+tndLdec51HDd0CrJitrBN8dp4ObNmIa90BrKlc=; b=UFb6XWx/KyqQSmyNGgH83F7UcVVuCKj81TXVhBrUaymiksA1ZcpsGlZ5P2fmqWay5X lNNic0WlQ2zxom6sbDv4v6dJZr/hrnQJ86A5ODoIBxfexzoNeGCpuGYsAEGvl3/Jhryq W3av+0RN2s9QbKt1MDx09Fyfx5rDofCqO8AZGJUY5Lz+QsAsr1ENo9uC+7rKLHNHRHrv aBRyGnLEmujBYuFxx3NSbSWpXwr7YUyMAGINCHnCQRk/6i1LYq1uOQzvcvq5oB8E8xIm MEOAqVwe2DxhrH9OhtxTu+JuC3MXT/8j8OYPsXlg2t3OE9B/8Ed120DOpZSjpXJQ5ioA dDJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691602571; x=1692207371; 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=w+C7+tndLdec51HDd0CrJitrBN8dp4ObNmIa90BrKlc=; b=DQ7KDhdFfdAL/Fe6T3PcRrr79gSg2vs0NgVx1d53wVoR3gkwRkB7+iLfQ2xWLzmkJu uKPIm93CeHutREpvGf/Pvi3cjXdcp1DaEy57VHqtc2KB+gSW0fPK36z4peYJ9E0/b22D zhJcBfRvAaBz73vT5DTYCizBRl8t/CuC9Ekv374NHNzzOBKCpjwx7jS9pjKrXvL4kU+I UINVEP3sm8eEP5Ny1UKxcx9LcsjIXA0q+ekrw74aoxbJTqZsbz4frYMBWfhpOGjj1fvS FJLK0D2KyPGKBf8++vW4rfirOM+SGUy0iczzCCBFMgeF2c+MykBAPUjTC7P1dm6vxaUG EeYA== X-Gm-Message-State: AOJu0YzeEqxxE2iJAFR7/NfUzAovPDOf8BvMiXs+aO1ZufhhbCUwK1ov XgrKMtnsPtd4SXOA56D4kkzl2AbU8ZMwHFDhNUk= X-Google-Smtp-Source: AGHT+IFkfG1gHX4H/3ZT6I7RVGuB6B306VR2N+jlihz0aj3HKvjsLr6moF30zX6t/gSw+nLGLFtKXr2pdH0csWBKL2Y= X-Received: by 2002:a05:6808:9b3:b0:3a7:6429:b9dd with SMTP id e19-20020a05680809b300b003a76429b9ddmr54010oig.11.1691602570920; Wed, 09 Aug 2023 10:36:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Beadle Date: Wed, 9 Aug 2023 13:35:59 -0400 Message-ID: Subject: Re: Help Running Example To: Fuji Nafiul Cc: users@dpdk.org 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org I'm going to get a dedicated NIC so that I can continue on the other machine, but in the meantime I discovered that one of my old laptops places the ethernet NIC in a unique IOMMU group: 02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetLink BCM57780 Gigabit Ethernet PCIe (rev 01) 1 [ 1.726704] pci 0000:00:01.0: Adding to iommu group 1 1 [ 1.726892] pci 0000:01:00.0: Adding to iommu group 1 2 [ 1.726720] pci 0000:00:02.0: Adding to iommu group 2 3 [ 1.726734] pci 0000:00:14.0: Adding to iommu group 3 4 [ 1.726751] pci 0000:00:16.0: Adding to iommu group 4 5 [ 1.726764] pci 0000:00:1a.0: Adding to iommu group 5 6 [ 1.726778] pci 0000:00:1b.0: Adding to iommu group 6 7 [ 1.726792] pci 0000:00:1c.0: Adding to iommu group 7 8 [ 1.726805] pci 0000:00:1c.1: Adding to iommu group 8 9 [ 1.726818] pci 0000:00:1c.2: Adding to iommu group 9 10 [ 1.726833] pci 0000:00:1d.0: Adding to iommu group 10 11 [ 1.726859] pci 0000:00:1f.0: Adding to iommu group 11 11 [ 1.726872] pci 0000:00:1f.2: Adding to iommu group 11 11 [ 1.726886] pci 0000:00:1f.3: Adding to iommu group 11 12 [ 1.726905] pci 0000:02:00.0: Adding to iommu group 12 13 [ 1.726920] pci 0000:03:00.0: Adding to iommu group 13 14 [ 1.726933] pci 0000:04:00.0: Adding to iommu group 14 After following the same steps on this machine, and commenting out the port counting as suggested, I have a new error: EAL: Detected CPU lcores: 4 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 TELEMETRY: No legacy callbacks, legacy socket not created EAL: Error - exiting with code: 1 Cause: Cannot create mbuf pool Based on my research, it looks like this can be caused by a lack of hugepag= es. Here is an excerpt from /proc/meminfo: HugePages_Total: 1024 HugePages_Free: 1024 HugePages_Rsvd: 0 HugePages_Surp: 0 Which seems fine to me. Any idea what might be causing this problem? Thanks again. On Mon, Aug 7, 2023 at 11:25=E2=80=AFPM Fuji Nafiul = wrote: > > 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 nu= mber of ports and it is giving an error if the port number is not even as t= he skeleton app mainly receives packet on 1 port and forward them to a diff= erent port (as far as I remember). So, for the sake of simplicity, if you h= ave odd numbers of ports or just a single port, don't worry, just comment o= ut 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 establi= sh udp/tcp connection.. I suggest try udp first (I also only worked with UD= P 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 = 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 following out= put: >> 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