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 6033AA04BC for ; Fri, 9 Oct 2020 09:49:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3006D1C1A6; Fri, 9 Oct 2020 09:49:02 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150053.outbound.protection.outlook.com [40.107.15.53]) by dpdk.org (Postfix) with ESMTP id 2A5EC1BFBB; Fri, 9 Oct 2020 09:48:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jAh4xV1WHs8nIjKAtZPX7WzhGhxQUYHec4jLb4prBKgP+sZ18HDONovb+S/fZR8Vn85DNWv/D85Q1mt0f2E7eRfaZZ0+uwWtUDhJM+KHX6eH5RjDfdB916RUwQy3xn28BC5eczA3F0V8JzOhRaAv2GvudFjWooKfUoaJgNi+yGDDijy+0B+CV5rxQYhLT0htyd/qRzG6egQTaXF5SmDoT/vPNDmYmeGfv9bvRaIgqhq4WV6pMzUcLxo82rPv77Tc2yqBb1QZQYCPlqa2smD3dwSAfrxxcG0gECs4GSUyURvUxo6eSqsf4c/ys1e6kHDEVSvvtl0OaRrtOzzcDoCn0w== 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=V3uih8gnRp9XWISa3Q+I5CYqPxvuqFZ6S/q3rrdElRw=; b=hZj69jc0SZcHHhx44lekA8ZeXQLvBWUj5y9Ded8k8BAgZ89Emk2m/Yw9C046HLMK00fmfHvRvqXT6JiP0iFeE/dHmM2fYzpza8LjER5C3NVEsGE8FMDE+OYGvKK47zz40/vjZ0MxU87vUaL4WtVuSRpXhNmMdJdb1Vy4NabIKWSwj+Kzvwxtgu4oucTq0vCX808ustI+2c3+pVfQtQJJBIHsrBDvx6kL5J9N2nyN9LOpEQ6jwzKxfqtTd+TpyfOoGYc8w8tfrjkIbzDi4Ayr5BRXsAWbout4m7t14psXX7jrIJmsmc/RPGwYGL3BSYQzs27fTKjCec0B6AiPC2qxFw== 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=V3uih8gnRp9XWISa3Q+I5CYqPxvuqFZ6S/q3rrdElRw=; b=DLuPVzbvB0XrRyZjR0p+xLyu9/O8Cqz8Qy8mxrF8a7rVxW7vj4OeWRjT6j0Gj6L+N7GD/98IF/aHzUG/FHqD/3dDjUvxsEM53mfrwlApfkAcoZ2wxUro10hh/Kispe2XODnG55P6XmB6du0VDlgoAd0BPtssDfLuD1YiEM53kgs= 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 VI1PR04MB5487.eurprd04.prod.outlook.com (2603:10a6:803:d1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21; Fri, 9 Oct 2020 07:48:54 +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.027; Fri, 9 Oct 2020 07:48:54 +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> <99c18cb1-855b-f034-ede7-4f9686d80110@intel.com> From: "Sachin Saxena (OSS)" Message-ID: <02d268fc-d039-13a0-366e-0e88d4b3bc1f@oss.nxp.com> Date: Fri, 9 Oct 2020 13:18:44 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: <99c18cb1-855b-f034-ede7-4f9686d80110@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [223.235.237.121] X-ClientProxiedBy: SG2PR01CA0153.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::33) 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.235.237.121) by SG2PR01CA0153.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22 via Frontend Transport; Fri, 9 Oct 2020 07:48:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cb07a15d-0aa0-4e2c-8b91-08d86c27c53e X-MS-TrafficTypeDiagnostic: VI1PR04MB5487: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vqQEJnYLdFbkfEbT0uri07U0czR98SIqtjY0EBZYHRsquPhbwOCacgtLPx0EbQGSSj/FfVFq/3HbWMQLoS0E6DDo3mEkSiYmD+KoZf9Zm3Y/1IJSdU+kwzmQWxeTdmZBUMGunCi7rCZZ+2tp0j4MJLXwrE/6pGchcpHXcL1KMHtc0R3jOibsP0WR/liJ9GwAGR7YRlIeX4OyYLgZHgV9oSspbJRUmdWlMG5A98WLAQy2dhPO55aejKZ/fvztDlmlEnaDfjjQJG4eMfGkcWHx3MvAikWvxc/2QiaCVROQ091qQhS0bQpsQJutlvGCRbJ3iXnJLvlXnVVOMHr8eLhbTHhwVYHDIm/B3q4kyeQaLkIX77J9X7YEBsBydSDresMJ 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)(39850400004)(396003)(366004)(136003)(346002)(376002)(16576012)(8936002)(478600001)(6666004)(316002)(8676002)(2906002)(6486002)(86362001)(83380400001)(53546011)(52116002)(31696002)(186003)(26005)(4326008)(956004)(16526019)(5660300002)(66556008)(2616005)(66946007)(66476007)(31686004)(110136005)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 8ggEEQmwxa8MSbwE9AKfKb49gaqXSyvQmzGE2IZxC54ItnuJrSI89tk1CvDllWvQQXgsWfeDGIFzeE7Fz4ASvZpynqNqkc1++BQTXnvVGUpufYBilA3katIQqDJOLjxiCFlmTZFYEcb0gd7ORaQyS+Vyvp48uD2hcpBQzV7xbgszRHHlfMtlz2neqFyGB90nKKu6je1NALVmh5A3bd6wt2J7MQD/YZYFdp8ESeIM0gecnNhbscQ+RhOp44Cfa1Ec4QtVjOim2byAoXKLmj1RTFD3Cc1i8F05MAhmdPR/NG/+O8T6fhhsJkacISpF+NAp2d6T/ONgVr8vZVvyGeuBQPV0mfTgD0jiidMoHMI7GXGSeZ6XSIfK8K0dUrLwMpEYXm500zJ8kIoJ+C0v7Zno8s24m7FCXJjKuFT1LuFXUYMx9a83RTMnBI+vbGjgig+TuBk1sz7j5tp1xGYabp904SeHiS37z16G3eXv+kHBX38W5ePGbHkwyHn8VWUzdxTbIrJQ5VjlQPFbB+jaqxKzA5Ogxs8VfVSCOwms5l2GaXra6/usASjuBOON7/qWBG4LaFZVcii8I4LN2tBbgTdj86SMqZRQZspuItktUswDLaICRZuBkPaxVYKtKn5bWtPsRwa0XJWxi/F0hBtkbQnSBA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb07a15d-0aa0-4e2c-8b91-08d86c27c53e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5837.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2020 07:48:54.5617 (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: tWFoQF8x0AYipVtwKjyXbD9yoetwW/2wX/NWKjhNxLJk5C8qBb4c1RzqVlSPCAOII0RDyWm6GNO+YRD5/SBW0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5487 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" Acked-by: Sachin Saxena On 08-Oct-20 6:42 PM, Ferruh Yigit wrote: > On 10/8/2020 3:24 AM, Sachin Saxena (OSS) wrote: > > [please don't top post, I moved reply to down] > >> >> 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') >> > > 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 > > > > I think it is already covered in the patch. > > Since just wrapping the macro cause a warning on unused static > variable/function, I need to wrap 'rte_dpaa2_dprtc_obj' & > 'dpaa2_create_dprtc_device()' too along with above macro you mentioned.