net: hsr: Don't log netdev_err message on unknown prp dst node
Subsystems (3)
PATCH 1/1 net: hsr: Don't log netdev_err message on unknown prp dst node
If no frames has been exchanged with a node for HSR_NODE_FORGET_TIME, the node will be deleted from the node_db list. If a frame is sent to the node after it is deleted, a netdev_err message for each slave interface is produced. This should not happen with dan nodes because of supervision frames, but can happen often with san nodes, which clutters the kernel log. Since the hsr protocol does not support sans, this is only relevant for the prp protocol.
--- net/hsr/hsr_framereg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/hsr/hsr_framereg.c +1 -1
@@ -415,7 +415,7 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb, node_dst =find_node_by_addr_A (&port->hsr->node_db,eth_hdr (skb)->h_dest);if (!node_dst) { -if (net_ratelimit ()) +if (net_ratelimit () && port->hsr->prot_version !=PRP_V1 )netdev_err (skb->dev,"%s: Unknown node\n" , __func__);return ; }
Signature · 1 line
2.34.1
Jakub Kicinski
maintainernet/hsr/hsr_framereg.c void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb, · line 418
Quoted 3 lines · On Tue, 7 Mar 2023 14:32:29 +0100 Kristian Overskeid wrote:
net/hsr/hsr_framereg.c +1
-1if (!node_dst) { -if (net_ratelimit ()) +if (net_ratelimit () && port->hsr->prot_version !=PRP_V1 )
nit: wouldn't the condition make more sense before the net_ratelimit() ? net_ratelimit() will update its state which is unnecessary if we're not going to print either way.
When you repost - could you cast a wider net with the CC list? Add the author of the code? (The print itself, not Taehee) Maybe some folks who touched this file most recently?
Quoted 1 line
netdev_err(skb->dev, "%s: Unknown node\n", __func__);