[v8,04/47] net/bnxt: tf_core: Thor TF EM key size check

Message ID 20241107135254.1611676-5-sriharsha.basavapatna@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series TruFlow update for Thor2 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sriharsha Basavapatna Nov. 7, 2024, 1:52 p.m. UTC
From: Farah Smith <farah.smith@broadcom.com>

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 <farah.smith@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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