Re: [PATH v5 2/3] vdpa_sim_net: Add the support of set mac address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static int vdpasim_net_set_attr(struct vdpa_mgmt_dev *mdev,
> +				struct vdpa_device *dev,
> +				const struct vdpa_dev_set_config *config)
> +{
> +	struct vdpasim *vdpasim = container_of(dev, struct vdpasim, vdpa);
> +	struct virtio_net_config *vio_config = vdpasim->config;
> +
> +	mutex_lock(&vdpasim->mutex);
> +
> +	if (config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
> +		memcpy(vio_config->mac, config->net.mac, ETH_ALEN);

ether_addr_copy()

	Andrew




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux