netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Andreas Roeseler <andreas.a.roeseler@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org
Subject: Re: [PATCH net-next] icmp: standardize naming of RFC 8335 PROBE constants
Date: Mon, 26 Apr 2021 20:54:34 -0700	[thread overview]
Message-ID: <20210426205434.248bed86@hermes.local> (raw)
In-Reply-To: <20210427034002.291543-1-andreas.a.roeseler@gmail.com>

On Mon, 26 Apr 2021 22:40:02 -0500
Andreas Roeseler <andreas.a.roeseler@gmail.com> wrote:

> The current definitions of constants for PROBE are inconsistent, with
> some beginning with ICMP and others with simply EXT. This patch
> attempts to standardize the naming conventions of the constants for
> PROBE, and update the relevant definitions in net/ipv4/icmp.c.
> 
> Similarly, the definitions for the code field (previously
> ICMP_EXT_MAL_QUERY, etc) use the same prefixes as the type field. This
> patch adds _CODE_ to the prefix to clarify the distinction of these
> constants.
> 
> Signed-off-by: Andreas Roeseler <andreas.a.roeseler@gmail.com>
> ---
>  include/uapi/linux/icmp.h | 28 ++++++++++++++--------------
>  net/ipv4/icmp.c           | 16 ++++++++--------
>  2 files changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/include/uapi/linux/icmp.h b/include/uapi/linux/icmp.h
> index 222325d1d80e..c1da8244c5e1 100644
> --- a/include/uapi/linux/icmp.h
> +++ b/include/uapi/linux/icmp.h
> @@ -70,22 +70,22 @@
>  #define ICMP_EXC_FRAGTIME	1	/* Fragment Reass time exceeded	*/
>  
>  /* Codes for EXT_ECHO (PROBE) */
> -#define ICMP_EXT_ECHO		42
> -#define ICMP_EXT_ECHOREPLY	43
> -#define ICMP_EXT_MAL_QUERY	1	/* Malformed Query */
> -#define ICMP_EXT_NO_IF		2	/* No such Interface */
> -#define ICMP_EXT_NO_TABLE_ENT	3	/* No such Table Entry */
> -#define ICMP_EXT_MULT_IFS	4	/* Multiple Interfaces Satisfy Query */
> +#define ICMP_EXT_ECHO			42
> +#define ICMP_EXT_ECHOREPLY		43
> +#define ICMP_EXT_CODE_MAL_QUERY		1	/* Malformed Query */
> +#define ICMP_EXT_CODE_NO_IF		2	/* No such Interface */
> +#define ICMP_EXT_CODE_NO_TABLE_ENT	3	/* No such Table Entry */
> +#define ICMP_EXT_CODE_MULT_IFS		4	/* Multiple Interfaces Satisfy Query */
>  
>  /* Constants for EXT_ECHO (PROBE) */
> -#define EXT_ECHOREPLY_ACTIVE	(1 << 2)/* active bit in reply message */
> -#define EXT_ECHOREPLY_IPV4	(1 << 1)/* ipv4 bit in reply message */
> -#define EXT_ECHOREPLY_IPV6	1	/* ipv6 bit in reply message */
> -#define EXT_ECHO_CTYPE_NAME	1
> -#define EXT_ECHO_CTYPE_INDEX	2
> -#define EXT_ECHO_CTYPE_ADDR	3
> -#define ICMP_AFI_IP		1	/* Address Family Identifier for ipv4 */
> -#define ICMP_AFI_IP6		2	/* Address Family Identifier for ipv6 */
> +#define ICMP_EXT_ECHOREPLY_ACTIVE	(1 << 2)/* active bit in reply message */
> +#define ICMP_EXT_ECHOREPLY_IPV4		(1 << 1)/* ipv4 bit in reply message */
> +#define ICMP_EXT_ECHOREPLY_IPV6		1	/* ipv6 bit in reply message */
> +#define ICMP_EXT_ECHO_CTYPE_NAME	1
> +#define ICMP_EXT_ECHO_CTYPE_INDEX	2
> +#define ICMP_EXT_ECHO_CTYPE_ADDR	3
> +#define ICMP_AFI_IP			1	/* Address Family Identifier for ipv4 */
> +#define ICMP_AFI_IP6			2	/* Address Family Identifier for ipv6 */

You can't just remove the old constants. They have to stay there.
The #defines are part of the Linux API by now.

  reply	other threads:[~2021-04-27  3:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  3:40 [PATCH net-next] icmp: standardize naming of RFC 8335 PROBE constants Andreas Roeseler
2021-04-27  3:54 ` Stephen Hemminger [this message]
2021-04-27  4:03   ` Andreas Roeseler
2021-04-27 12:28     ` Andrew Lunn

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=20210426205434.248bed86@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andreas.a.roeseler@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /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).