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 26F8546269 for ; Wed, 19 Feb 2025 14:40:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BB8140E39; Wed, 19 Feb 2025 14:40:14 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 539264003C for ; Wed, 19 Feb 2025 14:40:13 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2fc291f7ddbso8267338a91.1 for ; Wed, 19 Feb 2025 05:40:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739972412; x=1740577212; 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=W4ZEa0LBoIfeoYn6TL+n07HHPXkLfXsEMPgnllBiRZc=; b=bq6i9n6/IMrd5eoNhh/hXZGZt1GnNbhMk54ZO3Q9KkHGELwZkrWnAh7mui8xOVqvEy 6Ro14s8dDBjSaovtX0iqcoCg0xE2PaRgLjX9xyV7uJggBi368jMvfeAoFKnFVmGLtwWy O85fF8UgJxCeDLGevOseFQBN7w1YIOKIgqEv+XVogWvMcYxevfOT1c2uA42NQ/ipVZG8 zAP7aj0YzNwsdAhTysIv7XxcVk6gEG4uVEoyK56S2qqEN6u6nU7yBVjQC1+if2CRhud5 YICflhjkSs1eHTBuPOJ9HgrrYxUYz+clsOuG5nWCt1XNL23acszgAvmMD4A5tg32d/Bp GyXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739972412; x=1740577212; 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=W4ZEa0LBoIfeoYn6TL+n07HHPXkLfXsEMPgnllBiRZc=; b=v4ts1XJ/fVLLlovtSI6jGZaYvsLaFhr8z0cJsI4FhBVkkhBc+Sy5GRDYkkYJjQ2g2o SP7McRueo7HJzF/DuFp/c3g5gTOqmjyvzkSJvvnHIt/ce5m9aWqqIPbdKElp4atvmo/g tvVzO1rcN23Fu3xS9BvdjaqYfrGl4Vrxv7cLyHk/1wKax0xk5kSWcdWYf5LBi54zdtWQ x+9eqV/My+o5MCFUNsaGv6JrbECO5B4n/q7p+hz/ruIc8ZGGerGGpS4Wxp90whzDpee0 1mL+ftPwQtcg1OA6SIyA7BAqWdWjs7uxw0MVFixk1zdHkKLh+7wN9r3/TYEcKXMNV/E9 bZNg== X-Gm-Message-State: AOJu0Yx52AwLGMZ+tcvPTl6BVi6jbhXlu1ssIxc4kC8z9fB/ldvba076 kmrq4LoYRAjJpY+oovNACicO+2aYHZiu0oDfcdyokw7cWQFsFUIlhZ0TSDJjKt/ACHL9jbAvXRw hqxv782OdVBGEixMNFpZBqlhn4zm8s1lW X-Gm-Gg: ASbGnctlbsxS5qUXOXKyIT6pzg3f/o1zzfYUMwe+nff4BSBQghBhJhZRDnQwl44Dcxo +DTVFHMZMN+nWoqgsD69u2uZ/O1BTrraTW6LbTyEDY9yoC1hSlyNNVCnCW1rQIa7SNX0A0MMpUQ NQAmsr+4ZSWIyXbHNp7A3Bt5jX9bu20jA= X-Google-Smtp-Source: AGHT+IE6foAX+Aozz/WO0wtMlsZ9XiIRgTVbeJaaEaqIT7JmxEGYp3gbcnp4M4yHhvkj3YnSuFVjrH07OI6ZzdGm7aI= X-Received: by 2002:a17:90b:4c45:b0:2ee:964e:67ce with SMTP id 98e67ed59e1d1-2fc40d131cbmr27553039a91.3.1739972412079; Wed, 19 Feb 2025 05:40:12 -0800 (PST) MIME-Version: 1.0 References: <20250217075819.5d9af8df@hermes.local> In-Reply-To: From: Lokesh Chakka Date: Wed, 19 Feb 2025 19:09:56 +0530 X-Gm-Features: AWEUYZn008zuL8jTPXLVgIuY1yCboEknQ_39xe1QWxSDUY8KMkeolI9_mbBcV4c Message-ID: Subject: Re: rte_eth_dev_stop crashing consistently To: Stephen Hemminger Cc: users Content-Type: multipart/alternative; boundary="0000000000008a8a97062e7ee598" 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 --0000000000008a8a97062e7ee598 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stephen, please refer to https://bitbucket.org/chakkadotlokesh/learning_dpdk/src/main/pmd_tx_rx.c at line number 39, ref count of all the mbufs are 2 after rte_eth_tx_burst, pkts_sent packets ref count is supposed to be 1 and rest all should be 2. hence I'm updating by 1. But the observation is that ref count is growing even beyond 100 for many packets.(line number 47) Because ref count is huge, memory is still not released( after line 255, 256). Hence rte_eth_dev_stop is crashing. Could you please help me understand how to handle this situation. Thanks & Regards -- Lokesh Chakka. On Tue, Feb 18, 2025 at 9:48=E2=80=AFAM Lokesh Chakka wrote: > hi, > > I've done the build with "meson setup build --buildtype=3Ddebug". > I'm seeing a lot function names if I do "file build/lib/librte_eal.so" > version I'm working on is dpdk-stable-24.11.1 > > Inside, the code I've set rte_log_set_global_level(RTE_LOG_DEBUG); > while compiling the code, I've included "-lrte_eal -lrte_log -lrte_mbuf > -lrte_ethdev -lrte_me mpool -mssse3" libraries. > Still I'm seeing only generic EAL Logs. > > while executing, I'am using the command "sudo pmd_tx_rx -l 0-3 -n 4 > --log-level=3D8" > > still I'am always seeing only the following lines : > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > 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: Using IOMMU type 1 (Type 1) > ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.39.1, ICE OS Defaul= t > Package (single VLAN mode) > ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.39.1, ICE OS Defaul= t > Package (single VLAN mode) > tx_all_threads_function 188 pkt size: 1500 > ICE_DRIVER: ice_set_rx_function(): Using AVX2 Vector Rx (port 0). > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > could you please let me know if any more debug flags to be provided.... > > > Thanks & Regards > -- > Lokesh Chakka. > > > On Mon, Feb 17, 2025 at 9:28=E2=80=AFPM Stephen Hemminger < > stephen@networkplumber.org> wrote: > >> On Mon, 17 Feb 2025 18:36:07 +0530 >> Lokesh Chakka wrote: >> >> > Hello, >> > >> > I've written a few pieces of code for sending and receiving packets. >> > Here is the link for the same. >> > >> > If I try running only pmd_tx.c or only pmd_rx.c, I'm not seeing any >> crashes. >> > But if the same code is copied into dpdk_tx_rx.c, I'm seeing a >> consistent >> > crash. >> > >> > Can someone help me understand what I'm doing wrong? >> > >> > >> > Thanks & Regards >> > -- >> > Lokesh Chakka. >> >> This is all your own code, so it is up to you to debug it. >> Did you try running in debugger (gdb) and/or enabling some of the debug >> flags in the DPDK build. The debug flags will cause more of the code pat= hs >> to validate arguments. >> > --0000000000008a8a97062e7ee598 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Stephen,

please refer to<= /div>


=
at line number 39, ref count of all the mbufs are 2
after rt= e_eth_tx_burst, pkts_sent packets ref count is supposed to be 1 and rest al= l should be 2.
hence I'm updating by 1.

<= div>But the observation is that ref count is growing even beyond 100 for ma= ny packets.(line number 47)
Becau= se ref count is huge, memory is still not released( after line 255, 256). H= ence rte_eth_dev_stop is crashing.

Could you please help me understand how to handle this situat= ion.


Thanks & Regards
--
Lokes= h Chakka.
=

On Tue, Feb 18, 2025 at 9:48=E2=80=AFAM Lokesh Chakka <lvenkatakumarchakka@g= mail.com> wrote:
hi,

I've done th= e build with "meson setup build --buildtype=3Ddebug".
<= div>I'm seeing a lot function names if I do "file build/lib/librte= _eal.so"
version I'm working on is dpdk-stable-24.11.1

Inside, the code I've set rte_log_set_global_le= vel(RTE_LOG_DEBUG);
while compiling the code, I've included &= quot;-lrte_eal -lrte_log -lrte_mbuf -lrte_ethdev -lrte_me =C2=A0 =C2=A0mpoo= l -mssse3" libraries.
Still I'm seeing only generic EAL = Logs.

while executing, I'am using the com= mand "sudo pmd_tx_rx -l 0-3 -n 4 --log-level=3D8"

<= /div>
still I'am always seeing only the following lines :

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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: Using IOMMU= type 1 (Type 1)
ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.3= 9.1, ICE OS Default Package (single VLAN mode)
ICE_INIT: ice_load_pkg_ty= pe(): Active package is: 1.3.39.1, ICE OS Default Package (single VLAN mode= )
tx_all_threads_function 188 pkt size: 1500
ICE_DRIVER: ice_set_rx_f= unction(): Using AVX2 Vector Rx (port 0).
=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D

could you please let me know if any more debug= flags to be provided....


Thanks & Regards
--
Lok= esh Chakka.


On Mon, Feb 17, 2025 at 9:28=E2=80=AFPM Stephen Hemminger <stephen@networkplu= mber.org> wrote:
On Mon, 17 Feb 2025 18:36:07 +0530
Lokesh Chakka <lvenkatakumarchakka@gmail.com> wrote:

> Hello,
>
> I've written a few pieces of code for sending and receiving packet= s.
> Here is the link for the same.
>
> If I try running only pmd_tx.c or only pmd_rx.c, I'm not seeing an= y crashes.
> But if the same code is copied into dpdk_tx_rx.c, I'm seeing a con= sistent
> crash.
>
> Can someone help me understand what I'm doing wrong?
>
>
> Thanks & Regards
> --
> Lokesh Chakka.

This is all your own code, so it is up to you to debug it.
Did you try running in debugger (gdb) and/or enabling some of the debug
flags in the DPDK build. The debug flags will cause more of the code paths<= br> to validate arguments.
--0000000000008a8a97062e7ee598--