From patchwork Tue Oct 26 05:14:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 102856 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D2C0A0C47; Tue, 26 Oct 2021 07:14:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 903B540A4B; Tue, 26 Oct 2021 07:14:39 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id 12DD74003E for ; Tue, 26 Oct 2021 07:14:38 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id na16-20020a17090b4c1000b0019f5bb661f9so740502pjb.0 for ; Mon, 25 Oct 2021 22:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=Ce1s8TUTXBF1iwZGzrlRMhDKg8+6JH36WVIXkKH2nos=; b=XK0xwt9SH7gfVbiYD1wgkg9N989ZoLU7Y0setyHNGV53DIjs0l5oxs6wFDXGUWk7hU zj/9wdBiIUGfbz0f4mZIloNNl0zYGM5kqSDlFTLeJ/ZD9GzkuWXsZibS8k16Ci1cziHv TnA+d1r5KKzDH7QYBMxrMqJwBQwy83Yr1dqDI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=Ce1s8TUTXBF1iwZGzrlRMhDKg8+6JH36WVIXkKH2nos=; b=A/Da0wHojEhAi6DGx3kUozMsYl+E5EEuSuXSqhaAhf6o+tP0GDhgUmVC3wJFAF4y7f mB6fteMcPprZnR4yWaiEikA5oamghLXhWMvmacdfygAeoZsruzU9EoFwB/FVNcNW7hTQ f6Dyo8dgpzj9WhyROBz/LhtxdTyah/8PZL2hV7LkUG8WumrLDD181MkBwqPGREaTqWuZ SI/l6eMFSrHEkglljBcsJ8rxWzZ8+QxQOnEUt4SSGUGxk/rpCLRB5sdwCUA+Npp/FN1v I0TbMuxI+PBYdhLCXoZRNeZO1+q7qin7mVSXonfEjHc6oKFptTkITqFqC434f8VIFZFU 6NJw== X-Gm-Message-State: AOAM532JQFYaVUIU5ykbVCS3eet2s1JR0BSqEYiH8imk1kg31rx8F74U 6Jmoulhmkif2PQuTKutC5J/jSsAEHKGNq9lwWS9nn/CJGp23v85GRfzcUCiubwYgy2eL1CqjAek Ty/z+3MQ2M3UVBh46E7qKwRaHkeX+nPEd9jpegy3JmM+S1WPjn5ZqnNTm/GhiVS8= X-Google-Smtp-Source: ABdhPJwBE4A0fAoO1ORz81yLdywNgSIR2nvEVKt1QEazhCG8Y4ObjnsH0MZXqO1+gfMe0aVE/EEdKA== X-Received: by 2002:a17:90b:1c92:: with SMTP id oo18mr40535717pjb.56.1635225276807; Mon, 25 Oct 2021 22:14:36 -0700 (PDT) Received: from localhost.localdomain ([136.52.99.246]) by smtp.gmail.com with ESMTPSA id r8sm18164167pgp.30.2021.10.25.22.14.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Oct 2021 22:14:36 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: Kalesh AP , Somnath Kotur Date: Mon, 25 Oct 2021 22:14:32 -0700 Message-Id: <20211026051432.83989-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH] net/bnxt: fix RSS action parser 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" Minor fixes are needed in the RTE_FLOW RSS action parser. 1. Update the comment in the parser to indicate rss level 1 implies RSS on outer header. 2. RSS action will not be supported if level is > 1. 3. RSS action will not be supported if user or application specifies MARK or COUNT action. 4. If RSS types is not specified i.e., is 0, the best effort RSS should use IPV4 and IPV6 headers. Currently we are considering only IPV4. Fixes: fe0bab7eb34e ("net/bnxt: enhance support for RSS action") Signed-off-by: Ajit Khaparde Acked-by: Kalesh AP Acked-by: Somnath Kotur --- drivers/net/bnxt/bnxt_flow.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index ced697a739..9526a8fc5a 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1084,10 +1084,6 @@ bnxt_validate_rss_action(const struct rte_flow_action actions[]) break; case RTE_FLOW_ACTION_TYPE_RSS: break; - case RTE_FLOW_ACTION_TYPE_MARK: - break; - case RTE_FLOW_ACTION_TYPE_COUNT: - break; default: return -ENOTSUP; } @@ -1151,11 +1147,10 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp, } /* Currently RSS hash on inner and outer headers are supported. - * 0 => Default setting - * 1 => Inner - * 2 => Outer + * 0 => Default (innermost RSS) setting + * 1 => Outermost */ - if (rss->level > 2) { + if (rss->level > 1) { rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, @@ -1177,7 +1172,7 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp, } /* If RSS types is 0, use a best effort configuration */ - types = rss->types ? rss->types : RTE_ETH_RSS_IPV4; + types = rss->types ? rss->types : ETH_RSS_IPV4 | ETH_RSS_IPV6; hash_type = bnxt_rte_to_hwrm_hash_types(types);