From patchwork Mon Nov 20 17:06:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 134488 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4934143381; Mon, 20 Nov 2023 18:10:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C190642E3A; Mon, 20 Nov 2023 18:09:58 +0100 (CET) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 5A68042E33 for ; Mon, 20 Nov 2023 18:09:55 +0100 (CET) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6c431b91b2aso3943588b3a.1 for ; Mon, 20 Nov 2023 09:09:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700500194; x=1701104994; 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=JMUx+11rjpf9bU7ONS1V+udoTDSscwR3YdxNfZbKGho=; b=xjqj2Pv/57JYf6yZSuy1JkLuc/EMUS4hSJukSiPoJ+U6WtXVDyaiPeIU1vKdNaiwpF HcpUTwmOHSD0e87S0owvtai5AcqQvOfuNd8zG5A+4zaiVa6swzXTQ8s6wMwP7XnRSyAT ZbUjVkA2ETUJWusR/kmYOfn/z0zjmyo86vd8+Dnmz0r28LgQiCxNx1986y7I6mRec1o8 FxNHyJKyMsSXliEytd/G9hzFCbdwNu6U9eqpbyQng7wUZLptUq5bnfNoZLUpyEBlXRBl kj7JN3y5ulrOCiqplCvIEeJwXtfAKnR6pjWrm2Bx9AdDLsV4XIS7F7QfNMUumAWcH40B +4KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700500194; x=1701104994; 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=JMUx+11rjpf9bU7ONS1V+udoTDSscwR3YdxNfZbKGho=; b=Ad7MJtRL1fG+c0CVhhpEyXoNNdB4aQWkakV33xQS95QiVIW3B4vxGIvpGankAEDA0S xQfMBH7kZqIijI68CG8whWPkZJed0xYw62a4OZG76wX97VyiTVCdOWugiewArzpmqIU7 yJs5GKR/5qSkLLbLvSs6DUrAYW/RZWhbRB2N9bPwUYf4DWFXQe8zQRB57NJLChFsDbKf GALwuLKEZ8litSfKzToeWJahSIJpbZaoGm9vy9T9nCnDgdj7MIRSE0muV4F0K4vI3Gbc UpAABDW5qplz6jix8/PGDLazHhLXF42Uy4bXlhXJd6Hqn9wKxCnxEp+Uzsm4B3RRTwIK CATA== X-Gm-Message-State: AOJu0YzWz2QDUyFj/oT26VrT9EKFAOJoLJQmNSSZkBrfE2GFYWkZgzMF JzT+8biOS/HpCpi+9gb1hceNhRcU7JAjqUP6914= X-Google-Smtp-Source: AGHT+IE9on/cfICQ0yrY+dEFQIzdx0CFgy7FMV0+BK1Xqs16mHIJWEwOZr5Ok/HpDuu8hKjRKcDyLw== X-Received: by 2002:a05:6a00:3a12:b0:692:af9c:d96a with SMTP id fj18-20020a056a003a1200b00692af9cd96amr6277327pfb.5.1700500194419; Mon, 20 Nov 2023 09:09:54 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p18-20020a62ab12000000b006cb7f9da229sm2894681pff.202.2023.11.20.09.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:09:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , Akhil Goyal , Fan Zhang Subject: [PATCH v4 02/10] cryptodev: replace zero length array with flex array Date: Mon, 20 Nov 2023 09:06:57 -0800 Message-ID: <20231120170942.197172-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231120170942.197172-1-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231120170942.197172-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Stephen Hemminger Reviewed-by: Tyler Retzlaff Acked-by: Anoob Joseph --- drivers/crypto/cnxk/cnxk_se.h | 5 ++++- lib/cryptodev/cryptodev_pmd.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index c2a807fa9428..f86b859a08a4 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -29,8 +29,11 @@ enum cpt_dp_thread_type { CPT_DP_THREAD_TYPE_PT, }; +#define SYM_SESS_SIZE sizeof(struct rte_cryptodev_sym_session) + struct cnxk_se_sess { - struct rte_cryptodev_sym_session rte_sess; + uint8_t rte_sess[SYM_SESS_SIZE]; + uint8_t aes_gcm : 1; uint8_t aes_ccm : 1; uint8_t aes_ctr : 1; diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h index 3bb3d95c1338..0732b356883c 100644 --- a/lib/cryptodev/cryptodev_pmd.h +++ b/lib/cryptodev/cryptodev_pmd.h @@ -153,7 +153,7 @@ struct rte_cryptodev_sym_session { RTE_MARKER cacheline1 __rte_cache_min_aligned; /**< Second cache line - start of the driver session data */ - uint8_t driver_priv_data[0]; + uint8_t driver_priv_data[]; /**< Driver specific session data, variable size */ };