Re: [Linuxptp-devel] [PATCH RFC 11/30] Convert call sites to the proper method for getting time stamp information.

2020-02-18 Thread Jacob Keller



On 2/11/2020 6:04 AM, Richard Cochran wrote:
> Signed-off-by: Richard Cochran 

Reviewed-by: Jacob Keller 

> ---
>  clock.c | 2 +-
>  port.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/clock.c b/clock.c
> index 66c6bc1..f987965 100644
> --- a/clock.c
> +++ b/clock.c
> @@ -962,7 +962,7 @@ struct clock *clock_create(enum clock_type type, struct 
> config *config,
>   STAILQ_FOREACH(iface, >interfaces, list) {
>   rtnl_get_ts_device(interface_name(iface), iface->ts_label);
>   ensure_ts_label(iface);

Unrelated to this patch, but I imagine this function wants to be moved
to interface.o too?

> - sk_get_ts_info(interface_label(iface), >ts_info);
> + interface_get_tsinfo(iface);
>   if (iface->ts_info.valid &&
>   ((iface->ts_info.so_timestamping & required_modes) != 
> required_modes)) {
>   pr_err("interface '%s' does not support requested 
> timestamping mode",
> diff --git a/port.c b/port.c
> index 52aef86..05eb1d6 100644
> --- a/port.c
> +++ b/port.c
> @@ -2508,7 +2508,7 @@ void port_link_status(void *ctx, int linkup, int 
> ts_index)
>   /* Both link down/up and change ts_label may change phc index. */
>   if (p->link_status & LINK_UP &&
>   (p->link_status & LINK_STATE_CHANGED || p->link_status & 
> TS_LABEL_CHANGED)) {
> - sk_get_ts_info(interface_label(p->iface), >iface->ts_info);
> + interface_get_tsinfo(p->iface);
>  
>   /* Only switch phc with HW time stamping mode */
>   if (p->iface->ts_info.valid && p->iface->ts_info.phc_index >= 
> 0) {
> 

Hmm. So we will also need an accessor for these pieces of data, but that
looks like it's handled in a future patch.

Thanks,
Jake


___
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


[Linuxptp-devel] [PATCH RFC 11/30] Convert call sites to the proper method for getting time stamp information.

2020-02-11 Thread Richard Cochran
Signed-off-by: Richard Cochran 
---
 clock.c | 2 +-
 port.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clock.c b/clock.c
index 66c6bc1..f987965 100644
--- a/clock.c
+++ b/clock.c
@@ -962,7 +962,7 @@ struct clock *clock_create(enum clock_type type, struct 
config *config,
STAILQ_FOREACH(iface, >interfaces, list) {
rtnl_get_ts_device(interface_name(iface), iface->ts_label);
ensure_ts_label(iface);
-   sk_get_ts_info(interface_label(iface), >ts_info);
+   interface_get_tsinfo(iface);
if (iface->ts_info.valid &&
((iface->ts_info.so_timestamping & required_modes) != 
required_modes)) {
pr_err("interface '%s' does not support requested 
timestamping mode",
diff --git a/port.c b/port.c
index 52aef86..05eb1d6 100644
--- a/port.c
+++ b/port.c
@@ -2508,7 +2508,7 @@ void port_link_status(void *ctx, int linkup, int ts_index)
/* Both link down/up and change ts_label may change phc index. */
if (p->link_status & LINK_UP &&
(p->link_status & LINK_STATE_CHANGED || p->link_status & 
TS_LABEL_CHANGED)) {
-   sk_get_ts_info(interface_label(p->iface), >iface->ts_info);
+   interface_get_tsinfo(p->iface);
 
/* Only switch phc with HW time stamping mode */
if (p->iface->ts_info.valid && p->iface->ts_info.phc_index >= 
0) {
-- 
2.20.1



___
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel