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 4CEBA41F50 for ; Tue, 11 Jun 2024 19:10:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97CAF40698; Tue, 11 Jun 2024 19:10:19 +0200 (CEST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mails.dpdk.org (Postfix) with ESMTP id 3DA944021F for ; Tue, 11 Jun 2024 19:10:18 +0200 (CEST) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2ebe3bac675so352911fa.1 for ; Tue, 11 Jun 2024 10:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1718125817; x=1718730617; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7jIhVu0QdcJwBA/UKXx2x0jwAUjhhXr1JeYj2m0avTw=; b=MoHAyfxeUOnt30+Fun1qByhwf5CeD65m5kFE4RsNbsCHUggdW9XMJAYZ4hM/+FbZce 60dGYc/4xmGlr2zekMT8/SyfBzpyHPPGUF1A8Zpc+4fqCZB8Zrn9rajKvOZRV6xn30GX zazuuyW5UMZQlvS8fAGG4UqjC32gPIMk4enT8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718125817; x=1718730617; 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=7jIhVu0QdcJwBA/UKXx2x0jwAUjhhXr1JeYj2m0avTw=; b=USelYtwj5ePtMe13fNhCIqIbH0jYqjJgLMyNG8QbZB4iig2Kxr+6Nlm9qNg4d4fM1j Y/qFaB0EKI0sAr0r60K3FsxMNrRrheA711wpOSHf4Wf2jkXVGhEDXQsd1wbyBBw+BILn PlUXbUnj7Bcp/PSYVh4MXhjKsIeb4lvQM1xyUgYrpJ+e7yggnaXzkx0l7kpTxf500w+c PHRia9Q02indPEyzLcCDEBkRO3U+X/UcNynBD2wWaJv1nWTBD51jYf8e9M4VVd7ggZO2 iODDPS2w+wmJcTbb5P90eZEPzA+dfjcrej719zdwcZnK055+N7TkH9vp11nYs6yEtRId qszQ== X-Gm-Message-State: AOJu0YzfXLtXi8OInldcI1lzWJRjFhWb9kc/bfINSlohS00JTr+h5h76 6FBIYvg9PJCqAgeBmwZxhG4QsmYl/TjWZ6ShrnBXHAVEg9RWoxUSGyBy+chvRuyatOi7U9hAxxb 4J+NibS/seq3GLubEigGJ/+Wka2aJkfDVo1THlFqd2LyUngA4/JbdHsjZNYO5ERpQnNJ9NuzmeQ 4oTOqthUM= X-Google-Smtp-Source: AGHT+IFdaqB8/HV+SkHTLLDjeME1QQJTqlt5tH8Nc9/aY4cmy7QrazY4Y8C85QYtP63VULFtpzupZby6fnki6KeJD5k= X-Received: by 2002:a05:651c:503:b0:2eb:f17a:6c14 with SMTP id 38308e7fff4ca-2ebf17a6d04mr12949941fa.22.1718125817595; Tue, 11 Jun 2024 10:10:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nandini Rangaswamy Date: Tue, 11 Jun 2024 10:10:06 -0700 Message-ID: Subject: Re: Compiling testpmd with DPDK netvsc PMD To: David Marchand Cc: users@dpdk.org, Stephen Hemminger Content-Type: multipart/alternative; boundary="00000000000009f0d3061aa0572e" 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 --00000000000009f0d3061aa0572e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi David, It was a misunderstanding on my part. I had assumed that since the libraries were not dynamically linked and not showing up in ldd output, testpmd was probably not using netvsc. After looking at the comments in config/meson.build " NOTE: DPDK always builds both shared and static libraries. Please set "default_library" to either "static" or "shared" to select default linkage for apps and any examples.''')", I inferred that the libraries were being linked statically. Following this, i changed the default options in meson.build default_library=3Dshared from static and added deps in testpmd/meson.build file as below: +if dpdk_conf.has('RTE_NET_NETVSC') + deps +=3D 'net_netvsc' +endif Now ldd dpdk-testpmd shows netvsc pmd being linked dynamically and also functional at run time. Regards, Nandini On Mon, Jun 10, 2024 at 12:51=E2=80=AFAM David Marchand wrote: > Hello, > > On Sat, Jun 8, 2024 at 1:32=E2=80=AFAM Nandini Rangaswamy > wrote: > > Thanks for your email. I inspected meson build output and do see that > netvsc is in the list of enabled drivers. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Drivers Enabled > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > common: > > iavf, mlx5, qat, > > bus: > > auxiliary, pci, vdev, vmbus, > > mempool: > > bucket, ring, stack, > > dma: > > > > net: > > af_packet, bond, e1000, ena, failsafe, gve, i40e, iavf, > > ice, igc, ixgbe, kni, mlx5, netvsc, ring, tap, > > vdev_netvsc, vhost, virtio, vmxnet3, > > Ok, so the driver seems indeed part of this build, yet it was not > functional at runtime? > Could you confirm this driver was indeed embeeded in (*statically* > linked) testpmd? > $ ./usertools/dpdk-pmdinfo.py build/app/dpdk-testpmd | grep -i vsc > "name": "net_netvsc", > "name": "net_vdev_netvsc", > > > > > > Also, i changed the meson.build default_library=3Dshared from static an= d > it worked. > > Mm, the fact that changing link mode fixes the issue points at a link > issue. > > There is a bug with old pkg-config tool (<=3D 0.27 iirc) that does not > process correctly dpdk .pc (for static link). > It is worth checking which version of pkgconf is used in openwrt. > > > -- > David Marchand > > --=20 This electronic communication and the information and any files transmitted= =20 with it, or attached to it, are confidential and are intended solely for=20 the use of the individual or entity to whom it is addressed and may contain= =20 information that is confidential, legally privileged, protected by privacy= =20 laws, or otherwise restricted from disclosure to anyone else. If you are=20 not the intended recipient or the person responsible for delivering the=20 e-mail to the intended recipient, you are hereby notified that any use,=20 copying, distributing, dissemination, forwarding, printing, or copying of= =20 this e-mail is strictly prohibited. If you received this e-mail in error,= =20 please return the e-mail to the sender, delete it from your computer, and= =20 destroy any printed copy of it. --00000000000009f0d3061aa0572e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi David,
It was a misunderstanding on my part. I had = assumed that since the libraries=C2=A0were not dynamically linked and not s= howing=C2=A0up in ldd output, testpmd was probably not using netvsc.
<= div>After looking at the comments in config/meson.build " NOTE: DPDK a= lways builds both shared and static libraries.=C2=A0 Please set "defau= lt_library" to either "static" or "shared" to sele= ct default linkage
=C2=A0for apps and any examples.''')&qu= ot;, I inferred that the libraries were being linked statically.=C2=A0
=
Following this, i changed the default options in meson.build defau= lt_library=3Dshared from static=C2=A0and added deps in testpmd/meson.build = file as below:

+if dpdk_conf.has('RTE_NET_NETV= SC')
+ =C2=A0 =C2=A0deps +=3D 'net_netvsc'
+endif
Now ldd dpdk-testpmd=C2=A0 shows netvsc pmd being linked dynam= ically and also functional at run time.
Regards,
Nandin= i

On Mon, Jun 10, 2024 at 12:51=E2=80=AFAM David Marchand <david.marchand@redhat.com> wro= te:
Hello,

On Sat, Jun 8, 2024 at 1:32=E2=80=AFAM Nandini Rangaswamy
<na= ndini.rangaswamy@broadcom.com> wrote:
> Thanks for your email. I inspected meson build output and do see that = netvsc is in the list of enabled drivers.
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Drivers Enabled
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> common:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0iavf, mlx5, qat,
> bus:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0auxiliary, pci, vdev, vmbus,
> mempool:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bucket, ring, stack,
> dma:
>
> net:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0af_packet, bond, e1000, ena, failsafe= , gve, i40e, iavf,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ice, igc, ixgbe, kni, mlx5, netvsc, r= ing, tap,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vdev_netvsc, vhost, virtio, vmxnet3,<= br>
Ok, so the driver seems indeed part of this build, yet it was not
functional at runtime?
Could you confirm this driver was indeed embeeded in (*statically*
linked) testpmd?
$ ./usertools/dpdk-pmdinfo.py build/app/dpdk-testpmd | grep -i vsc
=C2=A0 =C2=A0 "name": "net_netvsc",
=C2=A0 =C2=A0 "name": "net_vdev_netvsc",


>
> Also, i changed the meson.build default_library=3Dshared from static a= nd it worked.

Mm, the fact that changing link mode fixes the issue points at a link issue= .

There is a bug with old pkg-config tool (<=3D 0.27 iirc) that does not process correctly dpdk .pc (for static link).
It is worth checking which version of pkgconf is used in openwrt.


--
David Marchand


This ele= ctronic communication and the information and any files transmitted with it= , or attached to it, are confidential and are intended solely for the use o= f the individual or entity to whom it is addressed and may contain informat= ion that is confidential, legally privileged, protected by privacy laws, or= otherwise restricted from disclosure to anyone else. If you are not the in= tended recipient or the person responsible for delivering the e-mail to the= intended recipient, you are hereby notified that any use, copying, distrib= uting, dissemination, forwarding, printing, or copying of this e-mail is st= rictly prohibited. If you received this e-mail in error, please return the = e-mail to the sender, delete it from your computer, and destroy any printed= copy of it. --00000000000009f0d3061aa0572e--