From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11944A04F3 for ; Fri, 3 Jan 2020 05:52:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 275B81C21E; Fri, 3 Jan 2020 05:52:32 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by dpdk.org (Postfix) with ESMTP id A35921C21C for ; Fri, 3 Jan 2020 05:52:30 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id y17so41317262wrh.5 for ; Thu, 02 Jan 2020 20:52:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1CzENNNKxR+Y4Xm6oCnqvn1Nvu5U9Mf7Blu9g5RjkYM=; b=gvETsf9OaaocahABDZ+IF/vxQGmu8M+zLkbStIkFlKB4wJPdZvgSobCsetWwPPb/th X777/WPGC2fsgvJou40frFq9iO4y2dfbCZ/KlyUh6kb+1316GJ1Erb9UA5oo3NqkKc23 ay2k14tldlIhP1ocryam+3agpDcjBCX1zzGnDcOuLDisOXc/2/1z65IhpFVdKOa2IqlI 8rHKiZAbk6b0kgFDAGSE3xeMJqfxvoij5nJWXOKlv7WJ2OsrMTVplTCOaSIiNhbRgjEV MAuOdNatVFvptpw6J1YOMTAP2sAEXdWh+2hyrJWkWB0eztdn9sDVf3qChbQf4Lzo5LgX 9IHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1CzENNNKxR+Y4Xm6oCnqvn1Nvu5U9Mf7Blu9g5RjkYM=; b=KxrCEFKanfZ2q1pvr25tzGgutv91krjaZIXb6LClYt9LDQ0issIWxwVxo6LbgIxhvJ Q+RTxpLlyGJ7nxryoJD/0EZjK8JWqECN3nfUm5z5S94fKM+nlySGNwrUy2e5PLAstBCI tksE70OzDjW4ojyAfanL7AfFQshFob9+bCMYjgBn7hcYxR0PpZPcnixj2yZ/qIqZTIwq Z3FK9accI52e+l8PPB3GaZggn47L+C9xB9wIzWBKJul76LOsDo5iD3imTPCEEtarB35P x48g/C6YOXCM3xg/P0luUXk5Y2fx2qzuYtajMYPCN64Q8BOIH0rUUTpGMD0hiKp+AlyI TK7Q== X-Gm-Message-State: APjAAAWZGP3fJ5mKVhVeA0xq5siT3wbI6tDDPRk7fPu6V3nRNyrS6OwA i4wM5z10FRPvU8IHj5m7QGUl6L/8wDXnjM9yv0duyVBb X-Google-Smtp-Source: APXvYqyNxZ3MJjzez8phpCm1YIwHntYeMYooj759Xr8PRRD2MgVOUg5pI5oRdtxPDWfGipGhOKk/kuLEburO1x9Z81M= X-Received: by 2002:adf:d4ca:: with SMTP id w10mr80649594wrk.53.1578027150329; Thu, 02 Jan 2020 20:52:30 -0800 (PST) MIME-Version: 1.0 References: <20200102172006.5b9eb3e4@hermes.lan> In-Reply-To: From: JeongHwan Kim Date: Fri, 3 Jan 2020 13:52:19 +0900 Message-ID: To: Stephen Hemminger Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Attatching global memory pointer to mbuf and sending it to ethernet port. X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" 2020=EB=85=84 1=EC=9B=94 3=EC=9D=BC (=EA=B8=88) =EC=98=A4=EC=A0=84 11:26, J= eongHwan Kim =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1= : > > 2020=EB=85=84 1=EC=9B=94 3=EC=9D=BC (=EA=B8=88) =EC=98=A4=EC=A0=84 11:01,= JeongHwan Kim =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84= =B1: > >> No, I'm using only one process which contains several threads. >> >> 2020=EB=85=84 1=EC=9B=94 3=EC=9D=BC (=EA=B8=88) =EC=98=A4=EC=A0=84 10:20= , Stephen Hemminger =EB=8B=98=EC=9D=B4 >> =EC=9E=91=EC=84=B1: >> >>> On Fri, 3 Jan 2020 09:11:46 +0900 >>> JeongHwan Kim wrote: >>> >>> > Hi, everyone >>> > >>> > I'd like to send the contents of global memory through ethernet port >>> > without memory copying to mbuf. >>> > So, I attached the pointer of global memory to mbuf's buffer address, >>> but >>> > segfault occurs when I send it to ethernet port. >>> > I 'm using dpdk version 2019.11 and eal config with "--iova-mode= =3Dpa" >>> > option. >>> > My hw platform is NXP ls2088a. >>> > >>> > My routine is like this: >>> > >>> > int buf_len =3D 100; >>> > struct rte_mbuf *m =3D rte_pktmbuf_alloc(mbuf_pool); >>> > struct rte_mbuf_ext_shared_info *shinfo =3D >>> > rte_pktmbuf_ext_shinfo_init_helper(buf_addr, &buf_len, free_cb, >>> fcb_arg); >>> > rte_pktmbuf_attach_extbuf(m, buf_addr, buf_iova, buf_len, shinfo); >>> > rte_pktmbuf_reset_headroom(m); >>> > ... >>> > and sent "m" to ethernet, the result was >>> > >>> > Thread 4 "lcore-slave-1" received signal SIGSEGV, Segmentation fault. >>> > [Switching to Thread 0xffffbdb0c910 (LWP 10614)] >>> > 0x0000aaaaaab73f58 in eth_mbuf_to_sg_fd () >>> > >>> > The buffer was created as follows : >>> > user_mz =3D rte_memzone_reserve_aligned("user_mz", size, rte_socket_i= d(), >>> > RTE_MEMZONE_1GB|RTE_MEMZONE_IOVA_CONTIG, >>> > RTE_CACHE_LINE_SIZE); >>> > buf_addr =3D user_mz->addr; >>> > buf_iova =3D user_mz->iova; >>> > >>> > Please give me a hint for this problem. >>> > Thanks in advance. >>> > >>> > Jeong-Hwa Kim. >>> >>> Are you using primary/secondary process model? >>> Is the memory zone being created in the primary process? >>> >> > I'm not using primary/secondary process model. > Only primary process exists and it consists of several threads. > I found the weird situation. First packet I sent was OK, it has an address of the first part of memory zone. But after that, the next packet of which address is next the buf length was fail.