From patchwork Tue Oct 6 13:29:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 314092 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp582112ilm; Tue, 6 Oct 2020 06:29:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMFlVBBeBx8p3YT3lnbfYk2vjOST2/lY0j/A4nQ5u7mwA/MV2kVfJ3HlY5rDa/MRJkQAL/ X-Received: by 2002:a17:906:940c:: with SMTP id q12mr5378369ejx.195.1601990962336; Tue, 06 Oct 2020 06:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601990962; cv=none; d=google.com; s=arc-20160816; b=jFOk1cYSYt2lsrNuKbyUxC3wz8FkGU0Mosa+aWsSdHhTDuYqCOiVjT7QA+BiYzVlua J/0EkeJLoZGoKEYmxtRVY+NbLmBD7a+c4Jp3QeVXTEZUEYHYJ1FXIRKKwMOKdcak3DD9 3F62zHtsauVKHyjHZ0vZZqXWt6CCiLP+2rW0lDriOjmXhet6rWN2kAJqcOxjbHNdh21w oh+AnI+YHFefc4GYOYe79PFBgeKcNfXpXJp8PIbibZvIuUqTjVoUKB/Ll7oFnTT8AHK9 KLYRxZbIJKeEsx+8j5rKmpZ/KHyHOBqUsqJJRiq9X4hs5aTMM9dFywyuyIF1I8nUt4VR Z+hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=s8nX2ROb0x8Du6/cU1IRV+47MmykHZju4a0Hxl5JPS8=; b=WUl4TVGZ44CWmWMOPib5la638d05YVexFao7NvRNxOIbASOxMQMInRhMHzJ+NlBM0e NmSnUjAVfQrv5bX7JbCv9g4/3a+UGJDNNBlSXTIcvUjN/q13gwXSEs43pCBpOVWE056w bm/Bi/qRHQVVQaC6KMDemCTXCWingMiWgv+twYDz0AIr+lHXJDvyQJhpSAQQyYvjWg1A Bt9L6MZfz55Do8FIcg0wD6SYSNJCig//oiYbiR+x6Gl/hDvQKWjM8uD/yp9DToMhHQdc YF8phuWNFk9FlpRLQ4Hj1ZxO25/DRWZSzyOK6YL1qeNeBuJwjsV+igQTuVjbuNQeua6N CQwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id d7si2325191edj.387.2020.10.06.06.29.21; Tue, 06 Oct 2020 06:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DF232B8B; Tue, 6 Oct 2020 15:29:16 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 5702925B3 for ; Tue, 6 Oct 2020 15:29:14 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC92B143D; Tue, 6 Oct 2020 06:29:12 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A9E733F71F; Tue, 6 Oct 2020 06:29:12 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, konstantin.ananyev@intel.com Cc: olivier.matz@6wind.com, david.marchand@redhat.com, nd@arm.com Date: Tue, 6 Oct 2020 08:29:04 -0500 Message-Id: <20201006132905.46205-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> References: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [RFC v2 0/1] lib/ring: add scatter gather APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Cover-letter: It is pretty common for the DPDK applications to be deployed in semi-pipeline model. In these models, a small number of cores (typically 1) are designated as I/O cores. The I/O cores work on receiving and transmitting packets from the NIC and several packet processing cores. The IO core and the packet processing cores exchange the packets over a ring. Typically, such applications receive the mbufs in a temporary array and copy the mbufs on to the ring. Depending on the requirements the packets could be copied in batches of 32, 64 etc resulting in 256B, 512B etc memory copy. The scatter gather APIs help avoid intermediate copies by exposing the space on the ring directly to the application. v2: changed the patch to use the SP-SC and HTS modes v1: Initial version Todo: Add test cases Honnappa Nagarahalli (1): lib/ring: add scatter gather APIs lib/librte_ring/meson.build | 3 +- lib/librte_ring/rte_ring_elem.h | 1 + lib/librte_ring/rte_ring_peek_sg.h | 552 +++++++++++++++++++++++++++++ 3 files changed, 555 insertions(+), 1 deletion(-) create mode 100644 lib/librte_ring/rte_ring_peek_sg.h -- 2.17.1