From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Ivan Malov <ivan.malov@arknetworks.am>, dev@dpdk.org
Cc: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>,
Andy Moreton <amoreton@xilinx.com>
Subject: Re: [PATCH] net/sfc: avoid unnecessary flow pattern item traversal
Date: Tue, 14 Feb 2023 16:39:39 +0300 [thread overview]
Message-ID: <ac064066-81ae-f2a6-b7ee-794a3ec7c6cc@oktetlabs.ru> (raw)
In-Reply-To: <20230214132728.7553-1-ivan.malov@arknetworks.am>
On 2/14/23 16:27, Ivan Malov wrote:
> Currently, the code tries to look up a user-provided item
> by traversing those known to the PMD. Avoid the traversal
> since it is easier to access items directly by their IDs,
> with necessary checks to avoid reading past the buffer.
>
> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
> Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
> ---
> drivers/net/sfc/sfc_flow.c | 60 +++++++++++---------------------------
> drivers/net/sfc/sfc_flow.h | 1 -
> drivers/net/sfc/sfc_mae.c | 39 +++++++++----------------
> 3 files changed, 30 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
> index fe1f5ba55f..9e1b746d51 100644
> --- a/drivers/net/sfc/sfc_flow.c
> +++ b/drivers/net/sfc/sfc_flow.c
> @@ -1130,96 +1130,84 @@ sfc_flow_parse_pppoex(const struct rte_flow_item *item,
> }
>
> static const struct sfc_flow_item sfc_flow_items[] = {
> - {
> - .type = RTE_FLOW_ITEM_TYPE_VOID,
> + [RTE_FLOW_ITEM_TYPE_VOID] = {
Doesn't it make these arrays sparse and potentially too big?
I'd like to see mitigation of the question in the changeset
description.
prev parent reply other threads:[~2023-02-14 13:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 13:27 Ivan Malov
2023-02-14 13:39 ` Andrew Rybchenko [this message]
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=ac064066-81ae-f2a6-b7ee-794a3ec7c6cc@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=amoreton@xilinx.com \
--cc=dev@dpdk.org \
--cc=ivan.malov@arknetworks.am \
--cc=viacheslav.galaktionov@arknetworks.am \
/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).