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 6AFB643E06; Fri, 5 Apr 2024 17:36:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A692402E9; Fri, 5 Apr 2024 17:36:33 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by mails.dpdk.org (Postfix) with ESMTP id 48DF1402E9 for ; Fri, 5 Apr 2024 17:36:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712331391; x=1743867391; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Pd8wVDaqkGDsA+oALzN3ruF/dgc5euzyRy9O55u60Uk=; b=HY86/wYP9NiFg8XPLBNID7V0ixY66p4Usi+J380e30AAVh+yI5E0i6AB nBTYZ7DDw89JNeXInmqFlJ0rT2pRIEjQwxKKQxMZgN76J2F0WypKjiaCd 37fduVXGtZYcDZT5idUyl0BksWiKIBVeTNoJfyib2ADZyPNJj6y49rIRC lRV7/PUc5uhdJfDU9WAvlx4899C4qi69m0OBwnhwOss8vTMs4fUZRyf+q mskbQ+6V53JGgQazkaJbUKYmuXQW6r7m62miCVo02HBj5WubUrGKof71Z ijtHvZIwCbB9pHAhfck4zpii6ocSGK+BWvwTj83j3ugVqJzKdQlx2J7Mt A==; X-CSE-ConnectionGUID: fxM7Q7HWQKi+W9yUAzo3eg== X-CSE-MsgGUID: gMjKDzUbQqCHSrT8VSuR4A== X-IronPort-AV: E=McAfee;i="6600,9927,11035"; a="7529612" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="7529612" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 08:36:28 -0700 X-CSE-ConnectionGUID: OCLMMmE0QW+XDCdz9C9s0g== X-CSE-MsgGUID: ThZscFmBQ4S6Eg+Ip2cG8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="23679574" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Apr 2024 08:36:26 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 5 Apr 2024 08:36:25 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 5 Apr 2024 08:36:25 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 5 Apr 2024 08:36:25 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 5 Apr 2024 08:36:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aE7K+uuRcoQWlVnInl0GpYc7V2ZNmvrarv7ymx2mi9b47GdUXjcmMUOvEguHr3oIp8OzzbUokXwyoXNmqCWcjLi+522c0njmoOGdJce/OXuqn/7D5DrcEolERqD+VFW8G1j4hTYvgjxk64iglYfaLtwJZ5WAzzLKABDP2jIAsv+WV5yUzmY9mxbzLP9SmJTZadb5DEgQyrAED6hMjKOiyd2teoT5A1JEsQSZP7G6NGhmUKH9JOAvo5FBjyvrSE5UV17J4j1LAt1o4/jpWfs+UtWXs7qcxihnKNJdij10Pwskhk1gQp+mk6hdWVHUNcs5x4jIvF92ahojOo85RqLWUw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gyenf/KWewAu64iFRYR7EPFNBFPm5tgby/OpmMypPTQ=; b=eSROORGdCzfQn2YXmVd2hKcDwruFp1erbB8N4Or7SDjpANt98O1vNsCXBZ+2beuP5XgVyBvwnOq/+8L9ARMEUIK3Ab8o7tOLH5vQ1i9w2ziN48AlJRQPnLjH/PxEg2MD8ZDEasUkcQ68tu5PcbVzP4JC25iuU0gvHgvmFjn4ed38AzGwYS+41Kq99o17j7uxrn3WnHlDN+4pdRBd2JzVEs7UqrVMsROh8rvSJPAJofMVb88smpScAdjUngrJoUE6NyT+OiWRFdDWwJnmifzAYCjWDPWLnNuiWHONvlq0SMcZ8KtS1pllG2fwchqZd26Ry7XLL/ml7hJLej2MrBzJEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from IA1PR11MB6074.namprd11.prod.outlook.com (2603:10b6:208:3d6::14) by CY5PR11MB6439.namprd11.prod.outlook.com (2603:10b6:930:34::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.10; Fri, 5 Apr 2024 15:36:21 +0000 Received: from IA1PR11MB6074.namprd11.prod.outlook.com ([fe80::4d95:78d0:b30a:b5c5]) by IA1PR11MB6074.namprd11.prod.outlook.com ([fe80::4d95:78d0:b30a:b5c5%6]) with mapi id 15.20.7452.019; Fri, 5 Apr 2024 15:36:21 +0000 Message-ID: Date: Fri, 5 Apr 2024 21:06:14 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] app/testpmd: handle IEEE1588 init fail To: Dengdui Huang , CC: , , References: <20240330074409.273916-1-huangdengdui@huawei.com> Content-Language: en-US From: "Singh, Aman Deep" In-Reply-To: <20240330074409.273916-1-huangdengdui@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0055.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:99::10) To IA1PR11MB6074.namprd11.prod.outlook.com (2603:10b6:208:3d6::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB6074:EE_|CY5PR11MB6439:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nieT8uoX4+KY2elmt9wO9W/04FOIIlomTXN4twStO/Ms63LALTm33SvFaTakvNCbZw2uaTvkdsonCyWAfQICs0hNkDxWxQNYtt5tIECBT4YAHJxmUjOMBtPogUdzrSZB70ONzoCEGahzb5fyfsG4JtlZEMqlZ2qIFwkdcznhknBSRplS214hyvh0VFnvulfELeU9OkzWNDlX5KoO5sy9Y3v8eA6pOH+avk3hBE5eKKUtFAUOd/+X1nezRizB6Kumg2NtByC2d8ZXURP8F3XgOtlOKNIU4X8blcb4c54Lltk4cyi7JUJZtWQkCXb55SjZ2ti/jjRuXwTNgHOeCWbFU6d4ZJ/U7I2zEhOahDCzvKsPmDMzCmym8MNTti4mw8I4ZyQN4JmcxbUZEyaHEgfzmJJo7djjFIZD1G14qWGek0Wr9MPW/ZyBjv8nMDGSuyooPqEwT/j5UFHSjXigNVNjXuXJgsKMLRpSIKZej2U9UFukPsD4cUDFQ6RBsySw6M2uZ/6CXERquLxxjxQDzvkrSTXOOYTkPdNQO1axIabl5Fxwkak9K0IW5zvLfDcGVMEFSd5O+uQHuTLDtl4CzVEmKJB3m52h3TVZawIoSyQznQJYWLFWDbYsm+do0f45j+6kwv286X3sdcARJFAiWLcWBU0nfPQd3bSPffOyMvlt25w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR11MB6074.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(366007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?LzM2V3BaNVFMdVdyam5wanFQUlI3ZzRnclV0ajNkQlpFOVEwZVQyVkEweGxU?= =?utf-8?B?ZTFRYnF2bWRmUksyY3U4eklNSTFxcGhuWjVvTkZDKzRWRm8zVnltL0VicW43?= =?utf-8?B?eG0zRFN6c3VQRDhwbkhvT0o0OTVDR2NITTIvOUJrNXJrUUd6ejRwUkU5cGNk?= =?utf-8?B?bkxscW9iZkQwUUprQytENzVDcnpXMVk5dGV0cEFzdXZvWDdJcDJlVG01Q004?= =?utf-8?B?NWhVemNVUnliT3Fob0ZVOFhSaTkwTll0djNXd1k3MElVdWR0bXJrNDFRM2xM?= =?utf-8?B?SmFhZlBhNnY0cS9hQjJTRVFLOGYvSElJMkp6Yit5R29GSG9yem5HOGtyK2tJ?= =?utf-8?B?ZkxNWkw1SEtrS3BRMFM0UURmMFJwYWp0OGtpODU0VzZJb0JEa2RXMis5dXVj?= =?utf-8?B?R0poalZISzNhcXpoRXg3R1E0MUJSOFI0Nk0rbWg5M3B6U3Nzd2YxSGtJeUhi?= =?utf-8?B?dlVzNzhqdFhsODR6M09kNmNTRUlKcXM1Q1c5RDRKRjFrWm91SVZaUTFI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2SFVPRTFFMU9waUsxaVZ0?= =?utf-8?B?Q2lzSnRnY0VKQkhyc3ZWYTAwTllOSVYvb3dWQ1BTN2UvdUMxcENsY1Z3SGVE?= =?utf-8?B?Rm1kZ0FSdThqb1B5Q0d3Q2ErcVYyNzYrSk5EYkh2bURWUWtWd3NwakM4RWts?= =?utf-8?B?VDN1WlBQeTdtUm4xcWd6b1NXSDFZT2dsdzg4MWppakIxeURUZGlpUWNmVjl4?= =?utf-8?B?a21Pa3BRNTNrSXhxbU13UVdUSFl4bkRReExXSjJRV3dwUVBGV2FybUxlSXhh?= =?utf-8?B?c25rU1NnMmVZcWIvZWIvZFIyMk5SYkZGLzZQbVhUT1FLY0FKem9EWXM3ZW9G?= =?utf-8?B?cFhFd2MvYjlQZkdvQ3gxUnRHV25ZVy9DZzR4cE92ZXpwU2N6NWR2QmEvMlFI?= =?utf-8?B?SVNSY0ZMYmhpVXpvY1hCOUduanNqUUgyYy9URWROdWxWRThiaXk4OUwvaFpK?= =?utf-8?B?Q1NtWS9WSUJCTm9OeXlxMnRtSnhvQWpSbUQ3bXdHZXdyL2EzVUt6VmVMbkVl?= =?utf-8?B?ODlDUWRQa1ljcC9tZEw2WTlyZWNkM2JqL3lZd3o2UnZvMG41akZ5bU1WdGtM?= =?utf-8?B?bWZKSVJHcjE4bm5kQ2hhb1cxbDlRc0tBK2tQSTJubmpTRDRjL2xsZXdVUnN5?= =?utf-8?B?aElSZjYxTjlob29BUUhlTm1RL0hTVUN3cXRTMFVXcVkwV2pyS01ZNU5VWDlJ?= =?utf-8?B?SGczdElsU0oxSko5Mi9NRktTMEdxZ3ZsKzhSeXdNaUFMQStiK1FsOFBveHBK?= =?utf-8?B?bGc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: e9fa2b82-cb96-4df5-a193-08dc558624b0 X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB6074.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2024 15:36:21.2448 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: E4OYX6F6+t7MX3s06gFuia3cUZOiO5kl4HBpfhvg8yjygFM0aKQOqHAkvCP8f9QuM3mteDJesgkWG6c43xxvIwRDVuweq9cOirfvr2tzZeY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6439 X-OriginatorOrg: intel.com 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 3/30/2024 1:14 PM, Dengdui Huang wrote: > When the port's timestamping function failed to initialize > (for example, the device does not support PTP), the packets > received by the hardware do not contain the timestamp. > In this case, IEEE1588 packet forwarding should not start. > This patch fix it. > > Plus, adding a failure message when failed to disable PTP. > > Fixes: a78040c990cb ("app/testpmd: update forward engine beginning") > Cc: stable@dpdk.org > > Signed-off-by: Dengdui Huang Acked-by: Aman Singh > --- > app/test-pmd/ieee1588fwd.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c > index 3371771751..afea7735c7 100644 > --- a/app/test-pmd/ieee1588fwd.c > +++ b/app/test-pmd/ieee1588fwd.c > @@ -197,14 +197,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs) > static int > port_ieee1588_fwd_begin(portid_t pi) > { > - rte_eth_timesync_enable(pi); > - return 0; > + int ret; > + > + ret = rte_eth_timesync_enable(pi); > + if (ret) > + printf("Port %u enable PTP failed, ret = %d\n", pi, ret); > + > + return ret; > } > > static void > port_ieee1588_fwd_end(portid_t pi) > { > - rte_eth_timesync_disable(pi); > + int ret; > + > + ret = rte_eth_timesync_disable(pi); > + if (ret) > + printf("Port %u disable PTP failed, ret = %d\n", pi, ret); > } > > static void