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 90B9745B99; Tue, 22 Oct 2024 04:16:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E30A402BC; Tue, 22 Oct 2024 04:16:20 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id A39AC40295 for ; Tue, 22 Oct 2024 04:16:18 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20caccadbeeso56228025ad.2 for ; Mon, 21 Oct 2024 19:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729563378; x=1730168178; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=WcwMeSWK6BSOzMqYntoShn4/WJ4TjD49kerMrIuwTC0=; b=NNGfgLixrfRuN+FOdvIDJgDqZwo0J4FvP87NnnLu+O1kPXULGlzcwL+fQVR2KPw51o ldOdHqYf6MaXtkfNfqPD09almvOtZ6l25SYUqApExAUN/LCI0+t+kreSSlrp97NH5Czp 0dXEKWyraXuwlXG38fPbeSGjDa5j6z8DEZJcqYFedEQ6KRvvE8st149aFLgnGDd0d3HA cC/P+IlDtcLUz1mu7XVUAUkSiABgJ+Kb+Q1w7skwzTlyBWqc3BqvO4bK+8oEIH5SGcvn GNui5lFmjy3FW6YtvScLgf6Dep+ohjFGfaDP48Ri3U+UnSu2Y9WfCRj6DMlaAFckoOXH 4D2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729563378; x=1730168178; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WcwMeSWK6BSOzMqYntoShn4/WJ4TjD49kerMrIuwTC0=; b=EM7PlXIlsk58ux8ScOmoSqY1TRdF1WwVCha3ooQN47lNAjU1nRs2GHZA5/tEUmAeHd Hj4F7yYJe+FHA6WEaJObFt62seenwzmVEDkudrj+OjLolkrRlHDVV7Bds4ga7j6Dg+Eg An4+yH/gcEgYlno/uoL1KXNamVV0B2zpl+WzCxn1cW87cjInd1Wi7xbxBHaXmg6fxO6d O++HmquowbPfE2J4FUuqmfMu85DXRDi06IkejhZYmvlrFLDcdtN3KG7Anmyf1buW46Fo VALROWA1ytepD3frZo7zc2B4DhpO7T9f5Tj2pmSRgp3M0SKOe6+RHzrpPKfAwkJM7NbZ OTwA== X-Gm-Message-State: AOJu0YxTms7s9gs0w16PPgCDSVgadVhB+fqnVJgeQf51pvfPXoDCpcYn bqLWUIMLxhz1E83k69V1wxP1xeSs001z/pDU8u1jJ7uYceCajq8H6ngHrRt8sSw= X-Google-Smtp-Source: AGHT+IH3TSNQsgiC4lDuxCETbph51eg2+YbPsuF5+Pb9xJPn01gXjBFus3ts1PKZ1cFsw8ySTD9itQ== X-Received: by 2002:a17:902:f68d:b0:20c:7bee:a7d3 with SMTP id d9443c01a7336-20e984c5e14mr14226845ad.50.1729563377641; Mon, 21 Oct 2024 19:16:17 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e7f0bd2d9sm32605935ad.142.2024.10.21.19.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 19:16:17 -0700 (PDT) Date: Mon, 21 Oct 2024 19:16:15 -0700 From: Stephen Hemminger To: Hanxiao Li Cc: dev@dpdk.org Subject: Re: [PATCH v12 03/12] common/zsda: add some common functions Message-ID: <20241021191615.1fc74c31@hermes.local> In-Reply-To: <20241019110428.1970056-4-li.hanxiao@zte.com.cn> References: <20241017092310.1863628-2-li.hanxiao@zte.com.cn> <20241019110428.1970056-1-li.hanxiao@zte.com.cn> <20241019110428.1970056-4-li.hanxiao@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Sat, 19 Oct 2024 19:04:05 +0800 Hanxiao Li wrote: > +struct zsda_op_cookie { > + bool used; > + bool decomp_no_tail; > + void *op; > + uint16_t sid; > + struct zsda_sgl sgl_src; > + struct zsda_sgl sgl_dst; > + phys_addr_t sgl_src_phys_addr; > + phys_addr_t sgl_dst_phys_addr; > + phys_addr_t comp_head_phys_addr; > + > + uint8_t comp_head[COMP_REMOVE_SPACE_LEN]; > +} __rte_packed; If the config/meson.build file is changed to re-enable some compiler warnin= gs that are being suppressed. It shows that this structure might be problemati= c. This is not a show stopper. But it does indicate problems (especially on Ar= m where unaligned access is more of a problem). In file included from ../drivers/common/zsda/zsda_common.c:5: ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ That means the void * value is not aligned etc. Full list of warnings [1094/3082] Compiling C object drivers/libtmp_rte_common_zsda.a.p/crypto_zs= da_zsda_sym.c.o In file included from ../drivers/crypto/zsda/zsda_sym.h:8, from ../drivers/crypto/zsda/zsda_sym.c:8: ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:252:25: warning: =E2=80=98sgl_src=E2= =80=99 offset 12 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t a= ligned to 64 [-Wpacked-not-aligned] 252 | struct zsda_sgl sgl_src; | ^~~~~~~ ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:253:25: warning: =E2=80=98sgl_dst=E2= =80=99 offset 8204 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t= aligned to 64 [-Wpacked-not-aligned] 253 | struct zsda_sgl sgl_dst; | ^~~~~~~ ../drivers/crypto/zsda/zsda_sym.c: In function =E2=80=98zsda_build_cipher_r= equest=E2=80=99: ../drivers/crypto/zsda/zsda_sym.c:142:36: warning: taking address of packed= member of =E2=80=98struct zsda_op_cookie=E2=80=99 may result in an unalign= ed pointer value [-Waddress-of-packed-member] 142 | struct zsda_sgl *sgl_src =3D (struct zsda_sgl *)&cookie->sg= l_src; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ ../drivers/crypto/zsda/zsda_sym.c:143:36: warning: taking address of packed= member of =E2=80=98struct zsda_op_cookie=E2=80=99 may result in an unalign= ed pointer value [-Waddress-of-packed-member] 143 | struct zsda_sgl *sgl_dst =3D (struct zsda_sgl *)&cookie->sg= l_dst; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ ../drivers/crypto/zsda/zsda_sym.c: In function =E2=80=98zsda_build_hash_req= uest=E2=80=99: ../drivers/crypto/zsda/zsda_sym.c:220:36: warning: taking address of packed= member of =E2=80=98struct zsda_op_cookie=E2=80=99 may result in an unalign= ed pointer value [-Waddress-of-packed-member] 220 | struct zsda_sgl *sgl_src =3D &cookie->sgl_src; | ^~~~~~~~~~~~~~~~ [1095/3082] Compiling C object drivers/libtmp_rte_common_zsda.a.p/crypto_zs= da_zsda_sym_pmd.c.o In file included from ../drivers/crypto/zsda/zsda_sym.h:8, from ../drivers/crypto/zsda/zsda_sym_pmd.c:9: ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:252:25: warning: =E2=80=98sgl_src=E2= =80=99 offset 12 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t a= ligned to 64 [-Wpacked-not-aligned] 252 | struct zsda_sgl sgl_src; | ^~~~~~~ ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:253:25: warning: =E2=80=98sgl_dst=E2= =80=99 offset 8204 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t= aligned to 64 [-Wpacked-not-aligned] 253 | struct zsda_sgl sgl_dst; | ^~~~~~~ [1096/3082] Compiling C object drivers/librte_dma_cnxk.a.p/meson-generated_= .._rte_dma_cnxk.pmd.c.o [1097/3082] Generating drivers/rte_mempool_cnxk.sym_chk with a custom comma= nd (wrapped by meson to capture output) [1098/3082] Generating drivers/rte_mempool_dpaa.sym_chk with a custom comma= nd (wrapped by meson to capture output) [1099/3082] Compiling C object drivers/libtmp_rte_common_zsda.a.p/compress_= zsda_zsda_comp_pmd.c.o In file included from ../drivers/compress/zsda/zsda_comp.h:10, from ../drivers/compress/zsda/zsda_comp_pmd.c:7: ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:252:25: warning: =E2=80=98sgl_src=E2= =80=99 offset 12 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t a= ligned to 64 [-Wpacked-not-aligned] 252 | struct zsda_sgl sgl_src; | ^~~~~~~ ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:253:25: warning: =E2=80=98sgl_dst=E2= =80=99 offset 8204 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t= aligned to 64 [-Wpacked-not-aligned] 253 | struct zsda_sgl sgl_dst; | ^~~~~~~ [1100/3082] Linking static target drivers/libtmp_rte_dma_dpaa2.a [1101/3082] Compiling C object drivers/libtmp_rte_common_zsda.a.p/crypto_zs= da_zsda_sym_session.c.o In file included from ../drivers/crypto/zsda/zsda_sym_session.c:7: ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:252:25: warning: =E2=80=98sgl_src=E2= =80=99 offset 12 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t a= ligned to 64 [-Wpacked-not-aligned] 252 | struct zsda_sgl sgl_src; | ^~~~~~~ ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:253:25: warning: =E2=80=98sgl_dst=E2= =80=99 offset 8204 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t= aligned to 64 [-Wpacked-not-aligned] 253 | struct zsda_sgl sgl_dst; | ^~~~~~~ [1102/3082] Generating drivers/rte_mempool_dpaa2.sym_chk with a custom comm= and (wrapped by meson to capture output) [1103/3082] Compiling C object drivers/libtmp_rte_common_zsda.a.p/common_zs= da_zsda_qp.c.o In file included from ../drivers/common/zsda/zsda_qp.c:9: ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:252:25: warning: =E2=80=98sgl_src=E2= =80=99 offset 12 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t a= ligned to 64 [-Wpacked-not-aligned] 252 | struct zsda_sgl sgl_src; | ^~~~~~~ ../drivers/common/zsda/zsda_common.h:259:1: warning: alignment 1 of =E2=80= =98struct zsda_op_cookie=E2=80=99 is less than 64 [-Wpacked-not-aligned] 259 | } __rte_packed; | ^ ../drivers/common/zsda/zsda_common.h:253:25: warning: =E2=80=98sgl_dst=E2= =80=99 offset 8204 in =E2=80=98struct zsda_op_cookie=E2=80=99 isn=E2=80=99t= aligned to 64 [-Wpacked-not-aligned] 253 | struct zsda_sgl sgl_dst; | ^~~~~~~