[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH RFCv3 23/32] plat/virtio: Fix virtio net device mac negotiation
Otherwise, it causes virtio net mac negotiates failure on arm64. Signed-off-by: Jia He <justin.he@xxxxxxx> --- plat/drivers/virtio/virtio_net.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plat/drivers/virtio/virtio_net.c b/plat/drivers/virtio/virtio_net.c index 3025ed3..f638ca8 100644 --- a/plat/drivers/virtio/virtio_net.c +++ b/plat/drivers/virtio/virtio_net.c @@ -835,7 +835,6 @@ static __u16 virtio_net_mtu_get(struct uk_netdev *n) static int virtio_netdev_feature_negotiate(struct virtio_net_device *vndev) { __u64 host_features = 0; - __u16 hw_len; int rc = 0; /** @@ -865,16 +864,18 @@ static int virtio_netdev_feature_negotiate(struct virtio_net_device *vndev) * virtio device in a separate header file which could be reused across * different virtio devices. */ - hw_len = virtio_config_get(vndev->vdev, + virtio_config_get(vndev->vdev, __offsetof(struct virtio_net_config, mac), &vndev->hw_addr.addr_bytes[0], UK_NETDEV_HWADDR_LEN, 1); - if (unlikely(hw_len != UK_NETDEV_HWADDR_LEN)) { - uk_pr_err("Failed to retrieve the mac address from device\n"); - rc = -EAGAIN; - goto exit; - } rc = 0; + uk_pr_info("vndev->hw_addr.addr_bytes=[%x %x %x %x %x %x]\n",vndev->hw_addr.addr_bytes[0], + vndev->hw_addr.addr_bytes[1], + vndev->hw_addr.addr_bytes[2], + vndev->hw_addr.addr_bytes[3], + vndev->hw_addr.addr_bytes[4], + vndev->hw_addr.addr_bytes[5]); + /** * Mask out features supported by both driver and device. -- 2.17.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |