Skip to content

Commit 53b0857

Browse files
committed
hsr: ratelimit only when errors are printed
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2177256 commit 1b0120e Author: Matthieu Baerts <matthieu.baerts@tessares.net> Date: Wed Mar 15 21:25:17 2023 +0100 hsr: ratelimit only when errors are printed Recently, when automatically merging -net and net-next in MPTCP devel tree, our CI reported [1] a conflict in hsr, the same as the one reported by Stephen in netdev [2]. When looking at the conflict, I noticed it is in fact the v1 [3] that has been applied in -net and the v2 [4] in net-next. Maybe the v1 was applied by accident. As mentioned by Jakub Kicinski [5], the new condition makes more sense before the net_ratelimit(), not to update net_ratelimit's state which is unnecessary if we're not going to print either way. Here, this modification applies the v2 but in -net. Link: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/4423171069 [1] Link: https://lore.kernel.org/netdev/20230315100914.53fc1760@canb.auug.org.au/ [2] Link: https://lore.kernel.org/netdev/20230307133229.127442-1-koverskeid@gmail.com/ [3] Link: https://lore.kernel.org/netdev/20230309092302.179586-1-koverskeid@gmail.com/ [4] Link: https://lore.kernel.org/netdev/20230308232001.2fb62013@kernel.org/ [5] Fixes: 28e8cab ("net: hsr: Don't log netdev_err message on unknown prp dst node") Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Link: https://lore.kernel.org/r/20230315-net-20230315-hsr_framereg-ratelimit-v1-1-61d2ef176d11@tessares.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Felix Maurer <fmaurer@redhat.com>
1 parent 851214c commit 53b0857

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/hsr/hsr_framereg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
415415
node_dst = find_node_by_addr_A(&port->hsr->node_db,
416416
eth_hdr(skb)->h_dest);
417417
if (!node_dst) {
418-
if (net_ratelimit() && port->hsr->prot_version != PRP_V1)
418+
if (port->hsr->prot_version != PRP_V1 && net_ratelimit())
419419
netdev_err(skb->dev, "%s: Unknown node\n", __func__);
420420
return;
421421
}

0 commit comments

Comments
 (0)