From: David Marchand <david.marchand@redhat.com>
To: Ivan Malov <ivan.malov@oktetlabs.ru>
Cc: dev <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Andy Moreton <amoreton@xilinx.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/sfc: extend logging in MAE backend of RTE flow support
Date: Tue, 20 Jul 2021 17:45:58 +0200 [thread overview]
Message-ID: <CAJFAV8zove1ZgE9f9CTM4i=AK-tq9qYcM4M3XRJW7EwZNcD35w@mail.gmail.com> (raw)
In-Reply-To: <20210716022043.3161-2-ivan.malov@oktetlabs.ru>
On Fri, Jul 16, 2021 at 4:20 AM Ivan Malov <ivan.malov@oktetlabs.ru> wrote:
>
> Extra log statements will provide more details to the user
> in the case of errors discovered in the pattern or actions.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
> ---
> drivers/net/sfc/sfc_mae.c | 92 +++++++++++++++++++++++++++++++--------
> 1 file changed, 74 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
> index 61e795db9b..56b949ddf7 100644
> --- a/drivers/net/sfc/sfc_mae.c
> +++ b/drivers/net/sfc/sfc_mae.c
> @@ -752,6 +752,8 @@ sfc_mae_rule_process_pattern_data(struct sfc_mae_parse_ctx *ctx,
>
> for (ethertype_idx = 0;
> ethertype_idx < pdata->nb_vlan_tags; ++ethertype_idx) {
> + rte_be16_t tpid_v = ethertypes[ethertype_idx].value;
> + rte_be16_t tpid_m = ethertypes[ethertype_idx].mask;
> unsigned int tpid_idx;
>
> /*
Probably missing this hunk for consistency:
@@ -919,7 +919,7 @@ sfc_mae_rule_process_pattern_data(struct
sfc_mae_parse_ctx *ctx,
*/
enforce_tag_presence[0] = B_FALSE;
- if (ethertypes[ethertype_idx].mask == RTE_BE16(0)) {
+ if (tpid_m == RTE_BE16(0)) {
if (pdata->tci_masks[ethertype_idx] == RTE_BE16(0))
enforce_tag_presence[ethertype_idx] = B_TRUE;
> @@ -771,19 +773,22 @@ sfc_mae_rule_process_pattern_data(struct sfc_mae_parse_ctx *ctx,
> }
>
> /* Exact match is supported only. */
> - if (ethertypes[ethertype_idx].mask != RTE_BE16(0xffff)) {
> + if (tpid_m != RTE_BE16(0xffff)) {
> + sfc_info(ctx->sa, "TPID mask must be 0x0 or 0xffff; got 0x%04x",
> + rte_be_to_cpu_16(tpid_m));
Is there a reason for marking some logs as info only while others are err level?
> rc = EINVAL;
> goto fail;
> }
>
--
David Marchand
next prev parent reply other threads:[~2021-07-20 15:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 10:56 [dpdk-dev] [PATCH " Ivan Malov
2021-07-07 10:56 ` [dpdk-dev] [PATCH 2/2] net/sfc: improve " Ivan Malov
2021-07-15 12:55 ` David Marchand
2021-07-15 13:43 ` Thomas Monjalon
2021-07-16 2:20 ` [dpdk-dev] [PATCH v2 0/2] RTE flow support logging improvements Ivan Malov
2021-07-16 2:20 ` [dpdk-dev] [PATCH v2 1/2] net/sfc: extend logging in MAE backend of RTE flow support Ivan Malov
2021-07-20 15:45 ` David Marchand [this message]
2021-07-16 2:20 ` [dpdk-dev] [PATCH v2 2/2] net/sfc: improve " Ivan Malov
2021-07-21 4:15 ` [dpdk-dev] [PATCH v3 0/2] RTE flow support logging improvements Ivan Malov
2021-07-21 4:15 ` [dpdk-dev] [PATCH v3 1/2] net/sfc: extend logging in MAE backend of RTE flow support Ivan Malov
2021-07-21 4:15 ` [dpdk-dev] [PATCH v3 2/2] net/sfc: improve " Ivan Malov
2021-07-23 21:31 ` [dpdk-dev] [PATCH v3 0/2] RTE flow support logging improvements Thomas Monjalon
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='CAJFAV8zove1ZgE9f9CTM4i=AK-tq9qYcM4M3XRJW7EwZNcD35w@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=amoreton@xilinx.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ivan.malov@oktetlabs.ru \
--cc=thomas@monjalon.net \
/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).