From: Stephen Hemminger <stephen@networkplumber.org>
To: Tom Herbert <tom@herbertland.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
Tom Herbert <tom@quantonium.net>
Subject: Re: [PATCH v7 net-next 4/6] exthdrs: Add TX parameters
Date: Mon, 29 Apr 2019 12:35:51 -0700 [thread overview]
Message-ID: <20190429123520.419ed9d4@hermes.lan> (raw)
In-Reply-To: <1556563576-31157-5-git-send-email-tom@quantonium.net>
On Mon, 29 Apr 2019 11:46:14 -0700
Tom Herbert <tom@herbertland.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,
},
};
next prev parent reply other threads:[~2019-04-29 19:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 18:46 [PATCH v7 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I Tom Herbert
2019-04-29 18:46 ` [PATCH v7 net-next 1/6] exthdrs: Create exthdrs_options.c Tom Herbert
2019-04-29 18:46 ` [PATCH v7 net-next 2/6] exthdrs: Move generic EH functions to exthdrs_common.c Tom Herbert
2019-04-29 18:46 ` [PATCH v7 net-next 3/6] exthdrs: Registration of TLV handlers and parameters Tom Herbert
2019-04-29 18:46 ` [PATCH v7 net-next 4/6] exthdrs: Add TX parameters Tom Herbert
2019-04-29 19:35 ` Stephen Hemminger [this message]
2019-04-29 20:36 ` Tom Herbert
2019-04-29 20:38 ` David Miller
2019-04-29 18:46 ` [PATCH v7 net-next 5/6] ip6tlvs: Add netlink interface Tom Herbert
2019-04-29 18:46 ` [PATCH v7 net-next 6/6] ip6tlvs: Validation of TX Destination and Hop-by-Hop options Tom Herbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190429123520.419ed9d4@hermes.lan \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
--cc=tom@quantonium.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).