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 98638A04F3 for ; Fri, 3 Jan 2020 03:01:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA62D1C1F0; Fri, 3 Jan 2020 03:01:40 +0100 (CET) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by dpdk.org (Postfix) with ESMTP id D79091C1ED for ; Fri, 3 Jan 2020 03:01:39 +0100 (CET) Received: by mail-wr1-f42.google.com with SMTP id c9so41095053wrw.8 for ; Thu, 02 Jan 2020 18:01:39 -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=VCDeW8/gvbEuaphhZ67J+1AFCtAhyIxuT3XqDDhmOBM=; b=lPoD2n1ncKAYIsesVX0KMkGnWKV8XKE1DtiWVzWCgRbQ/+h7r+2+klaXhOoRvUkPLW BRHmaixGebrrqJ04XmF60gM2lOixc1m3UfGZnph+G3Txo8Z7xSB7S+6LvP6D1FkTZj0V CCqRYsb3taUe4mr/JdQNdnVM/RCc3684WRoQyl6+/22pgDOiv1iYRuxb3YclUKRjDDo9 utq0JNtdV2T+hZOHYoGT7+K6vgEfGut7o+u6YfvLGwwy9bFK7K6f0+AD5nfOTiUqJwZi T/pKY8L6+vkKH6k6VXXokvbbh88TNxSV4+6hOublnrzjJepjetvoJnjsn3bAmqzn1KLk R5RQ== 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=VCDeW8/gvbEuaphhZ67J+1AFCtAhyIxuT3XqDDhmOBM=; b=SeNAWO1ildAP4Y4A/gIuB9X9h0eQrRDqcChm4HJJlHlZg2E7d+Dtl4ImWpvrzkse2r CX0Te+Oap9xUuP3UR2MtovjQMjKS0HuqtuDvUfzkyFSW2mGcd4DvRgsTUuvM5oJBzN3B QzKv40T+LvIPgRcA7IY/lvemkoLTOBu1fogW9k4cBrRAxTBlcKrWWH2n55mqJiX3LKjF q6RmQyLj8wFJdUMd/tdwdQR6JEIvUhTs6uQSRKgckhpdH5fgBCJmtlN9leVkeoqkGvVf kzZ4Yxay909D7rOQP6SVRcJ9J3bQOfo1Ovy1/XcyoAGHrmqNq616OWbHP6oZWovykP+O zFZg== X-Gm-Message-State: APjAAAWSHfubc7HVqiBHWkrJ2n7QG/PLdOgSWqmE4UPeFubQKiB90Fv0 4DA8G1KlyX/uMzjjoXtrrB7tdhFs6sgEJjeZnwCaUftL X-Google-Smtp-Source: APXvYqyAYHVODLJvCJ4S+kruwTxeFczbBnnEuxXhgG6J97gJNUpBKaIaEqP290nkjxA8roAbEdzra2mFqLxtHQZaM1Q= X-Received: by 2002:adf:d4ca:: with SMTP id w10mr79972497wrk.53.1578016899609; Thu, 02 Jan 2020 18:01:39 -0800 (PST) MIME-Version: 1.0 References: <20200102172006.5b9eb3e4@hermes.lan> In-Reply-To: <20200102172006.5b9eb3e4@hermes.lan> From: JeongHwan Kim Date: Fri, 3 Jan 2020 11:01:28 +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" 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, S= tephen 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, b= ut > > segfault occurs when I send it to ethernet port. > > I 'm using dpdk version 2019.11 and eal config with "--iova-mode=3Dp= a" > > 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? >