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 93A95A00C5; Fri, 24 Dec 2021 17:46:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D9ED41155; Fri, 24 Dec 2021 17:46:33 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 07A1D41153 for ; Fri, 24 Dec 2021 17:46:32 +0100 (CET) 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 8D3541FB; Fri, 24 Dec 2021 08:46:31 -0800 (PST) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.111]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B01A63F5A1; Fri, 24 Dec 2021 08:46:29 -0800 (PST) From: Feifei Wang To: Cc: dev@dpdk.org, nd@arm.com, Feifei Wang , Honnappa Nagarahalli , Ruifeng Wang Subject: [RFC PATCH v1 4/4] examples/l3fwd: give an example for direct rearm mode Date: Sat, 25 Dec 2021 00:46:12 +0800 Message-Id: <20211224164613.32569-5-feifei.wang2@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211224164613.32569-1-feifei.wang2@arm.com> References: <20211224164613.32569-1-feifei.wang2@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This is just to give an example to show how to use API to enable direct rearm mode for user. Command (Two flows): ./examples/dpdk-l3fwd -n 4 -l 1 -a 0001:01:00.0 -a 0001:01:00.1 -- -p 0x3 -P --config='(0,0,1),(1,0,1)' This is one single core case, and by using API, The Rx queue 0 from port 0 can directly rearm buffers from port 1 Tx queue 0. And Rx queue 0 from port 1 can directly rearm buffers from port 0 Tx queue 0. Suggested-by: Honnappa Nagarahalli Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- examples/l3fwd/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index eb68ffc5aa..e7801b9f04 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1439,6 +1439,9 @@ main(int argc, char **argv) } } + rte_eth_direct_rxrearm_map(0, 0, 1, 0); + rte_eth_direct_rxrearm_map(1, 0, 0, 0); + printf("\n"); for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { -- 2.25.1