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 73D5EA0C48; Tue, 20 Jul 2021 17:46:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54AEC4068B; Tue, 20 Jul 2021 17:46:13 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id F10E640689 for ; Tue, 20 Jul 2021 17:46:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626795971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lF75J7IUe4B/XSP/kqKm9PVwj4N+2fbfk2ptt8Kd8AQ=; b=c1gWfQlmNjTkI3KTOZjT/bAF9YEF6v4d57H9IQI7P13YU9ocOnLdwr8Gs81UzWC75SckFw RKriQ7san+aD4VG1rUgCMZLHhV0Lcwi4DbYPsoSouHrEGbW0iSPyJcMuvkRk3O8aSQqxg2 99SSuhbT8yiFn/yBe4x1R/XDjLlYU+I= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-264-jRiqD13FNAWm2zU1kRfWsA-1; Tue, 20 Jul 2021 11:46:10 -0400 X-MC-Unique: jRiqD13FNAWm2zU1kRfWsA-1 Received: by mail-vs1-f70.google.com with SMTP id w24-20020a67d1980000b029026e9898131eso5000520vsi.17 for ; Tue, 20 Jul 2021 08:46:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lF75J7IUe4B/XSP/kqKm9PVwj4N+2fbfk2ptt8Kd8AQ=; b=iovzAfHIQ9XdGrucnDK/nzUuigZ5i0UkTKArdIjgkgjf8M8a4mj5xiUDPFUnUqfSZ9 82c1cLqBF74GMPfWUJX+mAzQBagrAK8SOKI80p7k/iIbeeT+KuLMKMawX06qmMquY+AB rJEAGe5NszBqEIHB134gG+xbNHGdTEAGLBV6NdighaY/MubAh0nZ+nVTB6oC636/dxnj iFRMoE4tZ8pVNfjhYTDA9P9R5DhBfW3fy4aSsZnF5VlOYu59G4LChgEvKBEHNX7L5pzd PaBa8sJeWDCF8jFNxg85iG4rfX4kOiZZkRya7K0xl2t8q9/btFhlnFvZFnZs+BUMcbku 77qA== X-Gm-Message-State: AOAM530vr2/3FYx5LnRJtfk4vcb5u1cKljVHww7iIrXSzGIXnfnKT4in xYqJejNUl2XnN6ZqxUcU+7mR6AT8h7qAJmwRXoogHInBS8NUWGvleiIzB+1iFIsK6EjVVYbdZN/ 5lEylSpRnvcsB/8jEUKk= X-Received: by 2002:a1f:3ad0:: with SMTP id h199mr8555979vka.18.1626795969741; Tue, 20 Jul 2021 08:46:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWCoIeZf/bsv9OJpBb4AoT0ve+TpmrDPBbg/NHxgUen4h0BNfdCEVTXliNevYBZW+YvqdNf7tOs1Jsjv30fdQ= X-Received: by 2002:a1f:3ad0:: with SMTP id h199mr8555970vka.18.1626795969555; Tue, 20 Jul 2021 08:46:09 -0700 (PDT) MIME-Version: 1.0 References: <20210707105628.16705-1-ivan.malov@oktetlabs.ru> <20210716022043.3161-1-ivan.malov@oktetlabs.ru> <20210716022043.3161-2-ivan.malov@oktetlabs.ru> In-Reply-To: <20210716022043.3161-2-ivan.malov@oktetlabs.ru> From: David Marchand Date: Tue, 20 Jul 2021 17:45:58 +0200 Message-ID: To: Ivan Malov Cc: dev , Thomas Monjalon , Andrew Rybchenko , Andy Moreton Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/sfc: extend logging in MAE backend of RTE flow support 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 Sender: "dev" On Fri, Jul 16, 2021 at 4:20 AM Ivan Malov 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 > Reviewed-by: Andrew Rybchenko > Reviewed-by: Andy Moreton > --- > 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