Repository navigation
Commit f2edaa4
committed
net: virtio: use eth_hw_addr_set()
Commit 406f42f ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it go through appropriate helpers.
Even though the current code uses dev->addr_len the we can switch
to eth_hw_addr_set() instead of dev_addr_set(). The netdev is
always allocated by alloc_etherdev_mq() and there are at least two
places which assume Ethernet address:
- the line below calling eth_hw_addr_random()
- virtnet_set_mac_address() -> eth_commit_mac_addr_change()
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20211027152012.3393077-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent ee775b5 commit f2edaa4
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3177 | 3177 | | |
3178 | 3178 | | |
3179 | 3179 | | |
3180 | | - | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
3181 | 3183 | | |
3182 | 3184 | | |
3183 | | - | |
3184 | | - | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
3185 | 3188 | | |
| 3189 | + | |
3186 | 3190 | | |
3187 | 3191 | | |
3188 | 3192 | | |
| |||
0 commit comments