From: netdev-bot+sashiko@kernel.org
To: bigeasy@linutronix.de
Cc: netdev@vger.kernel.org, j-rameshbabu@ti.com,
andrew+netdev@lunn.ch, c-vankar@ti.com, danishanwar@ti.com,
d-qiu@ti.com, davem@davemloft.net, edumazet@google.com,
fmaurer@redhat.com, kuba@kernel.org, neelima@ti.com,
pabeni@redhat.com, praneeth@ti.com, pratheesh@ti.com,
richardcochran@gmail.com, horms@kernel.org, vigneshr@ti.com,
willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH net-next v6 1/8] hsr: Add header_ops::parse_protocol
Date: Sun, 27 Sep 2026 13:24:20 +0000 [thread overview]
Message-ID: <179051546004.2160803.13486346081627163430@kernel.org> (raw)
In-Reply-To: <20260923-hsr_ptp-v6-1-6ea07b3fb8a8@linutronix.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 patch has no Fixes: tag.
--
hsr: Add header_ops::parse_protocol
This patch adds eth_header_parse_protocol() as the parse_protocol callback
in hsr_header_ops. With it, af_packet's dev_parse_header_protocol() sets
skb->protocol correctly on hsr devices. Before this change the callback was
missing and the field was set to 0.
> diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
> index fc512204600cd..59df647d2fd45 100644
> --- a/net/hsr/hsr_device.c
> +++ b/net/hsr/hsr_device.c
> @@ -247,6 +247,7 @@ static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
> static const struct header_ops hsr_header_ops = {
> .create = eth_header,
> .parse = eth_header_parse,
> + .parse_protocol = eth_header_parse_protocol,
> };
[Severity: Low]
This isn't a bug, but should this patch carry a Fixes: tag?
hsr_dev_setup() calls ether_setup(), which installs eth_header_ops. It then
replaces them:
net/hsr/hsr_device.c:hsr_dev_setup() {
...
dev->header_ops = &hsr_header_ops;
...
}
The eth_header_ops parse_protocol callback is lost at this point. So for
SOCK_RAW sends with protocol 0 or ETH_P_ALL on an hsr device,
packet_parse_headers() has been leaving skb->protocol at 0 on the master:
net/packet/af_packet.c:packet_parse_headers() {
...
skb->protocol = dev_parse_header_protocol(skb);
...
}
The frames that reach the slave ports still look correct. In hsr_forward.c,
fill_frame_info() reads ethhdr->h_proto directly. hsr_fill_tag(),
prp_fill_rct() and create_stripped_skb_hsr() also re-derive skb->protocol
from the header, for example:
net/hsr/hsr_forward.c:hsr_fill_tag() {
...
skb->protocol = hsr_ethhdr->ethhdr.h_proto;
...
}
The remaining effects look limited to things like protocol-based tc or tap
matching on hsr0 egress. The patch also reads as preparation for the PTP
series rather than a fix. If it isn't meant for stable, leaving out the
Fixes: tag seems fine. Was that the intent?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260923-hsr_ptp-v6-0-6ea07b3fb8a8%40linutronix.de
next prev parent reply other threads:[~2026-09-27 13:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 12:14 [PATCH net-next v6 0/8] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
2026-09-23 12:14 ` [PATCH net-next v6 1/8] hsr: Add header_ops::parse_protocol Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko [this message]
2026-09-23 12:14 ` [PATCH net-next v6 2/8] hsr: Use skb_clone() while adding the HSR header Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 3/8] hsr: Add a magic header for sending PTP packets Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 4/8] hsr: Drop received " Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 5/8] hsr: Use the port and header information in hsr_forward_skb() Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 6/8] hsr: Assign a socket for cloned skbs Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 7/8] hsr: Move struct hsr_ethhdr to a global header Sebastian Andrzej Siewior
2026-09-23 12:14 ` [PATCH net-next v6 8/8] selftests: hsr: Add test for the inline PTP header on HSR Sebastian Andrzej Siewior
2026-09-24 2:08 ` Hangbin Liu
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-25 10:07 ` [PATCH net-next v6 0/8] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
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=179051546004.2160803.13486346081627163430@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=c-vankar@ti.com \
--cc=d-qiu@ti.com \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fmaurer@redhat.com \
--cc=horms@kernel.org \
--cc=j-rameshbabu@ti.com \
--cc=kuba@kernel.org \
--cc=neelima@ti.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=praneeth@ti.com \
--cc=pratheesh@ti.com \
--cc=richardcochran@gmail.com \
--cc=vigneshr@ti.com \
--cc=willemdebruijn.kernel@gmail.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