diff options
author | Shannon Nelson <shannon.nelson@amd.com> | 2023-07-11 07:24:34 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-08-10 22:51:45 +0300 |
commit | abdf31bd91120035172dc58e2e87064a72e9e087 (patch) | |
tree | 7358bc7f176880e727fa27b22fa6a815f43aaee7 /mm | |
parent | 0cd2c13b1c15dbbdf1e2ae5b7160537f97df06b5 (diff) | |
download | linux-abdf31bd91120035172dc58e2e87064a72e9e087.tar.xz |
pds_vdpa: always allow offering VIRTIO_NET_F_MAC
Our driver sets a mac if the HW is 00:..:00 so we need to be sure to
advertise VIRTIO_NET_F_MAC even if the HW doesn't. We also need to be
sure that virtio_net sees the VIRTIO_NET_F_MAC and doesn't rewrite the
mac address that a user may have set with the vdpa utility.
After reading the hw_feature bits, add the VIRTIO_NET_F_MAC to the driver's
supported_features and use that for reporting what is available. If the
HW is not advertising it, be sure to strip the VIRTIO_NET_F_MAC before
finishing the feature negotiation. If the user specifies a device_features
bitpattern in the vdpa utility without the VIRTIO_NET_F_MAC set, then
don't set the mac.
Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces")
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Message-Id: <20230711042437.69381-3-shannon.nelson@amd.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions