From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 57724427E2;
	Mon, 20 Mar 2023 14:12:17 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E7F9740A7F;
	Mon, 20 Mar 2023 14:12:16 +0100 (CET)
Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com
 [209.85.208.42]) by mails.dpdk.org (Postfix) with ESMTP id 1E733406BC
 for <dev@dpdk.org>; Mon, 20 Mar 2023 14:12:16 +0100 (CET)
Received: by mail-ed1-f42.google.com with SMTP id ek18so46533202edb.6
 for <dev@dpdk.org>; Mon, 20 Mar 2023 06:12:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=pantheon-tech.20210112.gappssmtp.com; s=20210112; t=1679317935;
 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=F8zsSz002XWi+PU1SKAKXRDn7XyKWALGzCTNXyaxfZA=;
 b=ys8xdrv6MgfeFW4f0yGQsPsgB0CdhORrXxY3k3Oafkjpdp51ycfu+7AwFkckC3M55w
 xzg3YrS5P/jZCar3WyttazetVKtSZ5bs6gwarhgiFaM/u7x0spp9BoqQbTc5e3csszsa
 VrR0deRliZA29tYDknMg8gaKb+LBprBHgPZ8YT3Lt1tiEiud7YmbCTA8Rq5nZkPquPjw
 zRaKR0Wjjhs/qbidGdGIazxotKrJ9lWHXkT+e4RImLlOcwOXSTMlsmC16ouG2rLvirBn
 pDOPmd+1WIZT8qkL6lMbU5tHohz74iTsPpREicaWLyGbzLJkZhwvgX/wu821eQGqYLDC
 bwuw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679317935;
 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=F8zsSz002XWi+PU1SKAKXRDn7XyKWALGzCTNXyaxfZA=;
 b=oAInLMg9LmtTvfccBF7oRLWHxH/kEQNuI7ukpZvQMbRFOs5/nQAmJ+dF8w8foksg70
 0B39DKLnNvXbCMuHyrBaOuSNNYW8PTZQ7H/awM7IlhhwFjp4Xx7BQDWps3Y0YQbavgKT
 x10D+/9gB+2ElBlTEvLcBOFfljqePd9/m1fPPMN6JIXi7BNkDMg+xIOhqRx/eXJtbFFc
 dgpHy2yyqB57EyvKbbf/p8g4qCKLFd0IHJWTv9QOaNiPgceodC5LfJaOdH1jnYiMTvB6
 RNG7PvmOQrAof49fP6YoFsStTpxmWhBdB/D+AakNJwczrjjgmGWYS3yMkuz3CC13YYZG
 B21A==
X-Gm-Message-State: AO0yUKVGKLK5WhCWCGx0KXpDBdh78GQe+hGd9oUk3MQQGDTlWb+qAD65
 LYZh4lIjO61kbI70uRegeoZVRQ4N6bnfAJPJrLJGdg==
X-Google-Smtp-Source: AK7set8mjHI1xYWGBNVhm68NTz5e2DAXdvFczm0anUxiXLtLe7BdNswy9dy/9t++40J2Vwpcl+gjx8eMytlY5ghz1MM=
X-Received: by 2002:a50:d4d7:0:b0:501:d532:9224 with SMTP id
 e23-20020a50d4d7000000b00501d5329224mr112939edj.8.1679317935782; Mon, 20 Mar
 2023 06:12:15 -0700 (PDT)
MIME-Version: 1.0
References: <20230223152840.634183-1-juraj.linkes@pantheon.tech>
 <20230303102507.527790-1-juraj.linkes@pantheon.tech>
 <20230303102507.527790-4-juraj.linkes@pantheon.tech>
 <CAJFAV8wUAmrm5vugobGtKPtd2VsPu8nYmf_hGM0BhxssnwKLRA@mail.gmail.com>
In-Reply-To: <CAJFAV8wUAmrm5vugobGtKPtd2VsPu8nYmf_hGM0BhxssnwKLRA@mail.gmail.com>
From: =?UTF-8?Q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Date: Mon, 20 Mar 2023 14:12:04 +0100
Message-ID: <CAOb5WZZVeXr0vNPPmCd8FsjK5zkcdU8jFjtxjaTVDBXepHo5Xg@mail.gmail.com>
Subject: Re: [PATCH v6 03/10] dts: add dpdk build on sut
To: David Marchand <david.marchand@redhat.com>
Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, lijuan.tu@intel.com, 
 bruce.richardson@intel.com, probb@iol.unh.edu, dev@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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Mon, Mar 20, 2023 at 9:30=E2=80=AFAM David Marchand
<david.marchand@redhat.com> wrote:
>
> Hi Juraj,
>
> On Fri, Mar 3, 2023 at 11:25=E2=80=AFAM Juraj Linke=C5=A1 <juraj.linkes@p=
antheon.tech> wrote:
> > +class MesonArgs(object):
> > +    """
> > +    Aggregate the arguments needed to build DPDK:
> > +    default_library: Default library type, Meson allows "shared", "sta=
tic" and "both".
> > +               Defaults to None, in which case the argument won't be u=
sed.
> > +    Keyword arguments: The arguments found in meson_options.txt in roo=
t DPDK directory.
> > +               Do not use -D with them, for example:
> > +               meson_args =3D MesonArgs(enable_kmods=3DTrue).
> > +    """
> > +
> > +    _default_library: str
> > +
> > +    def __init__(self, default_library: str | None =3D None, **dpdk_ar=
gs: str | bool):
> > +        self._default_library =3D (
> > +            f"--default-library=3D{default_library}" if default_librar=
y else ""
> > +        )
> > +        self._dpdk_args =3D " ".join(
> > +            (
> > +                f"-D{dpdk_arg_name}=3D{dpdk_arg_value}"
> > +                for dpdk_arg_name, dpdk_arg_value in dpdk_args.items()
> > +            )
> > +        )
>
> I am missing something here.
> Afair, meson accepts the -Ddefault_library form.
>
> Why do we need this special case?

I did not know that specifying default_library with -D is possible.
Should I submit a fix?

>
>
> > +
> > +    def __str__(self) -> str:
> > +        return " ".join(f"{self._default_library} {self._dpdk_args}".s=
plit())
> > --
> > 2.30.2
> >
>
>
> --
> David Marchand
>