Skip to content
Permalink
Browse files

examples/ptpclient: fix delay request message

[ upstream commit 376aa383e70ac3b66f4d7b6cc33d9971331a3915 ]

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: ab129e9 ("examples/ptpclient: add minimal PTP client")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information...
Harman Kalra authored and kevintraynor committed Jul 25, 2019
1 parent 9fcd5f3 commit 797ad03ba206449099ead390cb9a0bbb6f7361e9
Showing with 8 additions and 1 deletion.
  1. +8 −1 examples/ptpclient/ptpclient.c
@@ -233,7 +233,11 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
return retval;

/* Enable timesync timestamping for the Ethernet device */
rte_eth_timesync_enable(port);
retval = rte_eth_timesync_enable(port);
if (retval < 0) {
printf("Timesync enable failed: %d\n", retval);
return retval;
}

/* 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 = 2;
ptp_msg->delay_req.hdr.control = 1;
ptp_msg->delay_req.hdr.log_message_interval = 127;
ptp_msg->delay_req.hdr.message_length =
htons(sizeof(struct delay_req_msg));
ptp_msg->delay_req.hdr.domain_number = ptp_hdr->domain_number;

/* Set up clock id. */
client_clkid =

0 comments on commit 797ad03

Please sign in to comment.
You can’t perform that action at this time.