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: <20190429123520.419ed9d4@hermes.lan>
Date:   Mon, 29 Apr 2019 12:35:51 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Tom Herbert <tom@...bertland.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        Tom Herbert <tom@...ntonium.net>
Subject: Re: [PATCH v7 net-next 4/6] exthdrs: Add TX parameters

On Mon, 29 Apr 2019 11:46:14 -0700
Tom Herbert <tom@...bertland.com> wrote:

>  /* Default (unset) values for TLV parameters */
>  static const struct tlv_proc tlv_default_proc = {
> -	.params.rx_class = 0,
> +	.params.r.class = 0,
> +
> +	.params.t.preferred_order = 0,
> +	.params.t.admin_perm = IPV6_TLV_PERM_NO_CHECK,
> +	.params.t.user_perm = IPV6_TLV_PERM_NONE,
> +	.params.t.class = 0,
> +	.params.t.align_mult = (4 - 1), /* Default alignment: 4n + 2 */
> +	.params.t.align_off = 2,
> +	.params.t.min_data_len = 0,
> +	.params.t.max_data_len = 255,
> +	.params.t.data_len_mult = (1 - 1), /* No default length align */
> +	.params.t.data_len_off = 0,
>  };

This looks cleaner if you skip the unnecessary 0 entries
and also use additional {}.

static const struct tlv_proc tlv_default_proc = {
	.params.t = {
		.admin_perm = IPV6_TLV_PERM_NO_CHECK,
		.user_perm = IPV6_TLV_PERM_NONE,
		.align_mult = 3,  /* Default alignment: 4n + 2 */
		.align_off = 2,
		.max_data_len = 255,
	},
};


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ