Creating a link via `apply_port_settings` behaves differently than `link_create -> link_enabled_set`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- networking
Línea de trabajo
Compare dpd/src/port_settings.rs at the settings-apply paths around insert_link() and add_asic_layer_port() with dpd::Switch::create_link(). Trace whether port_kr_set(), port_autoneg_set(), and mac_set() are intentionally omitted, then verify the expected behavior against the autonegotiation concern in omicron issue 3061. Done means the two creation paths have consistent, confirmed parameter behavior without breaking required uplinks.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Originally reported by @jgallagher as https://github.com/oxidecomputer/dendrite-archived/issues/588
On madrid, if I attempt to create a link via swadm, which internally calls link_create and link_enabled_set for each of these two commands:
root@oxz_switch:~# swadm link create qsfp0 --fec none --speed 40G
Created link qsfp0/0
root@oxz_switch:~# swadm link set-prop qsfp0/0 ena true
the link does not come up. If I pass --autoneg when creating the link:
root@oxz_switch:~# swadm link create qsfp0 --fec none --speed 40G --autoneg
Created link qsfp0/0
root@oxz_switch:~# swadm link set-prop qsfp0/0 ena true
the link does come up.
However, if I use the apply_port_settings API endpoint (which is not exposed via swadm, so we use curl):
root@oxz_switch:~# cat /tmp/manual.json
{
"tag": "manual",
"links": {
"0": {
"params": {
"speed": "Speed40G",
"fec": "None",
"autoneg": false,
"kr": false
},
"addrs": []
}
},
"v4_routes": {},
"v6_routes": {}
}
root@oxz_switch:~# curl -H "Content-Type: application/json" -X POST http://[::1]:12224/port/qsfp0/settings -d @/tmp/manual.json
the link comes up regardless of whether "autoneg" in the JSON body is true or false.
Pasting some comments from @bnaecker when we were looking at this:
Reading the port-settings-apply stuff, it's certainly taking a different code path than when you do swadm link create. When you add a new link through the settings code path, that seems to go to dpd/src/port_settings.rs:571, which calls SwitchPorts::insert_link() with the new link. That's really an internal method to add the data to the set of ports. When you call swadm link create, that starts at dpd::Switch::create_link(). That does a whole bunch of stuff first, mostly telling the SDE about the new link. It looks like the settings apply code does a similar thing through the add_asic_layer_port() method at dpd/src/port_settings.rs:853. I see that doing most things, but notably seems to be leaving out calls to port_kr_set(), port_autoneg_set(), and I think also mac_set(). I'm not sure what happens if you never tell the SDE what those parameters should be.
Our hypothesis is that (perhaps?) the SDE is defaulting autoneg to true, and the fact that we omit a call to port_autoneg_set() in the apply_port_settings code path is a happy accident that causes this particular link (which requires autoneg to come up) to work.
A cautionary note: if we "fix" this before fixing https://github.com/oxidecomputer/omicron/issues/3061, it's possible we'll break any uplinks that actually do require autonegotiation (since the control plane is currently always passing autoneg=false).
- Lenguaje dominante
- Rust
- Estrellas
- 21
- Forks
- 3
- Merge medio
- 8 h 29 min
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de oxidecomputer/dendrite
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oxidecomputer/dendrite#380 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
oxidecomputer/dendrite#375 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
oxidecomputer/dendrite#369 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
oxidecomputer/dendrite#368 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
oxidecomputer/dendrite#359 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de oxidecomputer/dendrite
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
area: cli bug priority: P2 ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día