All of lore.kernel.org
 help / color / mirror / Atom feed
* The virtio device mac is empty in vhostuser type.
@ 2017-11-09  3:24 ? ?
  2017-11-10  5:44 ` Tan, Jianfeng
  0 siblings, 1 reply; 2+ messages in thread
From: ? ? @ 2017-11-09  3:24 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, huawei.xie

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.

Therefore I would like to ask when I launch the dpdk vhost-user program, how could I get the virtio NIC MAC address?

Thanks
________________________________
Best Regards,
Hering
heringlinux@outlook.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: The virtio device mac is empty in vhostuser type.
  2017-11-09  3:24 The virtio device mac is empty in vhostuser type ? ?
@ 2017-11-10  5:44 ` Tan, Jianfeng
  0 siblings, 0 replies; 2+ messages in thread
From: Tan, Jianfeng @ 2017-11-10  5:44 UTC (permalink / raw)
  To: ? ?, dev; +Cc: yuanhan.liu, Xie, Huawei

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@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
> heringlinux@outlook.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-10  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09  3:24 The virtio device mac is empty in vhostuser type ? ?
2017-11-10  5:44 ` Tan, Jianfeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.