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 15600A034C for ; Fri, 9 Dec 2022 02:03:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95DE340E0F; Fri, 9 Dec 2022 02:03:27 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id B5A9940E03 for ; Fri, 9 Dec 2022 02:03:25 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id fy4so2940263pjb.0 for ; Thu, 08 Dec 2022 17:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=NzbcxwqgPeDQ91s/pIP+nyIGYPXugIJlPnhkdWj4oeQ=; b=tdKRuxYIJlRw9cld1fD7kzg0BVJ9QLhyed4oiDDR3TYzy/To5vIRpen8dO2bMKxwDc Gc2RzP5z0tBF+qohUzq8Er7w07pHPGZR4BKw1yoLKnely7iieIA58f9Cyahm9+FaYRqX q1q/VI/So/6slf6+iNNEooZ5djNThOzjcOOVrtI/KzqfnFDiCi5AaHO8xzKmz4KFUWMg 2QZ8iL9p6prJEbUNdo+MwiwXysZ5AL8srNMzFvr7ft3WX+/KuchdqvTCohYGXl3mxmGE 0X8SAKc25L0lH8uIN7DOgMi1Y3/3Avrpaho/faQE2wJQCHfQ+TX14ZiyLv8nNG3Id4RA Ri0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NzbcxwqgPeDQ91s/pIP+nyIGYPXugIJlPnhkdWj4oeQ=; b=J0Y/AUl5zSFlKxTItc8Ugqaam+ibZa7f4a7I3MejyaqU0sOlHNHZP95UjXXeL/fboC Pw7UU5NsCtfrwlpAcUwpoqX9U/MKNetfLTST7J0+xHX8D7PE3r87273DV04knUNcZYP+ Zpqt42fszXf3MD8uQsSBnoLoibEwfFJo7yzSOqcQsyysKq6GqOvti6aa2qqMkn10NMBw Zs0niH3CtOir46FPmSq0+rVwhpdkB6ECHbDmx1mKANYfAQYDUnITwFzeYYHB3izY8IU4 0Imkl0s/2NuAgysgPddtmrCsSGwZ0WrMGQINKdTXyZaFmJBVjD/PNGFjXEhbyTLiY9H8 mqTQ== X-Gm-Message-State: ANoB5pkuIavcVqo9Z83T9OLe02jgsH70dzOfEggWVk2vh5meHeACKU2N GgnnAnoAMNmzk4KfwtAdDdu3NQ== X-Google-Smtp-Source: AA0mqf4WFzpbQMQOoVrWUsh5RHagGcAUil1WbnxGnhxcZz3SwUsJlb0QBU647UQ3N4QJx6EGeJrOEw== X-Received: by 2002:a17:90a:fb92:b0:219:7a1e:e643 with SMTP id cp18-20020a17090afb9200b002197a1ee643mr3848236pjb.9.1670547804704; Thu, 08 Dec 2022 17:03:24 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id q34-20020a17090a752500b00200461cfa99sm198593pjk.11.2022.12.08.17.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 17:03:24 -0800 (PST) Date: Thu, 8 Dec 2022 17:03:22 -0800 From: Stephen Hemminger To: Dylan Baros Cc: users@dpdk.org Subject: Re: DPDK Queues Message-ID: <20221208170322.1f40d630@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 8 Dec 2022 12:32:21 -0600 Dylan Baros wrote: > Good afternoon, > > I am working on learning DPDK in an attempt to write a DPDK based > application and I have a few questions. > > My setup: > > - 2 x Intel Xeon Gold 6348 CPU @ 2.6 Ghz > - 28 cores per socket > - Max 3.5 Ghz > - Hyperthreading disabled > - Ubuntu 22.04.1 LTS > - Kernel 5.15.0-53-generic > - Cores set to performance governor > - 4 x Sabrent 2TB Rocket 4 Plus in RAID0 Config > - 128 GB DDR4 Memory > - 10 1GB HugePages (Can change to what is required) > - 1 x Mellanox ConnectX-5 100gbe NIC > - 31:00.0 Ethernet controller: Mellanox Technologies MT27800 Family > [ConnectX-5] > - Firmware-version: 16.35.1012 > - UDP Source: > - 100 gbe NIC > - 9000 MTU Packets > - ipv4-udp packets > > > The UDP source provides packets with 4 different destination ports. I want > to direct each port to a queue and have writer threads pull data from the > queue and write the payloads to one file per queue. > > My questions are: > 1. How can I direct the data to different queues depending on port > destination? RSS or rte_flow? If so how do I direct it to do so? RSS randomizes the queue assignment, and is available in almost all hardware. The randomization is based on 4-tuple of src/dst ip and port number. Rte flow allows directing port to queue, but is NIC dependent and is more difficult to setup. > 2. Can you have one lcore per queue or does it have to be one lcore per > port? The mapping of how queues are handled by cores is up to the application. DPDK uses a pull model so it is up to which threads request packets from which queue. Your application decides how that is managed. But don't have multiple threads polling the same queue. > > 3. How can I get to the payload in the packets? Any code examples of this? Look at l3fwd. The macro rte_pktmbuf_mtod() to see look at contents. > > Thanks, > DB