From patchwork Wed Apr 27 14:58:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh A P X-Patchwork-Id: 110359 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 EF099A034C; Wed, 27 Apr 2022 16:59:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93DD242819; Wed, 27 Apr 2022 16:58:41 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.166.231]) by mails.dpdk.org (Postfix) with ESMTP id C1E7442804 for ; Wed, 27 Apr 2022 16:58:39 +0200 (CEST) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 5BBC8C0000F1; Wed, 27 Apr 2022 07:58:38 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 5BBC8C0000F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1651071519; bh=ed5LyDCHL4hhbfwkUbLx990Hx11ELATZ6GTRq6V65Pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mje3Y35t0oB8uWq8H+ZzM0Po7axhC2PjBt7lXSdClOuHU+Fxga7ycsKg4/ih5b9Xy gJ4KTB4KSdIi+CHcr65nxfkMreXXzwG4lOW+wodR7LH1v2+Fsnp/WvPzXtPDwaCsoa sh6OGmsF+a1VXG9gs0HNtVBxrlszrlXE4RgWarJs= From: Kalesh A P To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com Subject: [PATCH 07/17] net/bnxt: fix RSS action support Date: Wed, 27 Apr 2022 20:28:11 +0530 Message-Id: <20220427145821.5987-8-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20220427145821.5987-1-kalesh-anakkur.purayil@broadcom.com> References: <20220427145821.5987-1-kalesh-anakkur.purayil@broadcom.com> 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 From: Kalesh AP Specifying a subset of Rx queues created by the application in the "flow create" command is invalid. User must either specify all Rx queues created or no queues. Also removed a wrong comment as RSS action will not be supported if user or application specifies MARK or COUNT action. Fixes: 239695f754cb ("net/bnxt: enhance RSS action support") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_flow.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 71a8edd..bd96bba 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1074,7 +1074,6 @@ bnxt_update_filter_flags_en(struct bnxt_filter_info *filter, filter1, filter->fw_l2_filter_id, filter->l2_ref_cnt); } -/* Valid actions supported along with RSS are count and mark. */ static int bnxt_validate_rss_action(const struct rte_flow_action actions[]) { @@ -1123,6 +1122,17 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp, rss = (const struct rte_flow_action_rss *)act->conf; + /* must specify either all the Rx queues created by application or zero queues */ + if (rss->queue_num && vnic->rx_queue_cnt != rss->queue_num) { + rte_flow_error_set(error, + EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "Incorrect RXQ count"); + rc = -rte_errno; + goto ret; + } + /* Currently only Toeplitz hash is supported. */ if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT && rss->func != RTE_ETH_HASH_FUNCTION_TOEPLITZ) {