Commit 7d10c341 authored by Alessandro Rubini's avatar Alessandro Rubini

trivial: remove unsed in/outbound_latency

While it may make sense to setup constant delay somewhere (for WR we
define them, for instance), the legacy implementation was unused and
wrong.

Unused because nobody sets it (even if we could do it in the config
file).  Wrong because inbound is never used, and both are global and
not per-port.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 5e0e5a62
......@@ -16,8 +16,6 @@ static struct pp_runtime_opts sim_master_rt_opts = {
.clockAccuracy = PP_DEFAULT_CLOCK_ACCURACY,
.offsetScaledLogVariance = PP_DEFAULT_CLOCK_VARIANCE,
},
.inbound_latency = {0, PP_DEFAULT_INBOUND_LATENCY},
.outbound_latency = {0, PP_DEFAULT_OUTBOUND_LATENCY},
.max_rst = PP_DEFAULT_MAX_RESET,
.max_dly = PP_DEFAULT_MAX_DELAY,
.flags = PP_DEFAULT_FLAGS,
......
......@@ -17,8 +17,6 @@
#define PP_MAX_LINKS 64
#define PP_DEFAULT_CONFIGFILE "/etc/ppsi.conf"
#define PP_DEFAULT_INBOUND_LATENCY 0 /* in nsec */
#define PP_DEFAULT_OUTBOUND_LATENCY 0 /* in nsec */
#define PP_DEFAULT_FLAGS 0
#define PP_DEFAULT_ROLE PPSI_ROLE_AUTO
#define PP_DEFAULT_PROTO PPSI_PROTO_UDP /* overridden by arch */
......
......@@ -16,7 +16,6 @@
*/
struct pp_runtime_opts {
ClockQuality clock_quality;
TimeInternal inbound_latency, outbound_latency;
Integer32 max_rst; /* Maximum number of nanoseconds to reset */
Integer32 max_dly; /* Maximum number of nanoseconds of delay */
Integer32 ttl;
......
......@@ -183,18 +183,6 @@ static int f_servo_pi(struct pp_argline *l, int lineno,
return 0;
}
static int f_latency(struct pp_argline *l, int lineno, struct pp_globals *ppg,
union pp_cfg_arg *arg)
{
int n1, n2;
CHECK_PPI(0);
n1 = arg->i2[0]; n2 = arg->i2[1];
GOPTS(ppg)->inbound_latency.nanoseconds = n1;
GOPTS(ppg)->outbound_latency.nanoseconds = n2;
return 0;
}
static int f_announce_intvl(struct pp_argline *l, int lineno,
struct pp_globals *ppg, union pp_cfg_arg *arg)
{
......@@ -254,7 +242,6 @@ static struct pp_argline pp_global_arglines[] = {
RT_OPTION_INT("clock-allan-variance", ARG_INT, NULL,
clock_quality.offsetScaledLogVariance),
LEGACY_OPTION(f_servo_pi, "servo-pi", ARG_INT2),
LEGACY_OPTION(f_latency, "latency", ARG_INT2),
RT_OPTION_INT("domain-number", ARG_INT, NULL, domain_number),
LEGACY_OPTION(f_announce_intvl, "announce-interval", ARG_INT),
RT_OPTION_INT("sync-interval", ARG_INT, NULL, sync_intvl),
......
......@@ -551,8 +551,6 @@ int msg_issue_sync_followup(struct pp_instance *ppi)
/* Send followup on general channel with sent-stamp of sync */
time_snt = &ppi->last_snt_time;
add_TimeInternal(time_snt, time_snt,
&OPTS(ppi)->outbound_latency);
from_TimeInternal(time_snt, &tstamp);
msg_pack_follow_up(ppi, &tstamp);
return __send_and_log(ppi, PP_FOLLOW_UP_LENGTH, PPM_FOLLOW_UP,
......
......@@ -17,8 +17,6 @@ struct pp_runtime_opts __pp_default_rt_opts = {
.clockAccuracy = PP_DEFAULT_CLOCK_ACCURACY,
.offsetScaledLogVariance = PP_DEFAULT_CLOCK_VARIANCE,
},
.inbound_latency = {0, PP_DEFAULT_INBOUND_LATENCY},
.outbound_latency = {0, PP_DEFAULT_OUTBOUND_LATENCY},
.max_rst = PP_DEFAULT_MAX_RESET,
.max_dly = PP_DEFAULT_MAX_DELAY,
.flags = PP_DEFAULT_FLAGS,
......
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