devlink port function hw_addr attr documentation is in mlx5 specific file while there is nothing mlx5 specific about it. Move it to devlink-port.rst.
Unified · Split
| @@ -351,42 +351,8 @@ driver. · 350 unmodified lines | ||
| 351 | 351 | |
| 352 | 352 | MAC address setup |
| 353 | 353 | ----------------- |
| 354 | −mlx5 driver provides mechanism to setup the MAC address of the PCI VF/SF. | |
| 355 | − | |
| 356 | −The configured MAC address of the PCI VF/SF will be used by netdevice and rdma | |
| 357 | −device created for the PCI VF/SF. | |
| 358 | − | |
| 359 | −- Get the MAC address of the VF identified by its unique devlink port index:: | |
| 360 | − | |
| 361 | − $ devlink port show pci/0000:06:00.0/2 | |
| 362 | − pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 | |
| 363 | − function: | |
| 364 | − hw_addr 00:00:00:00:00:00 | |
| 365 | − | |
| 366 | −- Set the MAC address of the VF identified by its unique devlink port index:: | |
| 367 | − | |
| 368 | − $ devlink port function set pci/0000:06:00.0/2 hw_addr 00:11:22:33:44:55 | |
| 369 | − | |
| 370 | − $ devlink port show pci/0000:06:00.0/2 | |
| 371 | − pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 | |
| 372 | − function: | |
| 373 | − hw_addr 00:11:22:33:44:55 | |
| 374 | − | |
| 375 | −- Get the MAC address of the SF identified by its unique devlink port index:: | |
| 376 | − | |
| 377 | − $ devlink port show pci/0000:06:00.0/32768 | |
| 378 | − pci/0000:06:00.0/32768: type eth netdev enp6s0pf0sf88 flavour pcisf pfnum 0 sfnum 88 | |
| 379 | − function: | |
| 380 | − hw_addr 00:00:00:00:00:00 | |
| 381 | − | |
| 382 | −- Set the MAC address of the SF identified by its unique devlink port index:: | |
| 383 | − | |
| 384 | − $ devlink port function set pci/0000:06:00.0/32768 hw_addr 00:00:00:00:88:88 | |
| 385 | − | |
| 386 | − $ devlink port show pci/0000:06:00.0/32768 | |
| 387 | − pci/0000:06:00.0/32768: type eth netdev enp6s0pf0sf88 flavour pcisf pfnum 0 sfnum 88 | |
| 388 | − function: | |
| 389 | − hw_addr 00:00:00:00:88:88 | |
| 354 | +mlx5 driver support devlink port function attr mechanism to setup MAC | |
| 355 | +address. (refer to Documentation/networking/devlink/devlink-port.rst) | |
| 390 | 356 | |
| 391 | 357 | SF state setup |
| 392 | 358 | -------------- |
| @@ -119,9 +119,49 @@ function device to the driver. For subfunctions, this means user should · 118 unmodified lines | ||
| 119 | 119 | configure port function attribute before activating the port function. |
| 120 | 120 | |
| 121 | 121 | A user may set the hardware address of the function using |
| 122 | −'devlink port function set hw_addr' command. For Ethernet port function | |
| 122 | +`devlink port function set hw_addr` command. For Ethernet port function | |
| 123 | 123 | this means a MAC address. |
| 124 | 124 | |
| 125 | +Function attributes | |
| 126 | +=================== | |
| 127 | + | |
| 128 | +MAC address setup | |
| 129 | +----------------- | |
| 130 | +The configured MAC address of the PCI VF/SF will be used by netdevice and rdma | |
| 131 | +device created for the PCI VF/SF. | |
| 132 | + | |
| 133 | +- Get the MAC address of the VF identified by its unique devlink port index:: | |
| 134 | + | |
| 135 | + $ devlink port show pci/0000:06:00.0/2 | |
| 136 | + pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 | |
| 137 | + function: | |
| 138 | + hw_addr 00:00:00:00:00:00 | |
| 139 | + | |
| 140 | +- Set the MAC address of the VF identified by its unique devlink port index:: | |
| 141 | + | |
| 142 | + $ devlink port function set pci/0000:06:00.0/2 hw_addr 00:11:22:33:44:55 | |
| 143 | + | |
| 144 | + $ devlink port show pci/0000:06:00.0/2 | |
| 145 | + pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 | |
| 146 | + function: | |
| 147 | + hw_addr 00:11:22:33:44:55 | |
| 148 | + | |
| 149 | +- Get the MAC address of the SF identified by its unique devlink port index:: | |
| 150 | + | |
| 151 | + $ devlink port show pci/0000:06:00.0/32768 | |
| 152 | + pci/0000:06:00.0/32768: type eth netdev enp6s0pf0sf88 flavour pcisf pfnum 0 sfnum 88 | |
| 153 | + function: | |
| 154 | + hw_addr 00:00:00:00:00:00 | |
| 155 | + | |
| 156 | +- Set the MAC address of the SF identified by its unique devlink port index:: | |
| 157 | + | |
| 158 | + $ devlink port function set pci/0000:06:00.0/32768 hw_addr 00:00:00:00:88:88 | |
| 159 | + | |
| 160 | + $ devlink port show pci/0000:06:00.0/32768 | |
| 161 | + pci/0000:06:00.0/32768: type eth netdev enp6s0pf0sf88 flavour pcisf pfnum 0 sfnum 88 | |
| 162 | + function: | |
| 163 | + hw_addr 00:00:00:00:88:88 | |
| 164 | + | |
| 125 | 165 | Subfunction |
| 126 | 166 | ============ |
| 127 | 167 | |