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 1515E45C9A for ; Thu, 7 Nov 2024 14:42:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C24642F49; Thu, 7 Nov 2024 14:42:43 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 2BD4042F33 for ; Thu, 7 Nov 2024 14:42:42 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-71e52582cf8so718067b3a.2 for ; Thu, 07 Nov 2024 05:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1730986961; x=1731591761; 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=sKvQEMiAwAWTrvfbPbgboY9lFIH8adOgPShL87/Bo/Q=; b=Kz65wm4zPeMS++ng9qFAc9SrvoTgClCxAjMJrod2H+1n1qzpVpe+NHRXekFILsrEnW 8L0cB7bgVQB7WitgVjrKY2SH2lBWGHpEpjPu9Rm0vKYLdYcsO9n1J1UenzNOAJGDbhw8 7+yjOu3+HX+Kc+WEkmRx6H/DHVt+cc3hzuAkI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730986961; x=1731591761; 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=sKvQEMiAwAWTrvfbPbgboY9lFIH8adOgPShL87/Bo/Q=; b=frXdu6dS30V+ECNrxk9Hr5QlXdc/DyPbZ0mJ/Qv1ACbMiFgiajoSkAAeRr4oAIrZQz kAvxkOr/1At7X7AsRqwqRvyIbBSLCxn+AhMQjsSZBSwJwv+xNjpK7xqleauAvU8DLyLT ZJwa3PKAvrx1+kmkW3ZeFeFXm8ZLy32ApFzGTHIifshq8v72g4meoiRNUqUafaBkZb9r YPqMQAmXnjmkKXgLBmCCaY9WS0eRYp07p2UwS6CQuWKJV7eCK6X2b/MLFBrVTMfg742t mFzIWTO2z6Ujsyd5UPaQ1Fzu1CKwGa7O1+bfNBr9x/4emTZ7aSwstvDZ5FJKwePqBGfU pLbA== X-Forwarded-Encrypted: i=1; AJvYcCW9XAkUcWThhcSSR7fuN17IkA2C2yaGg/euwV82T+Z3kbbVn5nKL4aqFkSe041DbvQvJlhRhoA=@dpdk.org X-Gm-Message-State: AOJu0YwGibHQ7XOgwsLoS/4ANjHDiaucVE8oynJS9GTfFjMs4OJgIhE4 5lzNP7SABMqPnAXZPV12IagZ/BeCAIxpizhQkcVogL2QaU2RYMOUTd8hzw/Jig== X-Google-Smtp-Source: AGHT+IFfv/tPBOL4H87fjIC75zON7AwS4d/huFWW8UU0KeWxfLQqQ3CMRu2SBG7FBbFnZt4p37U2rQ== X-Received: by 2002:a05:6a20:244e:b0:1db:e4c8:3437 with SMTP id adf61e73a8af0-1dbe4c86583mr18100375637.20.1730986961100; Thu, 07 Nov 2024 05:42:41 -0800 (PST) Received: from dhcp-10-123-154-23.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9a5f52969sm1409878a91.2.2024.11.07.05.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 05:42:39 -0800 (PST) From: Sriharsha Basavapatna To: dev@dpdk.org Cc: Farah Smith , stable@dpdk.org, Sriharsha Basavapatna , Kishore Padmanabha , Shahaji Bhosle , Ajit Khaparde Subject: [PATCH v8 04/47] net/bnxt: tf_core: Thor TF EM key size check Date: Thu, 7 Nov 2024 19:22:11 +0530 Message-Id: <20241107135254.1611676-5-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.39.0.189.g4dbebc36b0 In-Reply-To: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> References: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Farah Smith The maximum EM key size is 640 bits for Thor. But the lookup record + the key size is 679 bits. This value must be rounded up to a 128 bit aligned number. So the size check should be 96 bytes rather than 80. This fix allows keys > 601 bits to be successfully inserted. Fixes: 539931eab3a5 ("net/bnxt: support EM with FKB") Cc: stable@dpdk.org Signed-off-by: Farah Smith Signed-off-by: Sriharsha Basavapatna Reviewed-by: Farah Smith Reviewed-by: Kishore Padmanabha Reviewed-by: Shahaji Bhosle Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_core/tf_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c index 08e9783d52..dd5ea1c80e 100644 --- a/drivers/net/bnxt/tf_core/tf_msg.c +++ b/drivers/net/bnxt/tf_core/tf_msg.c @@ -25,7 +25,7 @@ */ #define TF_MSG_SET_GLOBAL_CFG_DATA_SIZE 16 #define TF_MSG_EM_INSERT_KEY_SIZE 64 -#define TF_MSG_EM_INSERT_RECORD_SIZE 80 +#define TF_MSG_EM_INSERT_RECORD_SIZE 96 #define TF_MSG_TBL_TYPE_SET_DATA_SIZE 88 /* Compile check - Catch any msg changes that we depend on, like the -- 2.39.3