DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Feifei Wang <feifei.wang2@arm.com>
Cc: dev@dpdk.org, 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: Fri, 30 Sep 2022 17:26:17 +0530	[thread overview]
Message-ID: <CALBAE1PbKay6jvFABNsxuFe5JmuCW=0PjKv=_Bb1NY-V+h_19w@mail.gmail.com> (raw)
In-Reply-To: <20220927024756.947272-4-feifei.wang2@arm.com>

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_REARM_QUEUE_PER_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_REARM_QUEUE_PER_PORT];
> +extern uint8_t direct_rearm_entry_idx[RTE_MAX_ETHPORTS][MAX_DIRECT_REARM_QUEUE_PER_PORT];
> +
>  /* 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"

  reply	other threads:[~2022-09-30 11:56 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 [this message]
2022-10-11  7:28     ` 回复: " Feifei Wang
2022-10-11  9:38       ` Jerin Jacob
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='CALBAE1PbKay6jvFABNsxuFe5JmuCW=0PjKv=_Bb1NY-V+h_19w@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@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).