]> git.baikalelectronics.ru Git - kernel.git/commit
vDPA: conditionally read MTU and MAC in dev cfg space
authorZhu Lingshan <lingshan.zhu@intel.com>
Thu, 29 Sep 2022 01:45:55 +0000 (09:45 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 8 Oct 2022 00:00:44 +0000 (20:00 -0400)
commitcf46f72c8a8284da06fbdc21520525893c7279bc
tree88002c32465b573172b1c1b4cab595b63c3d35fd
parent508c1c3d8cd20af6caf0aaf362a3b147b7705cfb
vDPA: conditionally read MTU and MAC in dev cfg space

The spec says:
mtu only exists if VIRTIO_NET_F_MTU is set
The mac address field always exists (though
is only valid if VIRTIO_NET_F_MAC is set)

So vdpa_dev_net_config_fill() should read MTU and MAC
conditionally on the feature bits.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220929014555.112323-7-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa.c