Skip to content

knet_manager: do not try to set state for non-existing links#478

Merged
rubensfig merged 1 commit intomainfrom
jogo_knet_avoid_error_knet
Feb 3, 2026
Merged

knet_manager: do not try to set state for non-existing links#478
rubensfig merged 1 commit intomainfrom
jogo_knet_avoid_error_knet

Conversation

@KanjiMonster
Copy link
Copy Markdown
Contributor

Since OF-DPA brings all links up at boot, there is a chance that the is a link state change before we received the port table and created the ports.

If this happens, then we get a change modification for speed/link, but there is no link to modify. This is harmless since we will set the link to down once we do create the port interface, but triggers a warning from knet on startup:

kernel: linux-bcm-knet (1197): Warning: unknown network interface: 'port1'
kernel: linux-bcm-knet (1197): Warning: unknown network interface: 'port2'
...
kernel: linux-bcm-knet (1197): Warning: unknown network interface: 'port54'

So check if the link is created before trying to update its state.

Fixes: 40f68c8 ("add knet manager for using knet based interfaces")

@KanjiMonster KanjiMonster requested a review from jklare July 25, 2025 11:33
@jklare jklare removed their request for review July 31, 2025 09:44
Since OF-DPA brings all links up at boot, there is a chance that the is
a link state change before we received the port table and created the
ports.

If this happens, then we get a change modification for speed/link, but
there is no link to modify. This is harmless since we will set the link
to down once we do create the port interface, but triggers a warning
from knet on startup:

kernel: linux-bcm-knet (1197): Warning: unknown network interface: 'port1'
kernel: linux-bcm-knet (1197): Warning: unknown network interface: 'port2'
...
kernel: linux-bcm-knet (1197): Warning: unknown network interface: 'port54'

So check if the link is created before trying to update its state.

Fixes: 40f68c8 ("add knet manager for using knet based interfaces")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
@KanjiMonster KanjiMonster force-pushed the jogo_knet_avoid_error_knet branch from 1ab3983 to cefce26 Compare August 14, 2025 07:12
Copy link
Copy Markdown
Contributor

@rubensfig rubensfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build and tested

@rubensfig rubensfig merged commit 816b035 into main Feb 3, 2026
4 checks passed
@rubensfig rubensfig deleted the jogo_knet_avoid_error_knet branch February 3, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants