Subject: Re: [PATCH] ibmveth: Add function to enable live MAC address changes

From: Brian King <[email-masked]>
Date: Thu, 26 Feb 2015 07:08:06 -0600

On 02/25/2015 06:34 PM, Thomas Falcon wrote:
> @@ -1327,6 +1327,24 @@ static unsigned long ibmveth_get_desired_dma(struct vio_dev *vdev)
>  	return ret;
>  }
> 
> +static int ibmveth_set_mac_addr(struct net_device *dev, void *p)
> +{
> +	struct ibmveth_adapter *adapter = netdev_priv(dev);
> +	struct sockaddr *addr = p;
> +	u64 mac_address;
> +	int rc;
> +
> +	if (!is_valid_ether_addr(addr->sa_data))
> +		return -EADDRNOTAVAIL;
> +
> +	ether_addr_copy(dev->dev_addr, addr->sa_data);
> +
> +	mac_address = ibmveth_encode_mac_addr(dev->dev_addr);
> +	rc = h_change_logical_lan_mac(adapter->vdev->unit_address, mac_address);
> +
> +	return rc;

Do you still want to be changing dev->dev_addr if h_change_logical_lan_mac
returns a failure?

-Brian

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center