dpvs icon indicating copy to clipboard operation
dpvs copied to clipboard

fail to set mac when setting bonding interface

Open haosdent opened this issue 6 years ago • 7 comments

Encounter following error when setting binding interface

Kni: kni_add_dev: fail to set mac 00:00:00:00:00:00 for bond1.kni: Cannot assign requested address

is it ignorable?

haosdent avatar Jul 10 '18 13:07 haosdent

kni devices' MAC are derived from real device, for your example it is bond1. pls make sure when kni_add_dev is invoked, the MAC of bond1 is exist, not all-zero. You may need check the function netif_port_init or kni_add_dev.

beacer avatar Jul 11 '18 02:07 beacer

the MAC of bond1 is exist

I am able to see bond1 via

# dpip link show
1: dpdk2: socket 0 mtu 1500 rx-queue 8 tx-queue 8
    UP 10000 Mbps full-duplex auto-nego
    addr B4:96:91:15:C5:74 OF_RX_IP_CSUM OF_TX_IP_CSUM OF_TX_TCP_CSUM OF_TX_UDP_CSUM
2: dpdk3: socket 0 mtu 1500 rx-queue 8 tx-queue 8
    UP 10000 Mbps full-duplex auto-nego
    addr B4:96:91:15:C5:76 OF_RX_IP_CSUM OF_TX_IP_CSUM OF_TX_TCP_CSUM OF_TX_UDP_CSUM
3: bond1: socket 0 mtu 1500 rx-queue 8 tx-queue 8
    UP 20000 Mbps full-duplex auto-nego
    addr B4:96:91:15:C5:74

this looks correct?

haosdent avatar Jul 11 '18 02:07 haosdent

Is it already exist when system bootup, when netif_init->netif_port_init->kni_add_dev ? the error log shows 00:00:00:00:00:00 is set.

beacer avatar Jul 11 '18 02:07 beacer

Is it already exist when system bootup

If I didn't launch dpvs, could not see bond1 via dpip link show or ip link show. After I start dpvs, I able to see bond1 and bond1.kni.

haosdent avatar Jul 11 '18 02:07 haosdent

In kni_add_dev, when dev->addr would be assigned a mac addr?

    err = linux_set_if_mac(conf.name, (unsigned char *)&dev->addr);

I add log to print it before

    err = linux_set_if_mac(conf.name, (unsigned char *)&dev->addr);

looks like dev->addr is 00:00:00

haosdent avatar Jul 11 '18 02:07 haosdent

it means bond1's mac is 00:00:00 when netif_port_init, need found out why.

beacer avatar Jul 11 '18 02:07 beacer

yep, thanks @beacer . let me add more debug logs in my side and check the reason

haosdent avatar Jul 11 '18 02:07 haosdent