]> git.droids-corp.org - dpdk.git/commit
kni: use dedicated function to set random MAC address
authorKe Zhang <ke1x.zhang@intel.com>
Wed, 8 Jun 2022 12:11:16 +0000 (15:11 +0300)
committerAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Wed, 8 Jun 2022 17:16:26 +0000 (19:16 +0200)
commit2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832
treec4686da08ae6d84b304cf42c9fcdfd1a94d1f637
parentbc70e55948380ce57cbc079930f217c73ea59b39
kni: use dedicated function to set random MAC address

eth_hw_addr_random() sets address type correctly.

eth_hw_addr_random() is available since Linux v3.4, so
no compat is required.

Also fix the warning:
warning: passing argument 1 of ‘memcpy’ discards ‘const’
qualifier from pointer target type

Variable dev_addr is done const intentionally in Linux v5.17 to
prevent using it directly.

Fixes: ea6b39b5b847 ("kni: remove ethtool support")
Cc: stable@dpdk.org
Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
kernel/linux/kni/kni_misc.c