From: Ben Hutchings <bhutchings@solarflare.com>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: ethtool_set_features suggestion
Date: Fri, 24 Jun 2011 19:40:20 +0100 [thread overview]
Message-ID: <1308940820.3034.17.camel@bwh-desktop> (raw)
In-Reply-To: <4E04D576.8090902@candelatech.com>
On Fri, 2011-06-24 at 11:20 -0700, Ben Greear wrote:
> static int ethtool_set_features(struct net_device *dev, void __user *useraddr)
> {
> struct ethtool_sfeatures cmd;
> struct ethtool_set_features_block features[ETHTOOL_DEV_FEATURE_WORDS];
> netdev_features_t wanted = 0, valid = 0;
> int i, ret = 0;
>
> if (copy_from_user(&cmd, useraddr, sizeof(cmd)))
> return -EFAULT;
> useraddr += sizeof(cmd);
>
> if (cmd.size != ETHTOOL_DEV_FEATURE_WORDS)
> return -EINVAL;
>
> (This is from net-next, with Miroslaw's patches applied)
>
> I was thinking that we should deal with whatever size is passed in.
> That way, if we ever expand the kernel
> feature-words size, an old user-space ethtool app would
> still function OK.
Userland should find out the correct size from ETHTOOL_GFEATURES.
Ben.
--
Ben Hutchings, Senior Software 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.
prev parent reply other threads:[~2011-06-24 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 18:20 ethtool_set_features suggestion Ben Greear
2011-06-24 18:40 ` Ben Hutchings [this message]
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=1308940820.3034.17.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.