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 1181545AAA; Fri, 4 Oct 2024 09:05:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 005EA402E9; Fri, 4 Oct 2024 09:04:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2380040268 for ; Fri, 4 Oct 2024 09:04:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728025497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LNjDhxuy91tQzGraly88wt9hOeLn3DGXToH9UC0+Q1U=; b=XCzSkmBomKsSBJOFkYODosA9e4iBQm2eWpsDWHOxDlInTh3/u6SSRxD3EQ0PIuPpN06Zh0 Jysa9iNB9nOLVB68+SjbeS1u2vjE/KU14IyBXZGM+ZNgRGh9y3kiDHmUEl3myFJZao5MkI GxnWqKECSuXcPs2nXH98ArTrA0MzSxE= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-YL2ORP2pNH2IZb2wgoZCww-1; Fri, 04 Oct 2024 03:04:56 -0400 X-MC-Unique: YL2ORP2pNH2IZb2wgoZCww-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539944cd95cso1355029e87.3 for ; Fri, 04 Oct 2024 00:04:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728025494; x=1728630294; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LNjDhxuy91tQzGraly88wt9hOeLn3DGXToH9UC0+Q1U=; b=GTIsJYkvJ91FB8u6H8NlN/MXeSZQc/XWtTwOlkCWA2h2kzRiZJ0KBPWkx7RowO1bdq +hRthsee9NJEvw8149SG3go7XadD9laOQsjz0zSPn9LqXH/H9EE1aLZQM5u8uK2qyzK3 Mc1kkirpgeMzyfwpbcr3qn0pL2ma1cfCdJmoZXEl9c7dyTRT2+pB6nJnr3t/O06nyaYh Drak0OK6Hpl28touuVdk8DIEZLgTtRVqhJHlhQBwTkT2MUtEA5i84q/4UZ1jYFO3pOwD IjFnEZReFl+Zu09HoqefeZBZgkl9Opprx7OI5K3raTD2VpeTjVucFEDkWdbC11SDXhap W06A== X-Forwarded-Encrypted: i=1; AJvYcCW58hf5VX7keQjZ4/WHBOmSOmsvnP7mRl28/NKui0qdHb5VsFtveaWcFVPExeYFnZdr3AI=@dpdk.org X-Gm-Message-State: AOJu0YziwIy0mh6OLBrnqGhVXhIv0BmQwbTdFVM3QlTMIsDS38srN6BQ bc5NYwwOA2p2W+krQ4b3rFtTfuRRm9G5m5K9YRZu/HbT/PZrEuRHwkaXAyPP1NmV8BalxwLcoah sCr2wRyoDsY0C6vzDrVa0gTQzudvAllSPGHETitRjkgBHdjQMxcOnUadoZ5/lI/X14PaosN+WBc aCWkWmAEC16Q/rYU4= X-Received: by 2002:a05:6512:3b24:b0:536:73b5:d971 with SMTP id 2adb3069b0e04-539ab9e1953mr940208e87.38.1728025494370; Fri, 04 Oct 2024 00:04:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJcbjxA5QAFsve2MB8frpXtAqbqTfVEhBtm7TMZiPwiHEdqMe5BuULxQyH4b1x4d9+RWrLvm3TfW6mVgZqJcM= X-Received: by 2002:a05:6512:3b24:b0:536:73b5:d971 with SMTP id 2adb3069b0e04-539ab9e1953mr940193e87.38.1728025493937; Fri, 04 Oct 2024 00:04:53 -0700 (PDT) MIME-Version: 1.0 References: <20240905101438.3888274-1-gakhil@marvell.com> <10591cfb-d78e-4d50-9bb5-f6d1246662b3@amd.com> In-Reply-To: <10591cfb-d78e-4d50-9bb5-f6d1246662b3@amd.com> From: David Marchand Date: Fri, 4 Oct 2024 09:04:42 +0200 Message-ID: Subject: Re: [PATCH] [RFC] cryptodev: replace LIST_END enumerators with APIs To: Ferruh Yigit Cc: Akhil Goyal , dev@dpdk.org, Dodji Seketeli , thomas@monjalon.net, hemant.agrawal@nxp.com, anoobj@marvell.com, pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, declan.doherty@intel.com, matan@nvidia.com, g.singh@nxp.com, fanzhang.oss@gmail.com, jianjay.zhou@huawei.com, asomalap@amd.com, ruifeng.wang@arm.com, konstantin.v.ananyev@yandex.ru, radu.nicolau@intel.com, ajit.khaparde@broadcom.com, rnagadheeraj@marvell.com, mdr@ashroe.eu X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Fri, Oct 4, 2024 at 5:55=E2=80=AFAM Ferruh Yigit = wrote: > > On 9/5/2024 11:14 AM, Akhil Goyal wrote: > > Replace *_LIST_END enumerators from asymmetric crypto > > lib to avoid ABI breakage for every new addition in > > enums with inline APIs. > > > > Signed-off-by: Akhil Goyal > > --- > > This patch was discussed in ML long time back. > > https://patches.dpdk.org/project/dpdk/patch/20211008204516.3497060-1-ga= khil@marvell.com/ > > Now added inline APIs for getting the list end which need to be updated > > for each new entry to the enum. This shall help in avoiding ABI break > > for adding new algo. > > > > Hi Akhil, > > *I think* this hides the problem instead of fixing it, and this may be > partially because of the tooling (libabigail) limitation. > > This patch prevents the libabigail warning, true, but it doesn't improve > anything from the application's perspective. > Before or after this patch, application knows a fixed value as END value. > > Not all changes in the END (MAX) enum values cause ABI break, but tool > warns on all, that is why I think this may be tooling limitation [1]. > (Just to stress, I am NOT talking about regular enum values change, I am > talking about only END (MAX) value changes caused by appending new enum > items.) > > As far as I can see (please Dodji, David correct me if I am wrong) ABI > break only happens if application and library exchange enum values in > the API (directly or within a struct). - There is also the following issue: A library publicly exports an array sized against a END (MAX) enum in the A= PI. https://developers.redhat.com/blog/2019/05/06/how-c-array-sizes-become-part= -of-the-binary-interface-of-a-library I had made comments for an issue in the cryptodev library in the past: https://inbox.dpdk.org/dev/CAJFAV8xs5CVdE2xwRtaxk5vE_PiQMV5LY5tKStk3R1gOuRT= sUw@mail.gmail.com/ - Sorry to deviate from the _END enum discussion that tries to define a solution for all cases, but all I see in the cryptodev patch is a need for an enumerator... for an internal unit test. >From the RFC patch, I would simply change the rte_crypto_asym_xform_type_list_end helper into a non inline symbol and mark it __rte_internal, or move this helper to a non public header used by the unit test. Or add a (internal) rte_crypto_asym_xform_type_next_op() used through a a RTE_CRYPTO_FOREACH_ASYM_OP() macro. --=20 David Marchand