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 7CA82A0562; Fri, 19 Mar 2021 10:47:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5F0F140FC3; Fri, 19 Mar 2021 10:47:06 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 31D2F140FBE; Fri, 19 Mar 2021 10:47:05 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12J9eh74013840; Fri, 19 Mar 2021 02:47:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=79ileqDsb2Gl+yKhHcfID9b+3Y+LP2RKj1KyiWNdlc4=; b=AqsD1uGr8rD9+z2Yb1OiJxkoEBYP8fFdwAXbFkvsL6iwt0blSOUSpIwqKKgbEY2uI4Zx Pee6LXYhlt0tEPRhmnHVO04G2vLceA9PgW21a3iXaEQptTMEwq+0b3Z4bAL2EK0Or8zg T3bHmUHp/iSUqGMDLRsu02WkNBBQTs8vBzgIQ23ymsd1StdWHIHZGBhUFSnXYQsJBGvl +5HeoLLQ67Rjom+GrTeGat868bqyOzBxZeT+6SUhP0+4sJo+2h+OylG5Pc2xY1Rd+RnK HLFRD5OwfOwMuuz3JECqSUHXdgxW+rLRUoRfWUKckP+/Py/tSBRx/wQiTbDMfaHtrEqf iA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 37cakqaqug-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 19 Mar 2021 02:47:04 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Mar 2021 02:47:02 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 19 Mar 2021 02:47:02 -0700 Received: from EL-LT0043.marvell.com (unknown [10.193.38.106]) by maili.marvell.com (Postfix) with ESMTP id C2FCF3F703F; Fri, 19 Mar 2021 02:47:00 -0700 (PDT) From: Igor Russkikh To: CC: Rasesh Mody , Devendra Singh Rawat , Igor Russkikh , Date: Fri, 19 Mar 2021 10:46:56 +0100 Message-ID: <20210319094656.5576-3-irusskikh@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210319094656.5576-1-irusskikh@marvell.com> References: <20210319094656.5576-1-irusskikh@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-19_03:2021-03-17, 2021-03-19 signatures=0 Subject: [dpdk-dev] [PATCH v2 2/2] qede: make driver accept bigger rss tables 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" We found some dpdk applications blindly pass fixed side rss hash tables, and do not check driver/device capabilities. Moreover, many other drivers do not do such a strong check as well. So here we fix it, making qede accept any size rss_key. For larger key tables we just crop it with notice trace message. CC: stable@dpdk.org Signed-off-by: Igor Russkikh --- drivers/net/qede/qede_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index ab5f5b106..bfd38a977 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -2139,8 +2139,10 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev, /* RSS hash key */ if (key) { if (len > (ECORE_RSS_KEY_SIZE * sizeof(uint32_t))) { - DP_ERR(edev, "RSS key length exceeds limit\n"); - return -EINVAL; + len = ECORE_RSS_KEY_SIZE * sizeof(uint32_t); + DP_NOTICE(edev, false, + "RSS key length too big, trimmed to %d\n", + len); } DP_INFO(edev, "Applying user supplied hash key\n"); rss_params.update_rss_key = 1; -- 2.25.1