From: Jiri Pirko <jiri@resnulli.us>
To: Lukasz Majewski <lukma@denx.de>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Tristram.Ha@microchip.com,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH v2] net: hsr: Use correct offset for HSR TLV values in supervisory HSR frames
Date: Wed, 28 Feb 2024 13:31:52 +0100 [thread overview]
Message-ID: <Zd8nuLjDxLKPgX-W@nanopsycho> (raw)
In-Reply-To: <20240228085644.3618044-1-lukma@denx.de>
Wed, Feb 28, 2024 at 09:56:44AM CET, lukma@denx.de wrote:
>Current HSR implementation uses following supervisory frame (even for
>HSRv1 the HSR tag is not is not present):
>
>00000000: 01 15 4e 00 01 2d XX YY ZZ 94 77 10 88 fb 00 01
>00000010: 7e 1c 17 06 XX YY ZZ 94 77 10 1e 06 XX YY ZZ 94
>00000020: 77 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>00000030: 00 00 00 00 00 00 00 00 00 00 00 00
>
>The current code adds extra two bytes (i.e. sizeof(struct hsr_sup_tlv))
>when offset for skb_pull() is calculated.
>This is wrong, as both 'struct hsrv1_ethhdr_sp' and 'hsrv0_ethhdr_sp'
>already have 'struct hsr_sup_tag' defined in them, so there is no need
>for adding extra two bytes.
>
>This code was working correctly as with no RedBox support, the check for
>HSR_TLV_EOT (0x00) was off by two bytes, which were corresponding to
>zeroed padded bytes for minimal packet size.
>
>Fixes: eafaa88b3eb7 ("net: hsr: Add support for redbox supervision frames")
>
And yet the extra empty line is still here :/
>Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
next prev parent reply other threads:[~2024-02-28 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 8:56 [PATCH v2] net: hsr: Use correct offset for HSR TLV values in supervisory HSR frames Lukasz Majewski
2024-02-28 12:31 ` Jiri Pirko [this message]
2024-02-29 10:10 ` Paolo Abeni
2024-02-29 10:20 ` patchwork-bot+netdevbpf
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=Zd8nuLjDxLKPgX-W@nanopsycho \
--to=jiri@resnulli.us \
--cc=Tristram.Ha@microchip.com \
--cc=andrew@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=lukma@denx.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@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