From: Jerin Jacob <jerinjacobk@gmail.com>
To: Feifei Wang <Feifei.Wang2@arm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
Ruifeng Wang <Ruifeng.Wang@arm.com>
Subject: Re: [PATCH v2 3/3] examples/l3fwd: enable direct rearm mode
Date: Tue, 11 Oct 2022 15:08:08 +0530 [thread overview]
Message-ID: <CALBAE1PGXMBm1KfiK=yQ5O-VXoQ0OmXJbL5VDVxb74mFzhbaQA@mail.gmail.com> (raw)
In-Reply-To: <AS8PR08MB7718011D35FB71E061568FD6C8239@AS8PR08MB7718.eurprd08.prod.outlook.com>
On Tue, Oct 11, 2022 at 12:58 PM Feifei Wang <Feifei.Wang2@arm.com> wrote:
>
>
>
> > -----邮件原件-----
> > 发件人: Jerin Jacob <jerinjacobk@gmail.com>
> > 发送时间: Friday, September 30, 2022 7:56 PM
> > 收件人: Feifei Wang <Feifei.Wang2@arm.com>
> > 抄送: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Ruifeng Wang
> > <Ruifeng.Wang@arm.com>
> > 主题: Re: [PATCH v2 3/3] examples/l3fwd: enable direct rearm mode
> >
> > On Tue, Sep 27, 2022 at 8:18 AM Feifei Wang <feifei.wang2@arm.com>
> > wrote:
> > >
> > > Enable direct rearm mode in l3fwd. Users can use parameters:
> > > '--direct-rearm=(rx_portid,rx_queueid,tx_portid,tx_queueid)'
> > > to enable direct rearm.
> > >
> > > Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> > > Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> > > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> > > ---
> > > 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 int
> > > 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 = 0; i < n_rx_q; ++i) {
> > > portid = qconf->rx_queue_list[i].port_id;
> > > queueid = 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 ideal
> > place with a dedicated fwd_engine just for this.
> >
> > [1]
> > > + " --direct-rearm (rx_port, rx_queue, tx_port, tx_queue): Put Tx
> > queue sw-ring buffers into Rx queue\n"
> Thanks very much for your comments. This patch here is mainly to facilitate 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.
next prev parent reply other threads:[~2022-10-11 9:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 2:47 [PATCH v2 0/3] Direct re-arming of buffers on receive side Feifei Wang
2022-09-27 2:47 ` [PATCH v2 1/3] ethdev: add API for direct rearm mode Feifei Wang
2022-10-03 8:58 ` Konstantin Ananyev
2022-10-11 7:19 ` 回复: " Feifei Wang
2022-10-11 22:21 ` Konstantin Ananyev
2022-10-12 13:38 ` 回复: " Feifei Wang
2022-10-13 9:48 ` Konstantin Ananyev
2022-10-26 7:35 ` 回复: " Feifei Wang
2022-10-31 16:36 ` Konstantin Ananyev
2023-01-04 7:39 ` 回复: " Feifei Wang
2022-09-27 2:47 ` [PATCH v2 2/3] net/i40e: enable " Feifei Wang
2022-09-27 2:47 ` [PATCH v2 3/3] examples/l3fwd: " Feifei Wang
2022-09-30 11:56 ` Jerin Jacob
2022-10-11 7:28 ` 回复: " Feifei Wang
2022-10-11 9:38 ` Jerin Jacob [this message]
2022-09-29 6:19 ` 回复: [PATCH v2 0/3] Direct re-arming of buffers on receive side Feifei Wang
2022-09-29 10:29 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALBAE1PGXMBm1KfiK=yQ5O-VXoQ0OmXJbL5VDVxb74mFzhbaQA@mail.gmail.com' \
--to=jerinjacobk@gmail.com \
--cc=Feifei.Wang2@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Ruifeng.Wang@arm.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).