This is a cosmetic incremental fixup to commits 7787ff776398 ("net: dsa: merge all bools of struct dsa_switch into a single u32") bde82f389af1 ("net: dsa: merge all bools of struct dsa_port into a single u8") The desire to make this change was enunciated after posting these patches here: https://patchwork.kernel.org/project/netdevbpf/cover/20220105132141.2648876-1-vladimir.oltean@nxp.com/ but due to a slight timing overlap (message posted at 2:28 p.m. UTC, merge commit is at 2:46 p.m. UTC), that comment was missed and the changes were applied as-is.
Unified · Split
| @@ -265,14 +265,16 @@ struct dsa_port { · 264 unmodified lines | ||
| 265 | 265 | |
| 266 | 266 | u8 stp_state; |
| 267 | 267 | |
| 268 | − u8 vlan_filtering:1, | |
| 269 | − /* Managed by DSA on user ports and by | |
| 270 | − * drivers on CPU and DSA ports | |
| 271 | − */ | |
| 272 | − learning:1, | |
| 273 | − lag_tx_enabled:1, | |
| 274 | − devlink_port_setup:1, | |
| 275 | − setup:1; | |
| 268 | + u8 vlan_filtering:1; | |
| 269 | + | |
| 270 | + /* Managed by DSA on user ports and by drivers on CPU and DSA ports */ | |
| 271 | + u8 learning:1; | |
| 272 | + | |
| 273 | + u8 lag_tx_enabled:1; | |
| 274 | + | |
| 275 | + u8 devlink_port_setup:1; | |
| 276 | + | |
| 277 | + u8 setup:1; | |
| 276 | 278 | |
| 277 | 279 | struct device_node *dn; |
| 278 | 280 | unsigned int ageing_time; |
| @@ -331,56 +333,52 @@ struct dsa_switch { · 52 unmodified lines | ||
| 331 | 333 | struct dsa_switch_tree *dst; |
| 332 | 334 | unsigned int index; |
| 333 | 335 | |
| 334 | − u32 setup:1, | |
| 335 | − /* Disallow bridge core from requesting | |
| 336 | − * different VLAN awareness settings on ports | |
| 337 | − * if not hardware-supported | |
| 338 | − */ | |
| 339 | − vlan_filtering_is_global:1, | |
| 340 | − /* Keep VLAN filtering enabled on ports not | |
| 341 | − * offloading any upper | |
| 342 | − */ | |
| 343 | − needs_standalone_vlan_filtering:1, | |
| 344 | − /* Pass .port_vlan_add and .port_vlan_del to | |
| 345 | − * drivers even for bridges that have | |
| 346 | − * vlan_filtering=0. All drivers should ideally | |
| 347 | − * set this (and then the option would get | |
| 348 | − * removed), but it is unknown whether this | |
| 349 | − * would break things or not. | |
| 350 | − */ | |
| 351 | − configure_vlan_while_not_filtering:1, | |
| 352 | − /* If the switch driver always programs the CPU | |
| 353 | − * port as egress tagged despite the VLAN | |
| 354 | − * configuration indicating otherwise, then | |
| 355 | − * setting @untag_bridge_pvid will force the | |
| 356 | − * DSA receive path to pop the bridge's | |
| 357 | − * default_pvid VLAN tagged frames to offer a | |
| 358 | − * consistent behavior between a | |
| 359 | − * vlan_filtering=0 and vlan_filtering=1 bridge | |
| 360 | − * device. | |
| 361 | − */ | |
| 362 | − untag_bridge_pvid:1, | |
| 363 | − /* Let DSA manage the FDB entries towards the | |
| 364 | − * CPU, based on the software bridge database. | |
| 365 | − */ | |
| 366 | − assisted_learning_on_cpu_port:1, | |
| 367 | − /* In case vlan_filtering_is_global is set, the | |
| 368 | − * VLAN awareness state should be retrieved | |
| 369 | − * from here and not from the per-port | |
| 370 | − * settings. | |
| 371 | − */ | |
| 372 | − vlan_filtering:1, | |
| 373 | − /* MAC PCS does not provide link state change | |
| 374 | − * interrupt, and requires polling. Flag passed | |
| 375 | − * on to PHYLINK. | |
| 376 | − */ | |
| 377 | − pcs_poll:1, | |
| 378 | − /* For switches that only have the MRU | |
| 379 | − * configurable. To ensure the configured MTU | |
| 380 | − * is not exceeded, normalization of MRU on all | |
| 381 | − * bridged interfaces is needed. | |
| 382 | − */ | |
| 383 | − mtu_enforcement_ingress:1; | |
| 336 | + u32 setup:1; | |
| 337 | + | |
| 338 | + /* Disallow bridge core from requesting different VLAN awareness | |
| 339 | + * settings on ports if not hardware-supported | |
| 340 | + */ | |
| 341 | + u32 vlan_filtering_is_global:1; | |
| 342 | + | |
| 343 | + /* Keep VLAN filtering enabled on ports not offloading any upper */ | |
| 344 | + u32 needs_standalone_vlan_filtering:1; | |
| 345 | + | |
| 346 | + /* Pass .port_vlan_add and .port_vlan_del to drivers even for bridges | |
| 347 | + * that have vlan_filtering=0. All drivers should ideally set this (and | |
| 348 | + * then the option would get removed), but it is unknown whether this | |
| 349 | + * would break things or not. | |
| 350 | + */ | |
| 351 | + u32 configure_vlan_while_not_filtering:1; | |
| 352 | + | |
| 353 | + /* If the switch driver always programs the CPU port as egress tagged | |
| 354 | + * despite the VLAN configuration indicating otherwise, then setting | |
| 355 | + * @untag_bridge_pvid will force the DSA receive path to pop the | |
| 356 | + * bridge's default_pvid VLAN tagged frames to offer a consistent | |
| 357 | + * behavior between a vlan_filtering=0 and vlan_filtering=1 bridge | |
| 358 | + * device. | |
| 359 | + */ | |
| 360 | + u32 untag_bridge_pvid:1; | |
| 361 | + | |
| 362 | + /* Let DSA manage the FDB entries towards the | |
| 363 | + * CPU, based on the software bridge database. | |
| 364 | + */ | |
| 365 | + u32 assisted_learning_on_cpu_port:1; | |
| 366 | + | |
| 367 | + /* In case vlan_filtering_is_global is set, the VLAN awareness state | |
| 368 | + * should be retrieved from here and not from the per-port settings. | |
| 369 | + */ | |
| 370 | + u32 vlan_filtering:1; | |
| 371 | + | |
| 372 | + /* MAC PCS does not provide link state change interrupt, and requires | |
| 373 | + * polling. Flag passed on to PHYLINK. | |
| 374 | + */ | |
| 375 | + u32 pcs_poll:1; | |
| 376 | + | |
| 377 | + /* For switches that only have the MRU configurable. To ensure the | |
| 378 | + * configured MTU is not exceeded, normalization of MRU on all bridged | |
| 379 | + * interfaces is needed. | |
| 380 | + */ | |
| 381 | + u32 mtu_enforcement_ingress:1; | |
| 384 | 382 | |
| 385 | 383 | /* Listener for switch fabric events */ |
| 386 | 384 | struct notifier_block nb; |