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 8A09DA046B for ; Thu, 25 Jul 2019 16:24:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F7A41C369; Thu, 25 Jul 2019 16:24:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 0FDF31C34E; Thu, 25 Jul 2019 16:24:46 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6PEKdSC028993; Thu, 25 Jul 2019 07:24:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=mNFkCLDLKfLwGK/DQfYZBsFIF1qqoFlG12KFqZ43wm0=; b=Ml7qk8HcvoxxeUDXoZZXccoYjvJhCj4p22JQxLUYSfAa2h/NXfoH23cElyCOdi1wyxaZ CMZswJMGHOdPQojSApNxauLkDo9PT2+TFN8tw6prsx4dIVKNL4cVh0U8nqKYddDd9XKG 7Y2BGPjwSJWkVcr8mQyu3bXv/MmcjG5n2KxPQ8KfidSTsAii4Cb20UXFQR6ajdwVIfJj eVyx6ONztIKH985CpAjdRYc+G2vw2zCSB+laOzLImWN/RpHa9rXMGv6hXJ3z2zBGA86p puMY8NuAIRqK3gh4Ya1EFn7+8s8Em7Ak61jiHyV7cQrsD0Hf+qoopE/eZCNRh+3ev/cA dA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2tx6251nk2-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2019 07:24:46 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 25 Jul 2019 07:24:44 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (104.47.50.57) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 25 Jul 2019 07:24:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dcl53aVM3HqZ8AZWVtkjaz1I4/eJTpwnnLYuYG2/uvuyrEC6dDykNoWPEr17Zx4i0ZFzEaalmgAg6trP0OuNOUW9d4Q8X1d+Be5m09+XcyGjbOsyhfxKHCQWdfz/1qrQtmJd/KGjdM8uABWGfpRrqqqORmystwgjaZ5dTeWBDUfvpIF2kO3QoVsrQSyjuju7kBohho1k5yLkDfxRFUrH28iiZTAlu4ufY++82WUJ4DrW2hAFRmK1Fd39IhD7IG3MnAAjxKubccBboFGlhNsIBIJHA+HYa60lrilNo1pkSx3LQ+xlA1nrYQdTaLQun/tOGu99f78STXs+VQzd9TEReA== 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=mNFkCLDLKfLwGK/DQfYZBsFIF1qqoFlG12KFqZ43wm0=; b=A46varP3OBc0zEj7LkyG1GdKEo6Dk2ON+XQX9FD5soLKulJBb9pJzEteX2A5rEWP/gxyL4O6+fO4E/QJrdUoDykO9mSCwkV4tEB/JXA107jzZntZbWljOwy6g/q3rKmUj0CWXZNz3DAQblAZlA2L+JrRN+nM/6CYnQhpJARRUDzZyNlJhxI/dq3hR0W2glelacNT078sRnWHIlXxLOVx/2WD81eWa+rEPmZg/tz8IoDhoAX2piojEpaHO6mlvKT2UzWitmWn0RVBz8M5vPTJRM5xX1VKnxfhiDmPgfFpNJA2TulXlqagVjyYYulcqwxn1jbCWBor7cMSKspFAKJx9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mNFkCLDLKfLwGK/DQfYZBsFIF1qqoFlG12KFqZ43wm0=; b=jtvyC7CFQnYNr9e4DFz5FMsnJD99aoGkfrkvqVmZlcfxMQdQZEseZjrOdKzEbX+Z6N1j+0R8qHEXv9HB2Go+adZBHvEqy7eD1GoBoTcgpdoJAPBL88HuT/7q7u9ozP9FZ3ebhaPlax2zFF2NFoQmKFi1HSWP7zQf16E2TWbTIAo= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (20.179.21.149) by MN2PR18MB3389.namprd18.prod.outlook.com (10.255.238.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.10; Thu, 25 Jul 2019 14:24:43 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::4447:9459:5386:2e18]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::4447:9459:5386:2e18%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 14:24:43 +0000 From: Harman Kalra To: John McNamara , Pablo de Lara , Bruce Richardson , Harry van Haaren , Xiaoyun Li CC: "dev@dpdk.org" , Harman Kalra , "stable@dpdk.org" Thread-Topic: [PATCH v2] examples/ptpclient: fix delay request message Thread-Index: AQHVQvSzGU6nNkEYw0mObOrwe4XbQQ== Date: Thu, 25 Jul 2019 14:24:43 +0000 Message-ID: <1564064668-28667-1-git-send-email-hkalra@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR0101CA0030.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::16) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:3e::21) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3627bd7e-397e-4fd8-6d14-08d7110bd637 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB3389; x-ms-traffictypediagnostic: MN2PR18MB3389: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(39860400002)(136003)(366004)(376002)(346002)(199004)(189003)(8936002)(86362001)(66946007)(81166006)(81156014)(6486002)(7736002)(102836004)(8676002)(6512007)(186003)(55236004)(52116002)(26005)(66476007)(110136005)(316002)(305945005)(99286004)(53936002)(66556008)(386003)(6506007)(256004)(66066001)(66446008)(6436002)(64756008)(54906003)(25786009)(36756003)(486006)(2616005)(5660300002)(476003)(71190400001)(478600001)(71200400001)(2906002)(14454004)(50226002)(3846002)(6116002)(14444005)(15650500001)(68736007)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3389; H:MN2PR18MB2848.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: w7eZBNRsOknFIa8/ZBdZ/B91oMxdSq5vwBoGpFFDWQg1ud8evlOoBZVIjqPfx3I9kdGqsqiFexy9upAfxcUtkV5cp3/c//DvEwoDpCkOS2YdKVXMZg+U5CIbIbZe77L7nggf+/23pJlL7BuMjac1Q45244/UKCGdJHITF6Rbm8J5IbgHEcYBAto1jE4VmNCmxTvPv18RPnM18P1t99E7WfRaTH5rTGdrYHEFPbJPjDCDJWtbUG/VBBeHmop/67fK14c/r/FDEfdeWpitMCzs+/Zy0+0BNx6tqJ1Rd3/jtzrOX7/JOfa5/Eubej7oOmFuY5o10VQc1iec+By13aQTTwcl12WtLVn4si9DVqVR5O7SoaI4EfegBgnJx0p4XxrC1o4Sv2hkSEjCKLkQ31GY4ZGK0pRiegYINldIXgV4uZY= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3627bd7e-397e-4fd8-6d14-08d7110bd637 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 14:24:43.3513 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hkalra@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3389 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-25_05:2019-07-25,2019-07-25 signatures=0 Subject: [dpdk-dev] [PATCH v2] examples/ptpclient: fix delay request message X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Observed an issue with the length and domain number of the delay request message sent out by the client. Due to which delay response from master was not received. Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client") Cc: stable@dpdk.org Signed-off-by: Harman Kalra --- examples/ptpclient/ptpclient.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.= c index 95b0c176e..31778fd95 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -233,7 +233,11 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool= ) return retval; =20 /* Enable timesync timestamping for the Ethernet device */ - rte_eth_timesync_enable(port); + retval =3D rte_eth_timesync_enable(port); + if (retval < 0) { + printf("Timesync enable failed: %d\n", retval); + return retval; + } =20 /* Enable RX in promiscuous mode for the Ethernet device. */ rte_eth_promiscuous_enable(port); @@ -413,6 +417,9 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data) ptp_msg->delay_req.hdr.ver =3D 2; ptp_msg->delay_req.hdr.control =3D 1; ptp_msg->delay_req.hdr.log_message_interval =3D 127; + ptp_msg->delay_req.hdr.message_length =3D + htons(sizeof(struct delay_req_msg)); + ptp_msg->delay_req.hdr.domain_number =3D ptp_hdr->domain_number; =20 /* Set up clock id. */ client_clkid =3D --=20 2.18.0