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
parent reply other threads:[~2026-10-04 17:22 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260930135334.4739-6-fmancera@suse.de>]
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