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 21206A0093; Mon, 7 Mar 2022 09:26:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE4BD41165; Mon, 7 Mar 2022 09:26:40 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 42B234068F for ; Mon, 7 Mar 2022 09:26:39 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 1C8F4A00BE; Mon, 7 Mar 2022 09:26:39 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 951] net/mlx5: error when using rte_pktmbuf_attach_extbuf Date: Mon, 07 Mar 2022 08:26:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 21.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bmerry@sarao.ac.za X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org https://bugs.dpdk.org/show_bug.cgi?id=3D951 Bug ID: 951 Summary: net/mlx5: error when using rte_pktmbuf_attach_extbuf Product: DPDK Version: 21.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: bmerry@sarao.ac.za Target Milestone: --- Created attachment 195 --> https://bugs.dpdk.org/attachment.cgi?id=3D195&action=3Dedit Sample code illustrating the bug This is related to #949, but directly attaching external memory to each pac= ket rather than letting a mempool manage the external memory (because in my act= ual application I want to transmit specific memory in each packet). I haven't b= een able to find much documentation, so let me know if I'm just using it wrong. The attached sample application allocates some external memory using mmap, = then attempts to transmit it as payload in a sequence of UDP multicast packets. = It fails and spits out a bunch of files with names like dpdk_mlx5_port_0_txq_0_index_0_2644609052, which contain errors such as Unexpected CQE error syndrome 0x04 CQN =3D 16 SQN =3D 5878 wqe_counter =3D = 0 wq_ci =3D 64 cq_ci =3D 0 MLX5 Error SQ: at [0x1100b5e000], len=3D8192 When run with --log-level debug --log-level *:debug, there are messages like this (one set per packet): mlx5_common: Creating a MR using address (0x7f7a38400000) mlx5_common: Extending 0x7f7a38400000 to [0x7f7a38400000, 0x7f7a38600000), page_sz=3D0x200000, ms_n=3D1 mlx5_common: Unable to allocate memory for a new MR of address (0x7f7a38400000). Unlike #949, this is failing on HEAD (which is at v22.03-rc2). I did a little debugging and the problem seems to be that https://github.com/DPDK/dpdk/blob/v22.03-rc2/drivers/common/mlx5/mlx5_commo= n_mr.c#L722-L724 calls mlx5_malloc with the socket ID from the memory segment, which is some magic value (0x100) for the external memory. Lower down the call stack malloc_socket_to_heap_id fails to find a heap_id for that socket_id. --=20 You are receiving this mail because: You are the assignee for the bug.=