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 66F57A0C41 for ; Wed, 15 Sep 2021 14:11:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FE2F4068F; Wed, 15 Sep 2021 14:11:36 +0200 (CEST) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mails.dpdk.org (Postfix) with ESMTP id 7DFF04003C for ; Wed, 15 Sep 2021 14:11:34 +0200 (CEST) Received: by mail-ed1-f54.google.com with SMTP id g21so3992183edw.4 for ; Wed, 15 Sep 2021 05:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=092ohfRNdpfiVOcgetngBA7lHgpCJdHH7GYxsl4egBY=; b=jxLc0NZRv2PtjTuw7EImCgB2R8K8gGIKjw4yypd/Fge1cSEzMQ91GIyqM7c/xk+YIh PLHxGiO/4anONEUx2DwFdYBT0EesAZSdPgEklvaTZSH34NBVZqotOqTYD9obbkcTqrk6 OOMeiMWu3Y5OWanShLPDpE0rnp4QnU8VCeHFw7zq3koYoml3rcl7/+Hao/8jjhZhGx2t uDc/u7Z/sG5bavXumv7UUr9SWKYTSaOnzb6tXQCZumsG5Uy2k7o6lO1BmXOsiRzwOE3p bpRv5JZiPL/uYFxPQVky/dbHRzYlmeq/6hyAOkTBXdQzaAUF1hD21d8QqbzS2yOQT/f5 uH3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=092ohfRNdpfiVOcgetngBA7lHgpCJdHH7GYxsl4egBY=; b=Ej72g2+mkCG6AQcqR19Da0Mgy/jraCMY2PHRN9TFLwWylynXHseb2F/1TZswRvPU+M nimB60I6uYXYTVP4w0s0DAv2RQxRVA9QbusTu+CHS9+pAGCWCLRESzZYZMLrMCQ+W3RX t8+0t606HB/9NtTPMKUCiN5I7mzBKXl3Tsu8WIFtg2VLHFHTeu4LVLSm0ASe/+mJSvYf Km8mC9OzFWOXr4J9vR5aFT6Go38hkgJ/aDCx7xdnuWnO1tQJZq+DUnG//882q/j+udsq 6RWP4IKGjIA5e/QvJtTI8ppQ/ufxrHOyBEZMxrCzXQAecRi3CWqvdqZeG/SnUK+IFr43 7eRQ== X-Gm-Message-State: AOAM530oiY9N4fhZL3DTR75WMjhbnW0fSGWxK8ad596+r+DuQMX2ugi9 IkdemahM5a8Z9l4dZ1GW/z1lUvhmrpdWY5i3Uv8cCCe8NQ== X-Google-Smtp-Source: ABdhPJyJw5EIUs/Efq5NnMoDuBTSS7kz+O/DEMzcg3LPtQrtP7bQ5fsRbHNUkTDetoBzKrHkyaolmCGDgGlUeshljEA= X-Received: by 2002:aa7:c459:: with SMTP id n25mr24682781edr.29.1631707893984; Wed, 15 Sep 2021 05:11:33 -0700 (PDT) MIME-Version: 1.0 From: Jeevan Nailwal Date: Wed, 15 Sep 2021 17:41:23 +0530 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-users] New to DPDK 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 Sender: "users" Hi Everyone, I am new to DPDK and trying to learn its usage. I am facing a SEGFAULT while sending a single packet via this. Please find the snippet of my code below: ------------Started my program with initial pool configuration: ret = rte_eal_init(argc, argv); if (ret < 0) rte_exit(EXIT_FAILURE, "Error with EAL initialization\n"); argc -= ret; argv += ret; rte_log_set_global_level(RTE_LOG_NOTICE); /* parse app arguments */ if (rte_lcore_count() > RTE_MAX_LCORE) rte_exit(EXIT_FAILURE,"Not enough cores\n"); create_mbuf_pool(128000, 128); ret = rte_vhost_driver_register(sockpath, 0); if (ret != 0) rte_exit(EXIT_FAILURE, "vhost driver register failure.\n"); rte_vhost_driver_callback_register (sockpath, &virtio_net_device_ops); chmod (sockpath, 0777); rte_vhost_driver_start(sockpath); -------- afterwards i created a thread to instantiate m TX.. i.e. receive packet from DPDK: ret = pthread_create (&proc_tx, NULL, (void *)tx_process, NULL); if (ret != 0) { rte_exit (EXIT_FAILURE, "Cannot create TX thread\n"); } -------Finally: in my tx_process, i am fetching the data when its available, based on data availability: ret = rte_vhost_dequeue_burst (port, VIRTIO_TXQ, mbuf_pool, &pkt, 1); I am getting a segfault as soon as dequeue_burst api gets called. please find the stack trace below: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2aaaad642700 (LWP 288924)] 0x000000000071ce74 in common_ring_mc_dequeue () Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.3.x86_64 libgcc-4.8.5-36.el7.x86_64 ncurses-libs-5.9-14.20130511.el7_4.x86_64 numactl-libs-2.0.9-7.el7.x86_64 (gdb) bt #0 0x000000000071ce74 in common_ring_mc_dequeue () #1 0x00000000006d0a37 in virtio_dev_tx_split () #2 0x00000000006d2395 in rte_vhost_dequeue_burst () #3 0x000000000064c3ac in tx_process () #4 0x00002aaaaba41dd5 in start_thread () from /lib64/libpthread.so.0 #5 0x00002aaaabd53ead in clone () from /lib64/libc.so.6 Please help me here.