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 A2151433F5; Wed, 29 Nov 2023 03:42:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CF2242E30; Wed, 29 Nov 2023 03:42:36 +0100 (CET) Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) by mails.dpdk.org (Postfix) with ESMTP id 788FC42E2A for ; Wed, 29 Nov 2023 03:42:34 +0100 (CET) Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-3b845ba9ba9so3845694b6e.3 for ; Tue, 28 Nov 2023 18:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701225753; x=1701830553; 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=Ju7X2QfAhM5SsBieA9kM/vF7mFDfPOg1lyktmO3Sowk=; b=GrcTBdoSmqzIohCUfXF7jFqgCgMWpC2d5jHRtVUxz1FT9vqcmu8iXqWddMQttVMEOy EplhCTcBxUOaMASHvODgmlZm9lINDyYfrCd3S6oTs38qwnni/fHWSwZ3xrpF6xbSvH9c VR2CPWiqa5ny5E//e0I+WDWGFG4tS4Y7rD6xMTPrT07PgGsVCHPMrzberMrzpIgVmgWG n8FSYDXKUpH+Nh1aAlJsvrs/Kdyuav83J0dGzTsIOrJ2kDBV+Uky2kkGnK5X2tcgGJbL W3tjzhBtgtVPjuRdfYROKaiYiRgx36RFdduoACl9dyWPDD5VHogqpsyWvF6MJjmMR4Iv MVRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701225753; x=1701830553; 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=Ju7X2QfAhM5SsBieA9kM/vF7mFDfPOg1lyktmO3Sowk=; b=AEgrFuePIh0f4uiah4U5mGoms4mYkAqMvcGQdPsjmd89jKNh1sDywNBJe0t8bxeKYS hry5iWZp99zEO6NvNMkt7iqAXGOiQX3zqGLiUI87XszAaxmONxjkejw2RkVratZGJBWU QpEl2WIfsZsyqrWfO3VoaHlZde2q7qQDq2rGlAqYNfobEZa8la1XMbKMmBu9d4Kpae5R RHYiz/9Ycfn/shra9zhN88NZDt3gp2uaXtmElFJGaXV8rYIqLbPHMi0DwWWv6tRdfP4G 7w3i47i2mwrVCPA85GKKk9L3kCPMpoTnJGyuCKCLhw60OBhLE19MCFdFXrN8/7uMtH/V S6cg== X-Gm-Message-State: AOJu0YyO6Dr41GhA5dyzfQ3nj1fcqb9GVc4uHMm5d2pp9999imc2QknQ mkgd/hQbSejpj6p2SRMC0pn2t3wxn28KU7f4yPE= X-Google-Smtp-Source: AGHT+IFpYYvCT1lUmoRgyxvK/r+dlnsrOq3zR5cPm+ZzxIOmcA8YaykXEshyVKZAh73GOIylqJLU3Q== X-Received: by 2002:a05:6808:1290:b0:3b8:4d54:3b51 with SMTP id a16-20020a056808129000b003b84d543b51mr24725774oiw.7.1701225753646; Tue, 28 Nov 2023 18:42:33 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j17-20020aa78011000000b006cb95f6aa0fsm9674900pfi.150.2023.11.28.18.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 18:42:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Anoob Joseph , Ankur Dwivedi , Tejasree Kondoj , Akhil Goyal , Fan Zhang Subject: [PATCH v5 02/10] cryptodev: replace zero length array with flex array Date: Tue, 28 Nov 2023 18:39:09 -0800 Message-ID: <20231129024221.57653-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231129024221.57653-1-stephen@networkplumber.org> References: <20230113215205.125767-1-stephen@networkplumber.org> <20231129024221.57653-1-stephen@networkplumber.org> 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 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 */ }; -- 2.42.0