Commit a44b1d09 authored by Maciej Lipinski's avatar Maciej Lipinski

for debugging during ISPCS2019

parent f76e2f46
......@@ -25,7 +25,7 @@
#define PP_DEFAULT_DELAY_S 6
#define PP_MIN_DOMAIN_NUMBER 0
#define PP_MAX_DOMAIN_NUMBER 127
#define PP_MAX_DOMAIN_NUMBER 254
#define PP_DEFAULT_DOMAIN_NUMBER 0
#define PP_DEFAULT_ANNOUNCE_INTERVAL 1 /* 0 in 802.1AS */
......
......@@ -365,6 +365,21 @@ int bmc_pidcmp(struct PortIdentity *a, struct PortIdentity *b)
int ret;
ret = bmc_idcmp(&a->clockIdentity, &b->clockIdentity);
printf("ML: GM_A %x-%x-%x-%x-%x-%x-%x-%x | %d\n",
a->clockIdentity.id[0], a->clockIdentity.id[1],
a->clockIdentity.id[2], a->clockIdentity.id[3],
a->clockIdentity.id[4], a->clockIdentity.id[5],
a->clockIdentity.id[6], a->clockIdentity.id[7],
a->portNumber);
printf("ML: GM_B %x-%x-%x-%x-%x-%x-%x-%x | %d\n",
b->clockIdentity.id[0], b->clockIdentity.id[1],
b->clockIdentity.id[2], b->clockIdentity.id[3],
b->clockIdentity.id[4], b->clockIdentity.id[5],
b->clockIdentity.id[6], b->clockIdentity.id[7],
b->portNumber);
printf("ML: ret=%d\n", ret);
// return ret;
if (ret != 0)
return ret;
......@@ -972,6 +987,8 @@ void bmc_add_frgn_master(struct pp_instance *ppi, struct pp_frgn_master *frgn_m
}
/* Check if foreign master is already known */
pp_diag(ppi, bmc, 2, "ML:frgn_rec_num=%d, PP_NR_FOREIGN_RECORDS=%d \n",
ppi->frgn_rec_num,PP_NR_FOREIGN_RECORDS);
for (i=0;i < ppi->frgn_rec_num; i++)
{
if (!bmc_pidcmp(pid,
......
......@@ -17,6 +17,7 @@ int msg_from_current_master(struct pp_instance *ppi)
{
MsgHeader *hdr = &ppi->received_ptp_header;
if (!bmc_pidcmp(&DSPAR(ppi)->parentPortIdentity,
&hdr->sourcePortIdentity))
return 1;
......
......@@ -43,7 +43,6 @@ static int slave_handle_sync(struct pp_instance *ppi, void *buf,
if (!msg_from_current_master(ppi)) {
pp_error("%s: Sync message is not from current parent\n",
__func__);
return 0;
}
if ( is_delayMechanismE2E(ppi) && ppi->t1.scaled_nsecs==0 && ppi->t1.secs==0 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment