From: Ben Hutchings <bhutchings@solarflare•com>
To: Olaf Hering <olaf@aepfle•de>
Cc: <netdev@vger•kernel.org>, <xen-devel@lists•xensource.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix•com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle•com>
Subject: Re: [PATCH] xen-netfront: report link speed to ethtool
Date: Fri, 18 Nov 2011 17:46:34 +0000 [thread overview]
Message-ID: <1321638394.2883.32.camel@bwh-desktop> (raw)
In-Reply-To: <20111118164805.GA14345@aepfle.de>
On Fri, 2011-11-18 at 17:48 +0100, Olaf Hering wrote:
> Add .get_settings function, return fake data so that ethtool can get
> enough information. For some application like VCS, this is useful,
> otherwise some of application logic will get panic.
> The reported data refers to VMWare vmxnet.
>
> Signed-off-by: Xin Wei Hu <xwhu@suse•com>
> Signed-off-by: Chunyan Liu <cyliu@suse•com>
> Signed-off-by: Olaf Hering <olaf@aepfle•de>
NAK, we should not just make things up.
Ben.
> ---
> drivers/net/xen-netfront.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> Index: linux-3.2-rc2/drivers/net/xen-netfront.c
> ===================================================================
> --- linux-3.2-rc2.orig/drivers/net/xen-netfront.c
> +++ linux-3.2-rc2/drivers/net/xen-netfront.c
> @@ -1727,6 +1727,17 @@ static void netback_changed(struct xenbu
> }
> }
>
> +static int xennet_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
> +{
> + ecmd->supported = SUPPORTED_1000baseT_Full | SUPPORTED_TP;
> + ecmd->advertising = ADVERTISED_TP;
> + ecmd->port = PORT_TP;
> + ecmd->transceiver = XCVR_INTERNAL;
> + ecmd->speed = SPEED_1000;
> + ecmd->duplex = DUPLEX_FULL;
> + return 0;
> +}
> +
> static const struct xennet_stat {
> char name[ETH_GSTRING_LEN];
> u16 offset;
> @@ -1774,6 +1785,7 @@ static const struct ethtool_ops xennet_e
> {
> .get_link = ethtool_op_get_link,
>
> + .get_settings = xennet_get_settings,
> .get_sset_count = xennet_get_sset_count,
> .get_ethtool_stats = xennet_get_ethtool_stats,
> .get_strings = xennet_get_strings,
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
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:[~2011-11-18 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 16:48 [PATCH] xen-netfront: report link speed to ethtool Olaf Hering
2011-11-18 17:46 ` Ben Hutchings [this message]
2011-11-18 18:43 ` Olaf Hering
2011-11-18 19:10 ` Ben Hutchings
2011-11-18 19:17 ` Olaf Hering
2011-11-18 18:44 ` Rick Jones
2011-11-18 18:46 ` Jeremy Fitzhardinge
2011-11-18 18:58 ` use a special value of -2 for virtual devices to report indeterminate speed? Rick Jones
2011-11-18 19:13 ` Ben Hutchings
2011-11-18 19:11 ` [PATCH] xen-netfront: report link speed to ethtool 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=1321638394.2883.32.camel@bwh-desktop \
--to=bhutchings@solarflare$(echo .)com \
--cc=jeremy.fitzhardinge@citrix$(echo .)com \
--cc=konrad.wilk@oracle$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=olaf@aepfle$(echo .)de \
--cc=xen-devel@lists$(echo .)xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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