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 13C4845D39; Mon, 18 Nov 2024 18:36:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9ADBF42793; Mon, 18 Nov 2024 18:36:24 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 5257E410E8 for ; Mon, 18 Nov 2024 18:36:22 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-723db2798caso3599042b3a.0 for ; Mon, 18 Nov 2024 09:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1731951380; x=1732556180; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KpxaAyZkeN5QwpyYJHHOafW1ARq+GKp78+gzjz1zjMQ=; b=OprwAWAQp0Sk8V6MeoOU/pII89ZwfTbNmTJlCu45H63TVcP7LTZo+5rc1dAlwySK5q 71m1GVE0M4HupdgzB1AjOQeRBX89R+0+8At9GvHXyX4YQtEAAjn4Ti1QRSunK9ftd/zf W7aN9x0bgBCmTVnZ+VdidkNhwAwS6EZvi8LDU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731951380; x=1732556180; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KpxaAyZkeN5QwpyYJHHOafW1ARq+GKp78+gzjz1zjMQ=; b=WwJATUoNaLnzdVtzL1/6srDCdNfxYupOy6yyMH7wokcLljDauo3ll3yrMFsV2UWgKy HXcUxelvvX4JfZGOXx2TnueFW8bUaRXx5UlKNSxdo54fTI0ZtsGong2PcoQjhMz8O0mT ucdLFdP7j8OO8rARXf/zz5RSVJPaW7U2D1EkVJW3K7FVoJ70oCrZag+bZ8GZL9n9UCV8 Thh1sCLAWYkuHE/NiRfH2IGxQeBU4OO+rdnrJs1liPeomBz23vd6PTzv0fcXB7Xz5szc lsLqBUkDgeX8asFHB9pHVlG277/Q0E2Eun2CyfaMOhmdHuv56rAFrQzK3SnhcNd8jd4L u3/w== X-Gm-Message-State: AOJu0YwMLLpd34c102qWndhikKxsIc2FUu4YOsyRR+1+TgzyVhNdYcVU wyx1utQBSXHK0TMfv3csrcFCBnAvs22Oz1DrfM/aF6pCNqwi2Bzth8M3JXgNp9aX3gEEbG1CQ/7 wt7B5AkCOCXOhXCdxixMNdvD76cmvVtJgBeuvKTx2kHhDFXVYtt9Cujgt7e5peOwqaa1jeTEYwn ALQSKe6Icn6HjbMtJY1dso7cwwDb8p X-Google-Smtp-Source: AGHT+IG6nur2C7v6BPpVn+o3UvHzrQfSZVLIacPQ/937dfuDowlCIbJp6qPWQejN8T5eO0nyT5szAw== X-Received: by 2002:a05:6a00:3a14:b0:71e:755c:6dad with SMTP id d2e1a72fcca58-72476b72566mr16631788b3a.5.1731951379975; Mon, 18 Nov 2024 09:36:19 -0800 (PST) Received: from C02GC2QQMD6T.wifi.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724771229d2sm6410438b3a.80.2024.11.18.09.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 09:36:19 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: Kishore Padmanabha Subject: [PATCH 3/3] net/bnxt: set max VFs count for P7 Date: Mon, 18 Nov 2024 09:36:13 -0800 Message-Id: <20241118173613.94224-4-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20241118173613.94224-1-ajit.khaparde@broadcom.com> References: <20241118173613.94224-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The number of max VFs per PF is 128 for P7 devices. Cap the vnic hash table creation if the number of max VNICs is less than 8. Signed-off-by: Kishore Padmanabha Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_vnic.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 0402de3eb9..b8b0ecc7e7 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -260,6 +260,7 @@ struct bnxt_pf_info { #define BNXT_MAX_VFS(bp) ((bp)->pf->max_vfs) #define BNXT_MAX_VF_REPS_P4 64 #define BNXT_MAX_VF_REPS_P5 256 +#define BNXT_MAX_VF_REPS_P7 128 #define BNXT_MAX_VF_REPS(bp) \ (BNXT_CHIP_P5(bp) ? BNXT_MAX_VF_REPS_P5 : \ BNXT_MAX_VF_REPS_P4) diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c index 7b028f2ee5..4b5ac84d70 100644 --- a/drivers/net/bnxt/bnxt_vnic.c +++ b/drivers/net/bnxt/bnxt_vnic.c @@ -978,6 +978,12 @@ int32_t bnxt_vnic_queue_db_init(struct bnxt *bp) hash_tbl_params.name = hash_tbl_name; hash_tbl_params.entries = (bp->max_vnics > BNXT_VNIC_MAX_SUPPORTED_ID) ? BNXT_VNIC_MAX_SUPPORTED_ID : bp->max_vnics; + + /* if the number of max vnics is less than bucket size */ + /* then let the max entries size be the least value */ + if (hash_tbl_params.entries <= RTE_HASH_BUCKET_ENTRIES) + hash_tbl_params.entries = RTE_HASH_BUCKET_ENTRIES; + hash_tbl_params.key_len = BNXT_VNIC_MAX_QUEUE_SZ_IN_8BITS; hash_tbl_params.socket_id = rte_socket_id(); bp->vnic_queue_db.rss_q_db = rte_hash_create(&hash_tbl_params); -- 2.39.5 (Apple Git-154)