From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA7F8A04BA for ; Thu, 8 Oct 2020 04:24:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9AA352B84; Thu, 8 Oct 2020 04:24:55 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60088.outbound.protection.outlook.com [40.107.6.88]) by dpdk.org (Postfix) with ESMTP id D81582B84; Thu, 8 Oct 2020 04:24:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eH3fZBWrY+OJHV0g3jnq6iOZ0+Pr9GsL4gZpKLtloSmJeJre0XN9jbiL8ZhqIPzFuj1I35+X+wgfoZ6nrxswjYRWTnOxN6zBMpQZr69k/IBE2QCC011+8xVQ8WEbmVzcZYLIgeoYWHNxzf+CGdFjKuPM9pWcE9LNpHUPhx6p/K5kFcgeNRWyEg0E35TGO+fpFY1e5oRjFOKhB+nlB9arVTqlWSH4rFS+31nCQXpw83cuPUf375sQAcO3r7RDmS+1KtyCjFXlHNbJ5iE1uoX5GmNgjPQG1QV3KTE113KhDI6H/3OwByw3YEv9+QXztUWp8HLlj06+MlSAU6odAoozwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JnDesvJBEytYAE6LAW3MRq5OMKx3lgj6PBQvITFoMog=; b=Niy23E3VXC0g4e5dYhsx6d70bMFUXDre93sZvqVDPHXfH08y0OIl+3jSPxED3GJ4wrKcilczyyVxpcwpBE1H9OxBrFY9WGIC0ZFFnSKW02LxXBAsmsSkGARzDqdBWNCepXSYniCEEaVaLbMUane9ixa75jUCHj7YhrvXB4Ik1FewYPKYM7BnVVhCTvxeA0d+ulOoWbrac+du60/tMQZs6huypsRVYRmU6nSSAuXYPiT8fbG2ssbwP+hZhYo9UI1JpAL8edBLLoNHVjwKt5lte+gu9e4S8Yoa/jf/TRY9fS303XXtXr6DSutY6n6ClS/dd1eLly2d55RPow1g3LwqRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JnDesvJBEytYAE6LAW3MRq5OMKx3lgj6PBQvITFoMog=; b=T6IftPaOcfW8XjSg+00+Ip5IqBpLr2FiTqoEjknqolHmu7bzR41Ox2nmZlh70W7yjvTLHMNn3sXjSCHkPuNlfiNWZNmToN6kquTTc3FEFSHAQS/Qfj9sljKqmybax/zevx/14nVZsB3QuGO+URx5z1cv9G0H8KdLSA84u0Zk5Pg= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5837.eurprd04.prod.outlook.com (2603:10a6:803:ec::28) by VI1PR04MB5120.eurprd04.prod.outlook.com (2603:10a6:803:62::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Thu, 8 Oct 2020 02:24:48 +0000 Received: from VI1PR04MB5837.eurprd04.prod.outlook.com ([fe80::a837:4962:69bd:c1f4]) by VI1PR04MB5837.eurprd04.prod.outlook.com ([fe80::a837:4962:69bd:c1f4%6]) with mapi id 15.20.3455.023; Thu, 8 Oct 2020 02:24:48 +0000 To: Ferruh Yigit , Hemant Agrawal , Chenxu Di Cc: Priyanka Jain , dev@dpdk.org, stable@dpdk.org References: <20200917084357.14717-1-chenxux.di@intel.com> <20201006171638.2636145-1-ferruh.yigit@intel.com> From: "Sachin Saxena (OSS)" Message-ID: Date: Thu, 8 Oct 2020 07:54:38 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: <20201006171638.2636145-1-ferruh.yigit@intel.com> Content-Language: en-US X-Originating-IP: [223.190.49.13] X-ClientProxiedBy: SG2PR0601CA0019.apcprd06.prod.outlook.com (2603:1096:3::29) To VI1PR04MB5837.eurprd04.prod.outlook.com (2603:10a6:803:ec::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.3] (223.190.49.13) by SG2PR0601CA0019.apcprd06.prod.outlook.com (2603:1096:3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21 via Frontend Transport; Thu, 8 Oct 2020 02:24:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 01fed995-42ed-48c6-755a-08d86b3153be X-MS-TrafficTypeDiagnostic: VI1PR04MB5120: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZkUnEO9S6dQ/NvSnOP5q3nmjq9xE6Sg38/407lhS8q+BvlLrzAFlTKrZU8WAns6/3TxuBWXOjSCyFAX/nR7PzAePeq773mJWn1yXkomrBn2TJygNMzgWKhDRYc6onQv+2Lw9iiPPFNLnTMwcY11EF5M9xnJDufyyEWaduSdJzO9s3nqm47pM/LYr0bX2YKaWHJxj2pmH6QcYj5yIl2C2JyIqMTdOzxk/nQuYGAk6OG80LSIoK36ccMCc5hT4ArpwoIw07/nH6Yo3nxcStuh6fiuk5KfXbjIJ/d9T2hMs+XrwJcEE+1UBXmQ0k/bv/NWBR2EvQDGPhylF+439Rq+y0xBfNC6lJ4ucJZCqPiGckQosrUqFlPDPJ4dcZTfnBwd6 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5837.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(346002)(376002)(396003)(136003)(31696002)(2616005)(956004)(8936002)(4326008)(478600001)(6666004)(31686004)(8676002)(316002)(110136005)(16526019)(33964004)(83380400001)(6486002)(5660300002)(53546011)(186003)(86362001)(66946007)(66476007)(66556008)(16576012)(26005)(52116002)(2906002)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: O2V8vd2Umf6knZF7iDduD7LXZFHb4J2XMzSw3QnS+HgWDJ5veV56ofvwxw23sk98lzJyDRhbrxgNYPOUqNMHECh1/DgKezeV0KDvl8tEIMtenbLgNvtPIQiq265Hhntmf9Fb6z8Y7HX9JIHiTu6OCBJSU0GKA1FFheKA/rTU+01QPeBj82Uahon7Lz6e51imOxqO5GCswHc5uPXmLm0/Z6K3sjWD06h6/t8ZGCYyHrCUQQbRh9KQ/cKjw6TdZ1jvn6lXA5z/xFzkqawks2t0vaswRqLqOy/1MKFJNb3Gfde1OMzXqMV0iIhRpTBxe8AIWnU/BPFmxCZt5UFdQcBcA9Vzstm8jSGSN0QIExt/rBUQac2DtyhWSqsDBkikuXopgK0neW1/x8EBtoCXJuHX9OfIIvFnh6nHnlOkZA7BGgAyHVIgY2xhlrfKwasHQWO4wLMnXiFUoryt0BN3NyIC03o5uQzfD2hu+ykQIaYTrw7CeRLocO5od1nj/5lgmidEMyHhCBevT2XafnUvg0PbWZDtXjcaeMRwYLS0ZP19wP47lXSCK6xZ81sC1STDyJNB1DuWVZInNX3YvPrJG4YebYhKt6MBOxpqVtScvGka3QtvWhgJzmd6kqvNOwqNowQioXTrM5qbiy350KLf3bi2Xg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01fed995-42ed-48c6-755a-08d86b3153be X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5837.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2020 02:24:48.2971 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Hx2ckVqwIcd9LOGchB6vosqkSWwX1D97VAytxPYfu40hTzxvlpzDqjZgsFPI08GfeVn8er6JrF22bRc+lJlRwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5120 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [PATCH v3] net/dpaa2: fix build error about timesync functions X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Following change should also be handled as suggested by Ferruh in earlier. diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c index 9f755e84bf..0e44d4c6bf 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -178,4 +178,6 @@ static struct rte_dpaa2_object rte_dpaa2_dprtc_obj = {         .create = dpaa2_create_dprtc_device,  }; +#if defined(RTE_LIBRTE_IEEE1588)  RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj); +#endif regards, Sachin On 06-Oct-20 10:46 PM, Ferruh Yigit wrote: > From: Chenxu Di > > Some timesync related source files are built only when > 'RTE_LIBRTE_IEEE1588' config is set, which is missing in meson. > > Building with '-DRTE_LIBRTE_IEEE1588' cflag will enable timesync > functionality in the files that are build, but it won't build files > that require 'RTE_LIBRTE_IEEE1588' config. > This causes the build error. > > Fixing by removing config check in meson file and build all .c files by > default, but wrap relevant code part with 'RTE_LIBRTE_IEEE1588' macro. > > Also removing 'RTE_LIBRTE_IEEE1588' ifdef around some fields of the data > structures, to not require finer grained macro wraps on the functions > using them. > Since the registration of the function disabled with macro check, having > functions compiled shouldn't affect the functionality. > > Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module") > Cc: stable@dpdk.org > > Signed-off-by: Chenxu Di > Signed-off-by: Ferruh Yigit > --- > drivers/net/dpaa2/dpaa2_ethdev.h | 4 ---- > drivers/net/dpaa2/dpaa2_ptp.c | 2 ++ > drivers/net/dpaa2/meson.build | 7 ++----- > 3 files changed, 4 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h > index e577355d57..94cf253827 100644 > --- a/drivers/net/dpaa2/dpaa2_ethdev.h > +++ b/drivers/net/dpaa2/dpaa2_ethdev.h > @@ -160,7 +160,6 @@ struct dpaa2_dev_priv { > uint16_t ss_offset; > uint64_t ss_iova; > uint64_t ss_param_iova; > -#if defined(RTE_LIBRTE_IEEE1588) > /*stores timestamp of last received packet on dev*/ > uint64_t rx_timestamp; > /*stores timestamp of last received tx confirmation packet on dev*/ > @@ -169,7 +168,6 @@ struct dpaa2_dev_priv { > * it corresponds to last packet transmitted > */ > struct dpaa2_queue *next_tx_conf_queue; > -#endif > > struct rte_eth_dev *eth_dev; /**< Pointer back to holding ethdev */ > > @@ -227,7 +225,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci); > void dpaa2_flow_clean(struct rte_eth_dev *dev); > uint16_t dpaa2_dev_tx_conf(void *queue) __rte_unused; > > -#if defined(RTE_LIBRTE_IEEE1588) > int dpaa2_timesync_enable(struct rte_eth_dev *dev); > int dpaa2_timesync_disable(struct rte_eth_dev *dev); > int dpaa2_timesync_read_time(struct rte_eth_dev *dev, > @@ -240,5 +237,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, > uint32_t flags __rte_unused); > int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev, > struct timespec *timestamp); > -#endif > #endif /* _DPAA2_ETHDEV_H */ > diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c > index f58eedb314..899dd5d442 100644 > --- a/drivers/net/dpaa2/dpaa2_ptp.c > +++ b/drivers/net/dpaa2/dpaa2_ptp.c > @@ -129,6 +129,7 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, > return 0; > } > > +#if defined(RTE_LIBRTE_IEEE1588) > static int > dpaa2_create_dprtc_device(int vdev_fd __rte_unused, > struct vfio_device_info *obj_info __rte_unused, > @@ -179,3 +180,4 @@ static struct rte_dpaa2_object rte_dpaa2_dprtc_obj = { > }; > > RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj); > +#endif > diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build > index 6dd0eb274c..4312aa73f7 100644 > --- a/drivers/net/dpaa2/meson.build > +++ b/drivers/net/dpaa2/meson.build > @@ -13,15 +13,12 @@ sources = files('base/dpaa2_hw_dpni.c', > 'dpaa2_flow.c', > 'dpaa2_rxtx.c', > 'dpaa2_sparser.c', > + 'dpaa2_ptp.c', > + 'mc/dprtc.c', > 'mc/dpkg.c', > 'mc/dpdmux.c', > 'mc/dpni.c') > > -if dpdk_conf.has('RTE_LIBRTE_IEEE1588') > - sources += files('mc/dprtc.c') > - sources += files('dpaa2_ptp.c') > -endif > - > includes += include_directories('base', 'mc') > > install_headers('rte_pmd_dpaa2.h')