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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1260688164.2142.84.camel@localhost>
Date:	Sat, 12 Dec 2009 23:09:24 -0800
From:	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
To:	Ben Greear <greearb@...delatech.com>
Cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Eric Dumazet <eric.dumazet@...il.com>,
	"mchan@...adcom.com" <mchan@...adcom.com>,
	"bhutchings@...arflare.com" <bhutchings@...arflare.com>,
	"linville@...driver.com" <linville@...driver.com>,
	"shemminger@...ux-foundation.org" <shemminger@...ux-foundation.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
Subject: Re: RFC: ethtool: add device-specific feature support in a generic
 fashion

On Sat, 2009-12-12 at 20:19 -0800, Ben Greear wrote:
> On 12/12/2009 06:33 PM, Peter P Waskiewicz Jr wrote:
> > This is a follow-up to my first RFC, getting opinions where the best
> > place to put device-specific feature toggling would be.  The feedback I
> > received was to look at doing this in ethtool.  Below is a high-level
> > design of what I'd like to do, and wanted to vet this with the community
> > to see if this is aligned with what people would like to see.
> >
> > The general idea is to have a generic framework in ethtool to enumerate
> > device-specific commands.  A sample structure that would represent each
> > of these commands is:
> >
> > 	enum oem_cmds {
> > 		OEM_CMD_0 = 0,
> > 		OEM_CMD_1,
> > 		OEM_CMD_2,
> > 	...
> > 	etc.
> > 	...
> > 	};
> >
> > 	struct oem_feature_cmd {
> > 		/* Description of the feature */
> > 		char *description;
> >
> > 		/* Does the feature toggling requires a device reset */
> > 		u8 require_reset;
> >
> > 		/* The command-line name for the command */
> > 		char *oem_cmd_name;
> >
> > 		/* The command number assigned to this */
> > 		u32 oem_cmd;
> >
> > 		/* value for the command */
> > 		u32 oem_cmd_val;
> > 	};
> 
> I'd add a 32-bit field for flags, with require_reset being one of them.  I'd also
> align it so that it has no holes on 32/64 bit (put char*'s next to each other, maybe
> pad with another 32-bit 'spare' field.  Maybe even use uint64 for the pointers so
> that the struct size is same on 32-bit and 64-bit, to aid using 32-bit apps on
> 64-bit OS easily.
> 
> This way, as new uses are found for this, the structure remains binary compatible.
> 

Excellent points.  Thanks Ben!

-PJ

--
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