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 42C5145B90; Mon, 21 Oct 2024 10:15:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4D9340662; Mon, 21 Oct 2024 10:15:05 +0200 (CEST) Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) by mails.dpdk.org (Postfix) with ESMTP id 3CB9540430 for ; Mon, 21 Oct 2024 10:15:04 +0200 (CEST) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-2884e7fadb8so2102796fac.2 for ; Mon, 21 Oct 2024 01:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1729498503; x=1730103303; 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=mXa+IG4iIJPXZYnuUPiFo95CYEFkNXn7vTWGNRu2NtM=; b=Zt2EUShoc+BJEBF564kSw2YH0NdkdZkwnPjep+fOQM5WGb3VT1wEDXSf/LHP8n6cs4 b9G/8lOaAY5k8c36ORD3YtmFwGIUTW37a48SDZoa+caPSGDHsWIL3ADvahyAflIbBTQU uHZ/b5rugu76guz35aeSeZ1qquGrrc9zWHTAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729498503; x=1730103303; 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=mXa+IG4iIJPXZYnuUPiFo95CYEFkNXn7vTWGNRu2NtM=; b=KMRXAKDq2JIlAwPZN+myO8XHYJxRxvhcrzlRtAYGVu/pUsXukM/GIcBRuvj7aDY5C3 ukcAmpYFe1PB0m/pdXhz1PJjOMhP3qwePaMq+9aaFXkUQksxdENs1MGXpJgEtpIxW80f GILmDnzYSRbHcJ5Q5xyxHasXvPPvmJTOYLi9+fXar+aKqnm6ELI/2LZawvTfIK5q5WWH 2JpetThUj+EJnJWfnrqCLrgIE5l9i65k7nIymkqFKkTT0iDy2/X6sphuekofzG/RlHP7 rguYBmYHrkQStW3+xatT6vX4cex466zRWKTP3PAyS+mrmY4fi7ESPsaBv5MtMix/x159 j0rg== X-Gm-Message-State: AOJu0YxzVSjulmOwF4R16x4lB9EZaq/NIzJhbah6E3AZoS2Up/26tAHo OJ011WOc1bxfOhTzKYRanWuRRNPbPRbu0RxUhfZVZJQq8ToeJrV55X8q5eiqtMq5W4GcAMz2PC2 Wz3rmF2N7+xGZWXSGYmla1Uc00ZJH+y10+Kb5Yjzs+RaHFJnlVsaV5RDn5fDb1RhvHuyd8DeS7r 1BhkmLOhQfx87Gm1Dn+q6wCbWT5cRddmdRpSgtUHylGA== X-Google-Smtp-Source: AGHT+IF2jB8t+JgR0NTCLjnpeaQ4kiJcCsD0LtUozkGx08BwdxOXYv6Cs54bOdDlBnwfnYNdJTjTQA== X-Received: by 2002:a05:6870:f6a8:b0:288:39e7:b54 with SMTP id 586e51a60fabf-2892c352776mr7543466fac.22.1729498503056; Mon, 21 Oct 2024 01:15:03 -0700 (PDT) Received: from dhcp-10-123-154-23.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec1313926sm2291631b3a.4.2024.10.21.01.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 01:15:02 -0700 (PDT) From: Sriharsha Basavapatna To: dev@dpdk.org Cc: Farah Smith , Sriharsha Basavapatna , Kishore Padmanabha , Shahaji Bhosle , Ajit Khaparde Subject: [PATCH v6 04/47] net/bnxt: tf_core: Thor TF EM key size check Date: Mon, 21 Oct 2024 13:55:24 +0530 Message-Id: <20241021082607.232829-5-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.39.0.189.g4dbebc36b0 In-Reply-To: <20241021082607.232829-1-sriharsha.basavapatna@broadcom.com> References: <20241021082607.232829-1-sriharsha.basavapatna@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 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") 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