lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220128173121.7bb0f8b1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 28 Jan 2022 17:31:21 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Justin Iurman <justin.iurman@...ege.be>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org
Subject: Re: [PATCH net-next 1/2] uapi: ioam: Insertion frequency

On Wed, 26 Jan 2022 19:46:27 +0100 Justin Iurman wrote:
> Add the insertion frequency uapi for IOAM lwtunnels.
> 
> Signed-off-by: Justin Iurman <justin.iurman@...ege.be>
> ---
>  include/uapi/linux/ioam6_iptunnel.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/include/uapi/linux/ioam6_iptunnel.h b/include/uapi/linux/ioam6_iptunnel.h
> index 829ffdfcacca..462758cdba14 100644
> --- a/include/uapi/linux/ioam6_iptunnel.h
> +++ b/include/uapi/linux/ioam6_iptunnel.h
> @@ -30,6 +30,15 @@ enum {
>  enum {
>  	IOAM6_IPTUNNEL_UNSPEC,
>  
> +	/* Insertion frequency:
> +	 * "k over n" packets (0 < k <= n)
> +	 * [0.0001% ... 100%]
> +	 */
> +#define IOAM6_IPTUNNEL_FREQ_MIN 1
> +#define IOAM6_IPTUNNEL_FREQ_MAX 1000000

If min is 1 why not make the value unsigned?

> +	IOAM6_IPTUNNEL_FREQ_K,		/* s32 */
> +	IOAM6_IPTUNNEL_FREQ_N,		/* s32 */

You can't insert into the middle of a uAPI enum. Binary compatibility.

>  	/* Encap mode */
>  	IOAM6_IPTUNNEL_MODE,		/* u8 */
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ