Xilinx/open-nic-driver

eth_hw_addr_set

lglgdouble opened this issue · 1 comments

/data/open-nic/dpdk/open-nic-driver/onic_netdev.c: In function ‘onic_set_mac_address’:
/data/open-nic/dpdk/open-nic-driver/onic_netdev.c:755:2: error: implicit declaration of function ‘eth_hw_addr_set’; did you mean ‘eth_addr_dec’? [-Werror=implicit-function-declaration]
eth_hw_addr_set(dev, dev_addr);
^~~~~~~~~~~~~~~
eth_addr_dec

your $(uname -r) < 5.15
you can get around it by adding the following into onic_netdev.c

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
{
    memcpy(dev->dev_addr, addr, ETH_ALEN);
}
#endif