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 EC6014336F; Sun, 19 Nov 2023 08:08:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 435CA4021D; Sun, 19 Nov 2023 08:08:04 +0100 (CET) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by mails.dpdk.org (Postfix) with ESMTP id 34BF040042; Sun, 19 Nov 2023 08:08:03 +0100 (CET) Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-41cc75c55f0so39050351cf.1; Sat, 18 Nov 2023 23:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700377682; x=1700982482; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xFgms4NLfcflPwlF1EQ34hf/uF/u6yNgwsRs4o0ngLY=; b=gZrz7DV3tQIdoVsa6BJeAE6ljHjlIvVMU+tNH2jDnlNVQyPgWD0aGtaMYLtBlFddSP schksIUFiBQD2AxqIR+2qEasSCGqy3vIRjJnawW0mrga68wNUSbPAHgvIApCUkFEPvdd YJPo7/flQsY/H3s3GDpUm26SziRZARXdfGyStf2Y075G5QhE/pmDj1yaZetwp97PcwSS YBmJmbUUNW6k84jXNSxRj939copm+HzVX5CbwvsJnMD791/hGPKLMyKyEfLQPI4DOta9 +xC86wdQ90k3z2l3UZRlEWYBqKAip9UmXV4IaMd+E9xpiUTvT9NQcfi4hA18i4l0fKwG lJiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700377682; x=1700982482; 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=xFgms4NLfcflPwlF1EQ34hf/uF/u6yNgwsRs4o0ngLY=; b=tca31rF7YU8eN+6LOjA2LB8SxM9TlbXZjcKBz2YH+qcJSiQtGwXAc3NhoTWalwR0bi h8sPgUPaFmopDzbhOBHjuIoFie47Z592+PedTHlCizXK+QHX/fsNX2FcipVVQbgJH66s 27C5ckzBirsSh+a7ppevHIFJj096GUqxF/wkUOjLLnO/N58tvlqQL18YoVRPOdXgyvwM aB4jwCXNG/Esw03sgKXRzg9fiNjylKX+crtmeZx9ZpTcvPrPm6ZKbDc+K0Dd6IkwCL0E Bosi0le6Da4DXLyfLxOe8edJeGxMybnQOp7KgWbzt2h4rB3rVe6b8sOSGrv0A1SR3UrC Ml2Q== X-Gm-Message-State: AOJu0YyJB53xbz1IhHqVKonh/UJn4G2m9WY9P88SApHBiCywk7vF4xpl X9Ghs+wXqMF/f6fc5UYWRLIqBLtGDIugm3i1O+k= X-Google-Smtp-Source: AGHT+IFwa2F2x5D8X+lncctYm013O48rRCzmo5YnPTf4HrQkKHFrLwbufr63WjCFDEkewtSKGuygKEr2pWPgSFKg9z4= X-Received: by 2002:ac8:5c0e:0:b0:421:c6ef:4b23 with SMTP id i14-20020ac85c0e000000b00421c6ef4b23mr5107322qti.28.1700377682397; Sat, 18 Nov 2023 23:08:02 -0800 (PST) MIME-Version: 1.0 References: <20230928051648.562526-1-jerinj@marvell.com> <20230928054036.645183-1-jerinj@marvell.com> <98CBD80474FA8B44BF855DF32C47DC35E9F036@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F036@smartserver.smartshare.dk> From: Jerin Jacob Date: Sun, 19 Nov 2023 12:37:35 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH v2] doc: define qualification criteria for external library To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: jerinj@marvell.com, dev@dpdk.org, techboard@dpdk.org 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, Nov 17, 2023 at 1:57=E2=80=AFPM Morten Br=C3=B8rup wrote: > > > From: Jerin Jacob [mailto:jerinjacobk@gmail.com] > > Sent: Friday, 17 November 2023 05.34 > > > > On Thu, Sep 28, 2023 at 11:10=E2=80=AFAM wrote: > > > > > > From: Jerin Jacob > > > > > > Define qualification criteria for external library > > > based on a techboard meeting minutes [1] and past > > > learnings from mailing list discussion. > > > > > > [1] > > > http://mails.dpdk.org/archives/dev/2019-June/135847.html > > > > > > Signed-off-by: Jerin Jacob > > > > Ping for review and/or merge. > > > > > > > --- > > > v2: > > > - Added "Meson build integration" and "Code readability" sections. > > > > > > doc/guides/contributing/index.rst | 1 + > > > .../contributing/library_dependency.rst | 23 > > +++++++++++++++++++ > > > 2 files changed, 24 insertions(+) > > > create mode 100644 doc/guides/contributing/library_dependency.rst > > > > > > diff --git a/doc/guides/contributing/index.rst > > b/doc/guides/contributing/index.rst > > > index dcb9b1fbf0..e5a8c2b0a3 100644 > > > --- a/doc/guides/contributing/index.rst > > > +++ b/doc/guides/contributing/index.rst > > > @@ -15,6 +15,7 @@ Contributor's Guidelines > > > documentation > > > unit_test > > > new_library > > > + library_dependency > > > patches > > > vulnerability > > > stable > > > diff --git a/doc/guides/contributing/library_dependency.rst > > b/doc/guides/contributing/library_dependency.rst > > > new file mode 100644 > > > index 0000000000..687a3b6cef > > > --- /dev/null > > > +++ b/doc/guides/contributing/library_dependency.rst > > > @@ -0,0 +1,23 @@ > > > +.. SPDX-License-Identifier: BSD-3-Clause > > > + Copyright(c) 2023 Marvell. > > > + > > > +Library dependency > > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > + > > > +This document defines the qualification criteria for external > > libraries that may be > > > +used as dependencies in DPDK drivers or libraries. > > > + > > > +- **Free availability**: The library must be freely available to > > build in either source or binary > > > + form, with a preference for source form. > > Suggest adding: > > - **Free use and distribution license**: The library must be freely avail= able to use and distribute without any attached conditions. > > We must require a BSD-like license, to ensure that DPDK as a whole (inclu= ding 3rd party libraries) remains BSD licensed, and can be used in commerci= al (closed source) applications. As far as I understand, The initial scope of was =E2=80=9Cfree availability= =E2=80=9D for building. Free distribution is much wider scope. I don't think, current external libraries[1] have free distribution rights. [1] https://github.com/DPDK/dpdk/blob/main/doc/guides/gpus/cuda.rst https://gitlab.com/nvidia/headers/cuda-individual/cudart/-/blob/main/LICENS= E?ref_type=3Dheads I am fine with either way, Feedback from others? > > > > + > > > +- **Compiler compatibility**: The library must be able to compile > > with a DPDK supported compiler > > > + for the given execution environment. For example, For Linux, the > > library must be able to compile > > Typo (after "For example,"): For -> for Ack. Will fix next version. > > > > + with GCC and/or clang. > > > + > > > +- **Documentation**: Must have adequate documentation for the steps > > to build it. > > > + > > > +- **Meson build integration**: The library must have standard method > > like ``pkg-config`` > > > + for seamless integration with DPDK's build environment. > > > + > > > +- **Code readability**: When the depended library is optional, use > > stubs to reduce the ``ifdef`` > > > + clutter to enable better code readability. > > Why does everyone keep insisting that stubs make code more readable? Some= times #ifdef is better. Could you share a case where when #ifdefs is better(Just to understand the view).? > > Please use something like this instead: > > - **Code readability**: When the depended library is optional, use either= stubs or ``#ifdef`` consistently, not a mix of both, to ensure code readab= ility. >