netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Brian King <brking@linux.vnet.ibm.com>
Cc: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>,
	netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] ibmveth: Add function to enable live MAC address changes
Date: Thu, 26 Feb 2015 16:55:12 +0100	[thread overview]
Message-ID: <20150226155512.GG1973@nanopsycho.lan> (raw)
In-Reply-To: <54EF1AB6.5010004@linux.vnet.ibm.com>

Thu, Feb 26, 2015 at 02:08:06PM CET, brking@linux.vnet.ibm.com wrote:
>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?

That should not be done. dev_addr should be in sync with real hw addr.

  reply	other threads:[~2015-02-26 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26  0:34 [PATCH] ibmveth: Add function to enable live MAC address changes Thomas Falcon
2015-02-26 13:08 ` Brian King
2015-02-26 15:55   ` Jiri Pirko [this message]
2015-02-27 22:22 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150226155512.GG1973@nanopsycho.lan \
    --to=jiri@resnulli.us \
    --cc=brking@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=tlfalcon@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).