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 BD03B428CA; Tue, 4 Apr 2023 08:00:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98E534067E; Tue, 4 Apr 2023 08:00:11 +0200 (CEST) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) by mails.dpdk.org (Postfix) with ESMTP id 945274067E for ; Tue, 4 Apr 2023 08:00:10 +0200 (CEST) Received: by mail-vs1-f52.google.com with SMTP id cz11so27445980vsb.6 for ; Mon, 03 Apr 2023 23:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680588010; 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=fje5u2PWYtvTpThufK6uYtvlqxFDgLchBMQzIjMW3PE=; b=Jqb+gpxJ0vKdz0+uEdFIkvPOKuxk5Q6eJHkFyCxHf7PfExDnJxXYyeRatirt4/wpqb yU8jhqwiAVywh6aEICbkkncOgAyI8gth8dLFAj85JBSY6ie4RJz3PP7aKvpaGNd+zeCw f1Ums4mSclYASVbtqJdwvA+9ycSJJplrkqlOWN2u6mfXWNk/l6Xze2KXOMZgEXkcABP6 gCffhCMXi+Uqx3Mjv3nusRVZ2fZs46I4/IKZuZP1q2IO2bfD3yiIDhUq0QifXf261esi bk9Lyvw6WnzurYAcC7W/oFeKNgeQiNyHHgB/cWq5MdKDNUvD3BwWfITCAzSQySfI99rq Zhig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680588010; 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=fje5u2PWYtvTpThufK6uYtvlqxFDgLchBMQzIjMW3PE=; b=dd/kXHRgX0bALnuebPArxr9gMqiig7DnPSEsdU5/W5pzYQ+4qSrWf5+V6ZdVYna06G 9iqQb0KrGFiIwI/O2GtbbBlDKxMVCF6QU8715B6UuMCLdcft2hcgzcohA0TYXqOsSXzN wwVTF8rK9nhVHfSOLdcyk7KI0UohfhvdScynMJ5tVq8N1g9mv9wA+fp54/QVpMYS26z1 8473h++vPJvMQPZyAhvU33qQGRduBdzv5R/PjwC0Dk1qZef3o0B1lwsUQHehtjVw3YFP jzDOxyEFlGTFDZjbx7n4oWvprm7Ybw4/wbs3V3J4YMBDYFuhlcLPxWYF2IurUpxXsIrZ BFOg== X-Gm-Message-State: AAQBX9exSzl6KphhrExG4JGKaR7b01zTeOJKnacVE94XKj8Y67iodlsy SUAW7xSR3Hj2CsIEx3Qt6tdc2TKrllhU+FaUr70= X-Google-Smtp-Source: AKy350YSRevuJ7H+kIggnlSYr7xnWFQaVB7DPXNoNSd27DTaAmAO+x6I3QsyHyronFMRLLXcg5ObwnirrTUCazTFjls= X-Received: by 2002:a67:cc15:0:b0:426:3a3d:180b with SMTP id q21-20020a67cc15000000b004263a3d180bmr1372762vsl.5.1680588009775; Mon, 03 Apr 2023 23:00:09 -0700 (PDT) MIME-Version: 1.0 References: <20221111052248.3920036-1-kirankumark@marvell.com> In-Reply-To: <20221111052248.3920036-1-kirankumark@marvell.com> From: Jerin Jacob Date: Tue, 4 Apr 2023 11:29:43 +0530 Message-ID: Subject: Re: [dpdk-dev][PATCH] drivers: optimize the build time for cnxk To: kirankumark@marvell.com Cc: Pavan Nikhilesh , Shijith Thotton , Nithin Dabilpuram , Sunil Kumar Kori , Satha Rao , 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Nov 11, 2022 at 10:53=E2=80=AFAM wrote: > > From: Kiran Kumar K > > While building cnxk, if build platform is cn9k, cn10k files > are also being compiled and vice versa. This is causing more > build time. Adding changes to avoid this by checking the > platform and compile only platform specific files. If no > platform is provided, both cn9k and cn10k files will be compiled. > > Signed-off-by: Kiran Kumar K Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- > drivers/event/cnxk/cn9k_eventdev.c | 16 ---------------- > drivers/event/cnxk/cnxk_eventdev.c | 14 ++++++++++++++ > drivers/event/cnxk/cnxk_eventdev.h | 1 + > drivers/event/cnxk/meson.build | 22 ++++++++++++++++++---- > drivers/net/cnxk/meson.build | 14 ++++++++++++++ > 5 files changed, 47 insertions(+), 20 deletions(-) > > diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k= _eventdev.c > index f5a42a86f8..7b09f27644 100644 > --- a/drivers/event/cnxk/cn9k_eventdev.c > +++ b/drivers/event/cnxk/cn9k_eventdev.c > @@ -6,7 +6,6 @@ > #include "cnxk_eventdev.h" > #include "cnxk_worker.h" > > -#define CN9K_DUAL_WS_NB_WS 2 > #define CN9K_DUAL_WS_PAIR_ID(x, id) (((x)*CN9K_DUAL_WS_NB_WS) + id) > > #define CN9K_SET_EVDEV_DEQ_OP(dev, deq_op, deq_ops) = \ > @@ -239,21 +238,6 @@ cn9k_sso_hws_reset(void *arg, void *hws) > ws->swtag_req =3D 0; > } > > -void > -cn9k_sso_set_rsrc(void *arg) > -{ > - struct cnxk_sso_evdev *dev =3D arg; > - > - if (dev->dual_ws) > - dev->max_event_ports =3D dev->sso.max_hws / CN9K_DUAL_WS_= NB_WS; > - else > - dev->max_event_ports =3D dev->sso.max_hws; > - dev->max_event_queues =3D > - dev->sso.max_hwgrp > RTE_EVENT_MAX_QUEUES_PER_DEV ? > - RTE_EVENT_MAX_QUEUES_PER_DEV : > - dev->sso.max_hwgrp; > -} > - > static int > cn9k_sso_rsrc_init(void *arg, uint8_t hws, uint8_t hwgrp) > { > diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk= _eventdev.c > index db62d32a81..efa9359ce6 100644 > --- a/drivers/event/cnxk/cnxk_eventdev.c > +++ b/drivers/event/cnxk/cnxk_eventdev.c > @@ -623,3 +623,17 @@ cnxk_sso_remove(struct rte_pci_device *pci_dev) > { > return rte_event_pmd_pci_remove(pci_dev, cnxk_sso_fini); > } > + > +void > +cn9k_sso_set_rsrc(void *arg) > +{ > + struct cnxk_sso_evdev *dev =3D arg; > + > + if (dev->dual_ws) > + dev->max_event_ports =3D dev->sso.max_hws / CN9K_DUAL_WS_= NB_WS; > + else > + dev->max_event_ports =3D dev->sso.max_hws; > + dev->max_event_queues =3D dev->sso.max_hwgrp > RTE_EVENT_MAX_QUEU= ES_PER_DEV ? > + RTE_EVENT_MAX_QUEUES_PER_DEV : > + dev->sso.max_hwgrp; > +} > diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk= _eventdev.h > index 738e335ea4..fdbcfb4640 100644 > --- a/drivers/event/cnxk/cnxk_eventdev.h > +++ b/drivers/event/cnxk/cnxk_eventdev.h > @@ -56,6 +56,7 @@ > #define CNXK_TAG_IS_HEAD(x) (BIT_ULL(35) & x) > > #define CN9K_SSOW_GET_BASE_ADDR(_GW) ((_GW)-SSOW_LF_GWS_OP_GET_WORK0) > +#define CN9K_DUAL_WS_NB_WS 2 > > #define CN10K_GW_MODE_NONE 0 > #define CN10K_GW_MODE_PREF 1 > diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.bu= ild > index aa42ab3a90..227c6ae7a8 100644 > --- a/drivers/event/cnxk/meson.build > +++ b/drivers/event/cnxk/meson.build > @@ -8,11 +8,17 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64') > subdir_done() > endif > > +if meson.is_cross_build() > + soc_type =3D meson.get_cross_property('platform', '') > +else > + soc_type =3D platform > +endif > + > +if soc_type !=3D 'cn9k' and soc_type !=3D 'cn10k' > + soc_type =3D 'all' > +endif > + > sources =3D files( > - 'cn9k_eventdev.c', > - 'cn9k_worker.c', > - 'cn10k_eventdev.c', > - 'cn10k_worker.c', > 'cnxk_eventdev.c', > 'cnxk_eventdev_adptr.c', > 'cnxk_eventdev_selftest.c', > @@ -21,7 +27,10 @@ sources =3D files( > 'cnxk_tim_worker.c', > ) > > +if soc_type =3D=3D 'cn9k' or soc_type =3D=3D 'all' > sources +=3D files( > + 'cn9k_eventdev.c', > + 'cn9k_worker.c', > 'deq/cn9k/deq_0_15_burst.c', > 'deq/cn9k/deq_16_31_burst.c', > 'deq/cn9k/deq_32_47_burst.c', > @@ -320,8 +329,12 @@ sources +=3D files( > 'tx/cn9k/tx_96_111_dual_seg.c', > 'tx/cn9k/tx_112_127_dual_seg.c', > ) > +endif > > +if soc_type =3D=3D 'cn10k' or soc_type =3D=3D 'all' > sources +=3D files( > + 'cn10k_eventdev.c', > + 'cn10k_worker.c', > 'deq/cn10k/deq_0_15_burst.c', > 'deq/cn10k/deq_16_31_burst.c', > 'deq/cn10k/deq_32_47_burst.c', > @@ -470,6 +483,7 @@ sources +=3D files( > 'tx/cn10k/tx_96_111_seg.c', > 'tx/cn10k/tx_112_127_seg.c', > ) > +endif > > extra_flags =3D ['-flax-vector-conversions', '-Wno-strict-aliasing'] > foreach flag: extra_flags > diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build > index c7ca24d437..99531c1917 100644 > --- a/drivers/net/cnxk/meson.build > +++ b/drivers/net/cnxk/meson.build > @@ -8,6 +8,16 @@ if not dpdk_conf.get('RTE_ARCH_64') > subdir_done() > endif > > +if meson.is_cross_build() > + soc_type =3D meson.get_cross_property('platform', '') > +else > + soc_type =3D platform > +endif > + > +if soc_type !=3D 'cn9k' and soc_type !=3D 'cn10k' > + soc_type =3D 'all' > +endif > + > sources =3D files( > 'cnxk_ethdev.c', > 'cnxk_ethdev_cman.c', > @@ -25,6 +35,7 @@ sources =3D files( > 'cnxk_tm.c', > ) > > +if soc_type =3D=3D 'cn9k' or soc_type =3D=3D 'all' > # CN9K > sources +=3D files( > 'cn9k_ethdev.c', > @@ -103,7 +114,9 @@ sources +=3D files( > 'tx/cn9k/tx_96_111_vec_mseg.c', > 'tx/cn9k/tx_112_127_vec_mseg.c', > ) > +endif > > +if soc_type =3D=3D 'cn10k' or soc_type =3D=3D 'all' > # CN10K > sources +=3D files( > 'cn10k_ethdev.c', > @@ -182,6 +195,7 @@ sources +=3D files( > 'tx/cn10k/tx_96_111_vec_mseg.c', > 'tx/cn10k/tx_112_127_vec_mseg.c', > ) > +endif > > deps +=3D ['bus_pci', 'cryptodev', 'eventdev', 'security'] > deps +=3D ['common_cnxk', 'mempool_cnxk'] > -- > 2.34.1 >