qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] linux-user: time stamping options for setso


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH 2/2] linux-user: time stamping options for setsockopt()
Date: Sat, 7 Sep 2019 16:26:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Le 23/08/2019 à 01:14, Shu-Chun Weng via Qemu-devel a écrit :
> This change supports SO_TIMESTAMPNS and SO_TIMESTAMPING for
> setsocketopt() with SOL_SOCKET.
> 
> The TARGET_SO_TIMESTAMP{NS,ING} constants are already defined for
> alpha, hppa, and sparc. In include/uapi/asm-generic/socket.h:
> 
> In arch/mips/include/uapi/asm/socket.h:
> 
> Signed-off-by: Shu-Chun Weng <address@hidden>
> ---
>  linux-user/generic/sockbits.h |  4 ++++
>  linux-user/mips/sockbits.h    |  4 ++++
>  linux-user/syscall.c          | 10 ++++++++--
>  3 files changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-user/generic/sockbits.h b/linux-user/generic/sockbits.h
> index e44733c601..5cbafdb49b 100644
> --- a/linux-user/generic/sockbits.h
> +++ b/linux-user/generic/sockbits.h
> @@ -51,6 +51,10 @@
>  #define TARGET_SO_PEERNAME             28
>  #define TARGET_SO_TIMESTAMP            29
>  #define TARGET_SCM_TIMESTAMP           TARGET_SO_TIMESTAMP
> +#define TARGET_SO_TIMESTAMPNS          35
> +#define TARGET_SCM_TIMESTAMPNS         TARGET_SO_TIMESTAMPNS
> +#define TARGET_SO_TIMESTAMPING         37
> +#define TARGET_SCM_TIMESTAMPING        TARGET_SO_TIMESTAMPING

We must not rely on TARGET_SO_TIMESTAMP and TARGET_SO_TIMESTAMPNS but on
the _OLD and _NEW versions.

See:

6d5d5dde9adb ("linux-user: fix to handle variably sized SIOCGSTAMP with
new kernels")

So the existing definitions must be removed and the _NEW and _OLD
versions added.

Thanks,
Laurent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]