lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Jun 2009 03:02:48 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Martin Fuzzey <mfuzzey@...il.com>
Cc:	netdev@...r.kernel.org, nico@....org
Subject: Re: [RFC PATCH] Ethtool style in kernel network driver
 configuration.

On Wed, 2009-06-10 at 19:34 +0200, Martin Fuzzey wrote:
> Allow network drivers to be configured by the kernel
> in the same way as the userspace "ethtool" program as suggested
> by Nicolas Pitre in a recent mailing list discussion.
> 
> Two methods are possible, selected by KConfig:
> 
> 1) Kernel parameter (net_ethconfig.ethtool)
> which accepts (most of) the same arguments as "ethtool -s"
> 
> 	net_ethconfig.ethtool="eth0 speed 10 duplex full"
> 
> The wol, sopass and msglvl parameters are not (yet?) supported.

Who needs this feature?  Why not use ethtool in an initramfs?

> 2) Programatic configuration via a new function
> neteth_configure_interface() (typically from board specific setup code):
> 
> #include <linux/net-ethconfig.h>
> static struct neteth_if_config force_10mbps = {
> 	.etool_cmd = {
> 		.speed = SPEED_10,
> 		.duplex = DUPLEX_FULL,
> 	},
> 	.set_flags = NETCONF_SET_SPEED | NETCONF_SET_DUPLEX,
> };
> ...
> neteth_configure_interface("eth0", &force_10mbps);
> 
> The programatic method may be required in certain embedded situations
> (for example when different hardware revisions require different
> configurations and the hardware revision can be detected by software).
[...]

Forcing speed and duplex is occasionally needed to work around a link
partner that doesn't implement autonegotiation correctly.  I don't see
that it should ever be needed in platform configuration.  If the driver
doesn't detect the MAC/PHY capabilities correctly then the driver should
be fixed.  Overriding the settings once will not prevent an unsupported
mode being selected later.

I can see that it may be useful to set the PHY type and address from
platform code, but I don't know how many drivers for current hardware
can cope with having those changed after initialisation.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ