From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 273C6A05D3 for ; Fri, 24 May 2019 16:50:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A1E51B957; Fri, 24 May 2019 16:50:16 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 526CC1B94B for ; Fri, 24 May 2019 16:50:09 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id f12so4256903plt.8 for ; Fri, 24 May 2019 07:50:09 -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:in-reply-to:references; bh=D4Tf/76sTCwdVK8N3lPMjHIiIX+BSo+aSnWSOcDxKtY=; b=h1uB+MAKrMWe/qUcqrVV3xbRzkFKlLhUoTzwvrmEqvIlqxvL2fz+yxzYqWJS2GNiit IcQ9nW8JV0zYPRyW+JXoHMsi9Ibu8uN+2nfyA0gId52hVYIdJyoxSnnPhHP243DArIy9 TPzKdOcJVwdAhKAqP6yqdMWZUapBWzTi4gZrU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D4Tf/76sTCwdVK8N3lPMjHIiIX+BSo+aSnWSOcDxKtY=; b=XJ/c2En3G2/omINzW2m8Q6ZLzXciv+//2rSjFM2NEFmNtPadFaZJY642zFqQQEFLuL vQQfGbZPqD+TNknNpY0qRkvWq5cwtgmhvjUnaiLZVajBBTHdcV5QB3dwjgBsFkw+MNFg JOS+FJD+UL9c9BmBYpYERJ32qGNkP9o+T1UDI5uI91+tmMp30gAeUDsM/hWYiQs5wLdd PyRaKRW15oC+kHc3gnI5w8EHvjyLmxZs3ooEMA6cDU/XhEeGfwrHXM1uJ1mENmYnEcYH vHS+2hh2LFmEAH2tav/pPphzzWcGIgxbRVSWDmoWKyTQQds1lYG76FV7KWCgIkjhqk6Q RFbA== X-Gm-Message-State: APjAAAVogDygMOC+HRIw4/XrWxliBz4eKE7RNRHz+Fqkz9GYNOAblo6S JkwFv2k/pxWJhOx+pO3uBf2DDucKKLqOfVZVIvD6wzsIfTnS5QVLA226f2FXGSUtK/Iq+KifVRA 3rTLt/Ow1/04+5ZToMpNc8mP62PiN7sBrbWZkI1dmEBQyRI/n1OBHDkiGXsrOW3D+ X-Google-Smtp-Source: APXvYqzhKlcTM9dpqsV4TtBbjqqN7v3E9iD/aQqqInQjI77zGD3GSBEVndhcy+AItLd0BrA21xVl9Q== X-Received: by 2002:a17:902:324:: with SMTP id 33mr107541535pld.284.1558709408336; Fri, 24 May 2019 07:50:08 -0700 (PDT) Received: from localhost.localdomain ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id x23sm2723705pfn.160.2019.05.24.07.50.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 07:50:07 -0700 (PDT) From: Lance Richardson To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, maxime.coquelin@redhat.com Date: Fri, 24 May 2019 10:49:29 -0400 Message-Id: <20190524144935.18765-5-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190524144935.18765-1-lance.richardson@broadcom.com> References: <20190521213953.25425-1-ajit.khaparde@broadcom.com> <20190524144935.18765-1-lance.richardson@broadcom.com> Subject: [dpdk-dev] [PATCH v2 04/10] net/bnxt: fix RSS reta indirection table update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Ajit Khaparde We are trying to update the indirection table for all the VNICs. We should update the table only for the default vnic0. This patch fixes the above issue. Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations") Signed-off-by: Ajit Khaparde Reviewed-by: Rahul Gupta Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 18 ++++++++++-------- drivers/net/bnxt/bnxt_hwrm.c | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 52a6b94e0..2d892cd4f 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -983,8 +983,13 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev, { struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; - struct bnxt_vnic_info *vnic; - int i; + struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; + + /* Update the default RSS VNIC */ + if (!vnic) + return -EINVAL; + if (!vnic->rss_table) + return -EINVAL; if (!(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)) return -EINVAL; @@ -995,12 +1000,9 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev, "(%d)\n", reta_size, HW_HASH_INDEX_SIZE); return -EINVAL; } - /* Update the RSS VNIC(s) */ - for (i = 0; i < bp->max_vnics; i++) { - vnic = &bp->vnic_info[i]; - memcpy(vnic->rss_table, reta_conf, reta_size); - bnxt_hwrm_vnic_rss_cfg(bp, vnic); - } + + memcpy(vnic->rss_table, reta_conf, reta_size); + bnxt_hwrm_vnic_rss_cfg(bp, vnic); return 0; } diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index eb5c41ebb..8c4fa556d 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1607,6 +1607,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp, req.hash_key_tbl_addr = rte_cpu_to_le_64(vnic->rss_hash_key_dma_addr); req.rss_ctx_idx = rte_cpu_to_le_16(vnic->rss_rule); + req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); -- 2.17.1