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 BA0CEA04F3 for ; Fri, 3 Jan 2020 03:26:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 16B111C1F7; Fri, 3 Jan 2020 03:26:34 +0100 (CET) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by dpdk.org (Postfix) with ESMTP id 73ACD1C1F6 for ; Fri, 3 Jan 2020 03:26:32 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id a5so7227070wmb.0 for ; Thu, 02 Jan 2020 18:26:32 -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=LsJNrIPcw7HSB8/v6gY//Dd97V8qg9a+mygPAUa9ae8=; b=fQvF6f3TlUnS7f1PeohXQHaTiXxO4ItPmBqCkKN3iH6bwd82t/cBPHxu4PTKeqAGEf kPRk2wNFRiizd3Jva8HnUOv5LvVa42NsjsPrZrcqpcYI6u4Kn5wO47T12rDR8S12YMsD xgWZnM7GZ3QtLxVmmMqDMDGB5SJX9UbaBs9EAz7noEktCUa0YbXuirf4DvXWLqnKs2hf 15dQNj2LGEaEujt44ELiDUEPrjpGtg7l2rxj9tC21AznvpBmFTPn2rZY856yWKNutyIQ 1uNIT07JxRySLrFxZQ4fNc7Uk3omNK2yvOxnXBa1MIS+Md+u5f/VgElPlCOHF4JqNDz1 Nt2g== 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=LsJNrIPcw7HSB8/v6gY//Dd97V8qg9a+mygPAUa9ae8=; b=KlQdRXZpJP5HKcWnGEDzBTrGOZ603S//o8Qrl8tLf9LY92nqf/5aVZkBZmo9PSFlcs JMkmq9grKArMijK6He4ONOBXsT1HWRlXWgqjGEZjoI6/r0TaZ1wM7F8wgtBwIpy5ZKHM PE4g/QlZAejLlpvt69/Hb+CgosoKuiGHiZZToIXXdIwgWkU4sNp/9791NqzhYYRwFbHV kJizDK5Im9mA6aTEchLvjQmO0SdekwCGdTITv+Q0RIykC24yN+6TDtCm2ktchhjBxvhl 1q/SjN2Uyo5pcCcdm2U2Otd+4pMVRRM8l/+LlsfROLKHgbaCDgT/d1xQMDz8S/rNmN2Q 6YRg== X-Gm-Message-State: APjAAAVlASV7SHawfqqdnw2j+0E/yXfJhA6u2GCJ1dslFzQl6lqRJAD3 qb9UAySZTGmgJezfP1E7X1QmaBYyJC1IEikGZNCdP2w5 X-Google-Smtp-Source: APXvYqyz744TwLbDnaSrbmeQpTlxUB7IZAJiJwNldmdEY2el0aY5k80txJ1eJCMhNTOUwsvEQAOmo4/OMKXs3Rr5Mu8= X-Received: by 2002:a1c:bbc3:: with SMTP id l186mr16814998wmf.101.1578018392250; Thu, 02 Jan 2020 18:26:32 -0800 (PST) MIME-Version: 1.0 References: <20200102172006.5b9eb3e4@hermes.lan> In-Reply-To: From: JeongHwan Kim Date: Fri, 3 Jan 2020 11:26:21 +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:01, J= eongHwan 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=3D= pa" >> > 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_id= (), >> > 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.