Daniel Le
2015-12-08 23:39:54 UTC
Hello,
In my set-up to try the enterprise profile for PTP, tcpdump indicates the slave device correctly receives the master multicast announce and sync messages, however there is no slave outgoing unicast delay requests at all.
For debugging purpose, I modified the function port_delay_request() as follows and noticed the master's source IPv4 address was 0.0.0.0, which implies the slave's delay request is ultimately dropped by transport_sendto(). Can someone point out what I'm missing here? Where else in the code to better verify the master IP address on slave end?
static int port_delay_request(struct port *p)
{
...
char str[INET_ADDRSTRLEN];
...
if (p->hybrid_e2e) {
struct ptp_message *dst = TAILQ_FIRST(&p->best->messages);
msg->address = dst->address;
msg->header.flagField[0] |= UNICAST;
inet_ntop(AF_INET, &(dst->address.sin.sin_addr), str, INET_ADDRSTRLEN);
pr_info("address = %s", str);
}
...
}
Thanks,
Daniel
In my set-up to try the enterprise profile for PTP, tcpdump indicates the slave device correctly receives the master multicast announce and sync messages, however there is no slave outgoing unicast delay requests at all.
For debugging purpose, I modified the function port_delay_request() as follows and noticed the master's source IPv4 address was 0.0.0.0, which implies the slave's delay request is ultimately dropped by transport_sendto(). Can someone point out what I'm missing here? Where else in the code to better verify the master IP address on slave end?
static int port_delay_request(struct port *p)
{
...
char str[INET_ADDRSTRLEN];
...
if (p->hybrid_e2e) {
struct ptp_message *dst = TAILQ_FIRST(&p->best->messages);
msg->address = dst->address;
msg->header.flagField[0] |= UNICAST;
inet_ntop(AF_INET, &(dst->address.sin.sin_addr), str, INET_ADDRSTRLEN);
pr_info("address = %s", str);
}
...
}
Thanks,
Daniel