From: David Miller <davem@davemloft.net>
To: VenkatKumar.Duvvuru@Emulex.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v3 net-next 1/2] ethtool: Support for configurable RSS hash key
Date: Mon, 03 Mar 2014 15:19:46 -0500 (EST) [thread overview]
Message-ID: <20140303.151946.537238190479739067.davem@davemloft.net> (raw)
In-Reply-To: <0e1d7b54-dcbd-446d-b1c9-644086da138f@CMEXHTCAS2.ad.emulex.com>
From: Venkat Duvvuru <VenkatKumar.Duvvuru@Emulex.com>
Date: Fri, 28 Feb 2014 17:35:40 +0530
> + * @get_rxfh_key_size: Get the size of the RX flow hash key.
> + * Returns zero if not supported for this specific device.
> * @get_rxfh_indir_size: Get the size of the RX flow hash indirection table.
> * Returns zero if not supported for this specific device.
> * @get_rxfh_indir: Get the contents of the RX flow hash indirection table.
> * Will not be called if @get_rxfh_indir_size returns zero.
> + * @get_rxfh: Get the contents of the RX flow hash indirection table and hash
> + * key.
> + * Will not be called if @get_rxfh_indir_size and @get_rxfh_key_size
> + * returns zero.
> * Returns a negative error code or zero.
> * @set_rxfh_indir: Set the contents of the RX flow hash indirection table.
> * Will not be called if @get_rxfh_indir_size returns zero.
> + * @set_rxfh: Set the contents of the RX flow hash indirection table and
> + * hash key.
> + * Will not be called if @get_rxfh_indir_size and @get_rxfh_key_size
> + * returns zero.
...
> + if (!(dev->ethtool_ops->get_rxfh_indir_size ||
> + dev->ethtool_ops->get_rxfh_key_size ||
> + dev->ethtool_ops->get_rxfh))
> + return -EOPNOTSUPP;
This may be just my taste but I prefer it if all the operations have to
be non-NULL to support the new feature. The code is so much easier to
validate that way.
Even if you have to make generic "ethtool_get_rxfh_indir_size_zero"
etc. routines that implementations hook up if they don't support the
particular aspect, I prefer that to "NULL means this".
Could you make this change and resubmit?
next prev parent reply other threads:[~2014-03-03 20:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1393589141-10597-1-git-send-email-VenkatKumar.Duvvuru@Emulex.com>
2014-02-28 12:05 ` [PATCH v3 net-next 1/2] ethtool: Support for configurable RSS hash key Venkat Duvvuru
2014-03-03 20:19 ` David Miller [this message]
2014-03-04 10:53 ` Venkata Duvvuru
2014-03-05 23:59 ` Ben Hutchings
2014-03-06 14:23 ` Venkata Duvvuru
2014-03-09 23:23 ` Ben Hutchings
2014-03-10 11:13 ` Venkata Duvvuru
2014-03-12 8:59 ` Venkata Duvvuru
2014-02-28 12:05 ` [PATCH v3 net-next 2/2] be2net: " Venkat Duvvuru
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=20140303.151946.537238190479739067.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=VenkatKumar.Duvvuru@Emulex.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).