Hi, > -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of ? ? > Sent: Thursday, November 9, 2017 11:24 AM > To: dev > Cc: yuanhan.liu; Xie, Huawei > Subject: [dpdk-dev] The virtio device mac is empty in vhostuser type. > > Hi, > > When I attached a virtio device to ovs bridge in vhostuser type, the virtual > port does not have the mac address. > After checked the dpdk code, I found the 'mac' which is the member of > struct 'virtio_net' is empty. > It only been assigned in case VHOST_USER_SEND_RARP of function > 'vhost_user_msg_handler'. > But the comments said VHOST_USER_SEND_RARP would be handled during > VM migration.
We can treat virtio and vhost as a back-to-back connected cable: virtio and vhost (pmd) have their own mac. > > Therefore I would like to ask when I launch the dpdk vhost-user program, > how could I get the virtio NIC MAC address? Usually, we do ARP learn on this vhost port to get the mac address of virtio. Thanks, Jianfeng > > Thanks > ________________________________ > Best Regards, > Hering > heringli...@outlook.com