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 1AD4CA0545; Tue, 11 Oct 2022 11:38:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F37C742BCC; Tue, 11 Oct 2022 11:38:35 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 0441942829 for ; Tue, 11 Oct 2022 11:38:35 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id h15so3758280qtu.2 for ; Tue, 11 Oct 2022 02:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Lw2E66K4Yf7rSkPJNpEPKOpcFpkr6zrysT/q8PH8n34=; b=Jed8umzH6U7G/jziCFU6r2bVXzdwFnequDwND4wfsZ/ddNZnSnbICXQoAghpbitUrV syPUlYfAmCDOqTwyPcqa7hZjekARL1/5mh2kebhKnrFT01lfITPFMRS46hG5rvjzn58Q pZbLUVL2svL6/O7fcgNtrTwVOmC3RMlf2aQ0+XNBPT5MFX5aqIrAyFHVgYhAmjE3yDLY t3Pn0IPDV5aBcPefKY6qSeOtZRn8nEaJPG7IjnP3HC1Ov1oFAyOlgQUQfYsJxVCizZX8 D+WSW38ebs+UflNeHKAkjw5w+vQVNaoQPBi47SJT0xYczjmDLylqWP2l+vWE8Xxc4PA3 UjHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lw2E66K4Yf7rSkPJNpEPKOpcFpkr6zrysT/q8PH8n34=; b=h+pgWLcObGrD4rZxVPf6qoo1bNPl+AemLEIsho3wpKIgqkgJCMygN+WUzAP4PHVFWn Tq6WX1c8Xt4kqeVw0CJ78B40ej7h8IVS7JH+60eO+LXoX3QnHXn1yjqEP4o8KsKzvNcP GSQW8lASb1HEmfEyEnNdaSxpPGDVDihnFP7PaoZgpwVrdu+dNYONFMeFOuvywLYHfZfP LXDTg2kapQGVSdXImLk34ZY0At6v8Ma1QS8N8FqaF4QMcKPNgaz9vhmB7OGlid6iHRRn sIs2+V78G2IhgMhpDXUBTcxyJJAiEjoxqbBL34V6XxMkXD+9G59cuE4PQeDz+MrZP5pl MR+A== X-Gm-Message-State: ACrzQf3/HMw/nQkjBLKZEa1mo6msnBufohvbRy0vR7trzCOOQ0Mc6f9p X7cvEjaV9QAMXI4O9EkQTHslajNs75okUEiZeDH/RVZL X-Google-Smtp-Source: AMsMyM56CC4q1cP90XUIBoOSFgdn8Sl0TtylbbAIBXrTODn10s9n2fuXz/7Ng8gAii+Y2p6gawUhfhNnsa3PmclhhYY= X-Received: by 2002:a05:622a:1651:b0:38f:2829:a1fe with SMTP id y17-20020a05622a165100b0038f2829a1femr18400404qtj.173.1665481114351; Tue, 11 Oct 2022 02:38:34 -0700 (PDT) MIME-Version: 1.0 References: <20220927024756.947272-1-feifei.wang2@arm.com> <20220927024756.947272-4-feifei.wang2@arm.com> In-Reply-To: From: Jerin Jacob Date: Tue, 11 Oct 2022 15:08:08 +0530 Message-ID: Subject: Re: [PATCH v2 3/3] examples/l3fwd: enable direct rearm mode To: Feifei Wang Cc: "dev@dpdk.org" , nd , Honnappa Nagarahalli , Ruifeng Wang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, Oct 11, 2022 at 12:58 PM Feifei Wang wrote: > > > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Jerin Jacob > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: Friday, September 30, 2022 7:56 P= M > > =E6=94=B6=E4=BB=B6=E4=BA=BA: Feifei Wang > > =E6=8A=84=E9=80=81: dev@dpdk.org; nd ; Honnappa Nagarahalli > > ; Ruifeng Wang > > > > =E4=B8=BB=E9=A2=98: Re: [PATCH v2 3/3] examples/l3fwd: enable direct re= arm mode > > > > On Tue, Sep 27, 2022 at 8:18 AM Feifei Wang > > wrote: > > > > > > Enable direct rearm mode in l3fwd. Users can use parameters: > > > '--direct-rearm=3D(rx_portid,rx_queueid,tx_portid,tx_queueid)' > > > to enable direct rearm. > > > > > > Suggested-by: Honnappa Nagarahalli > > > Signed-off-by: Feifei Wang > > > Reviewed-by: Ruifeng Wang > > > Reviewed-by: Honnappa Nagarahalli > > > --- > > > examples/l3fwd/l3fwd.h | 12 +++++ > > > examples/l3fwd/l3fwd_lpm.c | 22 +++++++++ > > > examples/l3fwd/main.c | 94 > > +++++++++++++++++++++++++++++++++++++- > > > 3 files changed, 127 insertions(+), 1 deletion(-) > > > > > > diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index > > > 40b5f32a9e..db097e344c 100644 > > > --- a/examples/l3fwd/l3fwd.h > > > +++ b/examples/l3fwd/l3fwd.h > > > @@ -57,6 +57,10 @@ > > > #endif > > > #define HASH_ENTRY_NUMBER_DEFAULT 16 > > > > > > +/* MAX number of direct rearm mapping entry */ > > > +#define MAX_DIRECT_REARM_ENTRY_NUMBER 16 > > > +#define MAX_DIRECT_REARM_QUEUE_PER_PORT 8 > > > + > > > struct parm_cfg { > > > const char *rule_ipv4_name; > > > const char *rule_ipv6_name; > > > @@ -114,6 +118,14 @@ extern struct parm_cfg parm_config; > > > > > > extern struct acl_algorithms acl_alg[]; > > > > > > +/* Used in direct rearm mode */ > > > +extern bool enabled_direct_rearm; > > > +extern uint8_t direct_rearm_entry_number; extern bool > > > > > +queue_enabled_direct_rearm[RTE_MAX_ETHPORTS][MAX_DIRECT_REAR > > M_QUEUE_P > > > +ER_PORT]; extern uint16_t > > > > > +direct_rearm_map_tx_port[RTE_MAX_ETHPORTS][MAX_DIRECT_REARM_ > > QUEUE_PER > > > +_PORT]; extern uint16_t > > > > > +direct_rearm_map_tx_queue[RTE_MAX_ETHPORTS][MAX_DIRECT_REAR > > M_QUEUE_PE > > > +R_PORT]; extern uint8_t > > > > > +direct_rearm_entry_idx[RTE_MAX_ETHPORTS][MAX_DIRECT_REARM_QUE > > UE_PER_P > > > +ORT]; > > > + > > > /* Send burst of packets on an output interface */ static inline in= t > > > send_burst(struct lcore_conf *qconf, uint16_t n, uint16_t port) diff > > > --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index > > > 22d7f61a42..973fe70aae 100644 > > > --- a/examples/l3fwd/l3fwd_lpm.c > > > +++ b/examples/l3fwd/l3fwd_lpm.c > > > @@ -150,6 +150,8 @@ lpm_main_loop(__rte_unused void *dummy) > > > > > @@ -205,6 +221,12 @@ lpm_main_loop(__rte_unused void *dummy) > > > for (i =3D 0; i < n_rx_q; ++i) { > > > portid =3D qconf->rx_queue_list[i].port_id; > > > queueid =3D qconf->rx_queue_list[i].queue_id; > > > + > > > + if > > > + (queue_enabled_direct_rearm[portid][queueid]) { > > > > IMO, We should not change fastpath code that impacts performance on > > other targets for a feature which has a very constraint use case. Also = need > > for expressing [1], kind of defeat the purpose LPM table populated. > > > > IMO, If we need to add a test case for this API, testpmd would be an id= eal > > place with a dedicated fwd_engine just for this. > > > > [1] > > > + " --direct-rearm (rx_port, rx_queue, tx_port, tx_que= ue): Put Tx > > queue sw-ring buffers into Rx queue\n" > Thanks very much for your comments. This patch here is mainly to facilita= te verification test > and show how to use direct-rearm API. IMO, it should be other way around. for PMD and ethdev API verification, Please use testpmd. > > After 'direct-rearm' matures, we will consider to enable direct-rearm in = testpmd or other > application in dpdk.