Re: [PATCH net-next 1/4] netconsole: add an address family to struct inet_addr

Breno Leitao <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.network
Message-ID <[email protected]>
On Wed, Aug 05, 2026 at 10:33:01PM +0100, Gustavo Luiz Duarte wrote:
> @@ -731,7 +733,7 @@ static void netconsole_print_banner(struct netconsole_target *nt)
>  /* Parse the string and populate the `inet_addr` union. Return 0 if IPv4 is
						    ^-> there is no more union.

I think there are other references for union that needs to be updated as
well.

> +static int netpoll_parse_ip_addr(const char *str, struct inet_addr *addr)
...
>  	return -1;

Should the failure path set addr->family = AF_UNSPEC?

> +++ b/include/linux/netpoll.h
> +struct inet_addr {
> +	/* Address family: AF_UNSPEC when unset, else AF_INET or AF_INET6 */
> +	u8			family;
> +	union {
> +		__be32		ip;
> +		struct in6_addr	in6;
> +	};
>  };

Since a1116396476f6 ("netconsole: move local_ip/remote_ip/ipv6 to
netconsole_target") struct netpoll has no address member, and netconsole
is the only user left in the tree:

    drivers/net/netconsole.c:   union inet_addr         local_ip, remote_ip;
    drivers/net/netconsole.c:static int netpoll_parse_ip_addr(const char *str, union inet_addr *addr)

Since you touched it, can you move it to netconsole headers, please?

--breno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.