mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: fmancera@suse.de
Cc: netdev@vger.kernel.org, horms@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, edumazet@kernel.org, davem@davemloft.net,
	johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/16 net-next v3] ipv4: raw: split IPv4 specific logic into raw_ipv4.c
Date: Sun, 04 Oct 2026 17:22:30 +0000	[thread overview]
Message-ID: <179113455008.434549.12574408611696347699@kernel.org> (raw)
In-Reply-To: <20260930135334.4739-6-fmancera@suse.de>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The IPv4-only `struct raw_frag_vec` is left behind in
  net/ipv4/raw.c (line 72) and a second, identical copy is added in…
- [Low] The new file net/ipv4/raw_ipv4.c uses
  `EXPORT_SYMBOL_GPL(raw_v4_match);` at line 61 but does not include…

--

ipv4: raw: split IPv4 specific logic into raw_ipv4.c

This commit moves the IPv4-specific RAW socket code (packet matching,
input/output processing, ICMP filtering and the AF_INET raw_prot) from
net/ipv4/raw.c into a new net/ipv4/raw_ipv4.c. The new file is built only
when CONFIG_IPV4 is enabled. raw_diag.c now wraps raw_v4_match() in an
IS_ENABLED(CONFIG_IPV4) check.

> diff --git a/net/ipv4/raw_ipv4.c b/net/ipv4/raw_ipv4.c
> new file mode 100644
> index 0000000000000..0419026683b08
> --- /dev/null
> +++ b/net/ipv4/raw_ipv4.c
> @@ -0,0 +1,884 @@

[ ... ]

> +#include <asm/ioctls.h>
> +#include <linux/igmp.h>
> +#include <linux/mroute.h>
> +#include <linux/netfilter.h>
> +#include <linux/sockios.h>
> +#include <linux/stddef.h>
> +#include <linux/types.h>
> +#include <linux/compat.h>
> +#include <net/icmp.h>
> +#include <net/ip.h>
> +#include <net/raw.h>
> +#include <net/sock.h>
> +#include <net/udp.h>
> +#include <net/xfrm.h>
> +
> +struct raw_frag_vec {
> +	struct msghdr *msg;
> +	union {
> +		struct icmphdr icmph;
> +		char c[1];
> +	} hdr;
> +	int hlen;
> +};

[Severity: Low]
This isn't a bug, but should the original copy of struct raw_frag_vec be
removed from net/ipv4/raw.c? After this patch, raw.c still contains:

net/ipv4/raw.c:
struct raw_frag_vec {
	struct msghdr *msg;
	union {
		struct icmphdr icmph;
		char c[1];
	} hdr;
	int hlen;
};

All of its users (raw_probe_proto_opt(), raw_getfrag() and raw_sendmsg())
are now in raw_ipv4.c, so nothing in raw.c uses it.

Can the raw.c copy be dropped as part of the move? That would leave a single
definition of this IPv4-only structure.

> +
> +bool raw_v4_match(struct net *net, const struct sock *sk, unsigned short num,
> +		  __be32 raddr, __be32 laddr, int dif, int sdif)
> +{

[ ... ]

> +	return raw_sk_bound_dev_eq(net, READ_ONCE(sk->sk_bound_dev_if),
> +				   dif, sdif);
> +}
> +EXPORT_SYMBOL_GPL(raw_v4_match);

[Severity: Low]
Should raw_ipv4.c include <linux/export.h>? It uses
EXPORT_SYMBOL_GPL(raw_v4_match), but <linux/export.h> is not in its
include list. raw.c includes that header directly for
EXPORT_SYMBOL_GPL(raw_v4_hashinfo).

With W=2, check_missing_include_linux_export_h() in scripts/misc-check
would warn:

  net/ipv4/raw_ipv4.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing

The file still compiles, because the header is pulled in indirectly.

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260930135334.4739-1-fmancera%40suse.de

  reply	other threads:[~2026-10-04 17:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260930135334.4739-1-fmancera@suse.de>
2026-09-30 13:52 ` [PATCH 01/16 net-next v3] ipv4: introduce CONFIG_IPV4 to decouple the IPv4 stack Fernando Fernandez Mancera
2026-09-30 13:52 ` [PATCH 02/16 net-next v3] net: core: add IPv4 fallback stubs and guards for CONFIG_IPV4=n Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 03/16 net-next v3] net: inet: relocate ip_generic_getfrag and guard IPv4 socket logic Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 04/16 net-next v3] tcp: move protocol agnostic TCP functions out of tcp_ipv4.c Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 05/16 net-next v3] ipv4: raw: split IPv4 specific logic into raw_ipv4.c Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko [this message]
2026-09-30 13:52 ` [PATCH 06/16 net-next v3] ipv4: udp: split IPv4 specific logic into udp_ipv4.c Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 07/16 net-next v3] ipv4: icmp: split IPv4 specific logic into icmp_ipv4.c Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 08/16 net-next v3] ipv4: ping: split IPv4 specific logic into ping_ipv4.c Fernando Fernandez Mancera
2026-09-30 13:52 ` [PATCH 09/16 net-next v3] ipv4: fib: split common nexthop logic to fib_core.c Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 10/16 net-next v3] tunnels: guard IPv4 tunnel functions with CONFIG_IPV4 Fernando Fernandez Mancera
2026-09-30 13:52 ` [PATCH 11/16 net-next v3] ipv4: disable IPv4-only sysctls when CONFIG_IPV4=n Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 12/16 net-next v3] netfilter: ipv4: guard ip_route_me_harder() with CONFIG_IPV4 Fernando Fernandez Mancera
2026-09-30 13:52 ` [PATCH 13/16 net-next v3] net: bridge: guard ARP/RARP proxy and suppression " Fernando Fernandez Mancera
2026-09-30 13:52 ` [PATCH 14/16 net-next v3] wifi: mac80211: replace CONFIG_INET with CONFIG_IPV4 guards Fernando Fernandez Mancera
2026-09-30 13:52 ` [PATCH 15/16 net-next v3] netlabel: cipso: introduce CONFIG_CIPSO to decouple IPv4 dependency Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko
2026-09-30 13:52 ` [PATCH 16/16 net-next v3] ipv4: make CONFIG_IPV4 boolean Fernando Fernandez Mancera
2026-10-04 17:22   ` netdev-bot+sashiko

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=179113455008.434549.12574408611696347699@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=fmancera@suse.de \
    --cc=horms@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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

all inboxes | Powered by JetHome®