On Thu, Feb 03, 2022 at 12:50:06PM +0100, Miroslav Lichvar wrote:
> Add a function using ethtool netlink to check whether a PHC is a virtual
> clock of an interface.
> 
> Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
> Acked-by: Hangbin Liu <liuhang...@gmail.com>
> ---
>  rtnl.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  rtnl.h |  9 +++++++
>  2 files changed, 92 insertions(+)
> 
> diff --git a/rtnl.c b/rtnl.c
> index f8bdbe6..a0cf494 100644
> --- a/rtnl.c
> +++ b/rtnl.c
> @@ -19,6 +19,7 @@
>  #include <asm/types.h>
>  #include <sys/socket.h> /* Must come before linux/netlink.h on some systems. 
> */
>  #include <linux/netlink.h>
> +#include <linux/ethtool_netlink.h>
>  #include <linux/rtnetlink.h>
>  #include <linux/genetlink.h>
>  #include <linux/if_team.h>
> @@ -465,3 +466,85 @@ no_info:
>       nl_close(fd);
>       return index;
>  }
> +
> +static int search_vclocks(struct rtattr *attr, int phc_index)

Nit: please prefix with rtnl_

Thanks,
Richard


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

Reply via email to