From: Ben Hutchings <bhutchings@solarflare.com>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<kys@microsoft.com>, <olaf@aepfle.de>,
<linux-kernel@vger.kernel.org>, <devel@linuxdriverproject.org>
Subject: Re: [PATCH net,1/1] hyperv: Add support for setting MAC from within guests
Date: Sat, 7 Jul 2012 01:19:15 +0100 [thread overview]
Message-ID: <1341620355.2923.46.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <1341609932-18971-1-git-send-email-haiyangz@microsoft.com>
On Fri, 2012-07-06 at 14:25 -0700, Haiyang Zhang wrote:
> This adds support for setting synthetic NIC MAC address from within Linux
> guests. Before using this feature, the option "spoofing of MAC address"
> should be enabled at the Hyper-V manager / Settings of the synthetic
> NIC.
[...]
> +int rndis_filter_set_device_mac(struct hv_device *hdev, char *mac)
> +{
[...]
> + t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
> + if (t == 0) {
> + netdev_err(ndev, "timeout before we got a set response...\n");
> + /*
> + * can't put_rndis_request, since we may still receive a
> + * send-completion.
> + */
> + return -EBUSY;
> + } else {
> + set_complete = &request->response_msg.msg.set_complete;
> + if (set_complete->status != RNDIS_STATUS_SUCCESS)
> + ret = -EINVAL;
[...]
Is there a specific error code that indicates the hypervisor is
configured not to allow MAC address changes? If so, shouldn't that be
translated to return EPERM rather than EINVAL?
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-07-07 0:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 21:25 Haiyang Zhang
2012-07-07 0:19 ` Ben Hutchings [this message]
2012-07-08 0:29 ` Haiyang Zhang
2012-07-10 17:03 ` Haiyang Zhang
2012-07-10 17:23 ` Ben Hutchings
2012-07-10 17:19 Haiyang Zhang
2012-07-17 5:54 ` David Miller
2012-07-30 12:39 ` Olaf Hering
2012-07-30 19:48 ` Haiyang Zhang
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=1341620355.2923.46.camel@bwh-desktop.uk.solarflarecom.com \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
/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
all inboxes | Powered by JetHome®