From: Randy Dunlap <randy.dunlap@oracle.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: amit.salecha@qlogic.com, linux-net-drivers@solarflare.com,
dm@chelsio.com, sgruszka@redhat.com, amwang@redhat.com,
Faisal Latif <faisal.latif@intel.com>,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
anirban.chakraborty@qlogic.com, jgarzik@redhat.com,
vkolluri@cisco.com, Chien Tung <chien.tin.tung@intel.com>,
brice@myri.com, gallatin@myri.com, linux-rdma@vger.kernel.org,
scofeldm@cisco.com, Roland Dreier <rolandd@cisco.com>,
shemminger@linux-foundation.org,
David Miller <davem@davemloft.net>,
buytenh@wantstofly.org, roprabhu@cisco.com
Subject: Re: [PATCH net-next-2.6] IB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()
Date: Tue, 06 Jul 2010 09:22:58 -0700 [thread overview]
Message-ID: <4C335862.5060703@oracle.com> (raw)
In-Reply-To: <1278186089.4878.570.camel@localhost>
On 07/03/10 12:41, Ben Hutchings wrote:
> Following commit 1437ce3983bcbc0447a0dedcd644c14fe833d266 "ethtool:
> Change ethtool_op_set_flags to validate flags", ethtool_op_set_flags
> takes a third parameter and cannot be used directly as an
> implementation of ethtool_ops::set_flags.
>
> Changes nes and ipoib driver to pass in the appropriate value.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> This is compile-tested only.
Ack, thanks.
> Dave, Roland, you'd better decide between yourselves should apply this.
>
> Ben.
>
> drivers/infiniband/hw/nes/nes_nic.c | 8 +++++++-
> drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 7 ++++++-
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
> index 5cc0a9a..42e7aad 100644
> --- a/drivers/infiniband/hw/nes/nes_nic.c
> +++ b/drivers/infiniband/hw/nes/nes_nic.c
> @@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd
> }
>
>
> +static int nes_netdev_set_flags(struct net_device *netdev, u32 flags)
> +{
> + return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO);
> +}
> +
> +
> static const struct ethtool_ops nes_ethtool_ops = {
> .get_link = ethtool_op_get_link,
> .get_settings = nes_netdev_get_settings,
> @@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = {
> .get_tso = ethtool_op_get_tso,
> .set_tso = ethtool_op_set_tso,
> .get_flags = ethtool_op_get_flags,
> - .set_flags = ethtool_op_set_flags,
> + .set_flags = nes_netdev_set_flags,
> };
>
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> index 40e8584..1a1657c 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> @@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev,
> data[index++] = priv->lro.lro_mgr.stats.no_desc;
> }
>
> +static int ipoib_set_flags(struct net_device *dev, u32 flags)
> +{
> + return ethtool_op_set_flags(dev, flags, ETH_FLAG_LRO);
> +}
> +
> static const struct ethtool_ops ipoib_ethtool_ops = {
> .get_drvinfo = ipoib_get_drvinfo,
> .get_rx_csum = ipoib_get_rx_csum,
> @@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
> .get_coalesce = ipoib_get_coalesce,
> .set_coalesce = ipoib_set_coalesce,
> .get_flags = ethtool_op_get_flags,
> - .set_flags = ethtool_op_set_flags,
> + .set_flags = ipoib_set_flags,
> .get_strings = ipoib_get_strings,
> .get_sset_count = ipoib_get_sset_count,
> .get_ethtool_stats = ipoib_get_ethtool_stats,
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
prev parent reply other threads:[~2010-07-06 16:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 12:44 [PATCH net-next-2.6 1/3] ethtool: Change ethtool_op_set_flags to validate flags Ben Hutchings
2010-06-30 12:46 ` [PATCH net-next-2.6 2/3] netdev: Make ethtool_ops::set_flags() return -EINVAL for unsupported flags Ben Hutchings
2010-06-30 15:01 ` Eilon Greenstein
2010-06-30 21:10 ` David Miller
2010-06-30 12:47 ` [PATCH net-next-2.6 3/3] vmxnet3: Remove incorrect implementation of ethtool_ops::get_flags() Ben Hutchings
2010-06-30 15:44 ` [Pv-drivers] " Bhavesh Davda
2010-06-30 15:58 ` Ben Hutchings
2010-06-30 16:46 ` Bhavesh Davda
2010-06-30 21:10 ` David Miller
2010-06-30 21:10 ` [PATCH net-next-2.6 1/3] ethtool: Change ethtool_op_set_flags to validate flags David Miller
2010-07-02 16:55 ` Randy Dunlap
2010-07-03 5:07 ` David Miller
2010-07-03 19:07 ` Randy Dunlap
2010-07-03 19:21 ` Ben Hutchings
2010-07-03 19:41 ` [PATCH net-next-2.6] IB/{nes,ipoib}: Pass supported flags to ethtool_op_set_flags() Ben Hutchings
2010-07-03 20:08 ` Roland Dreier
2010-07-03 20:40 ` [PATCH net-next-2.6] IB/{nes, ipoib}: " Ben Hutchings
2010-07-04 18:48 ` [PATCH net-next-2.6] IB/{nes,ipoib}: " David Miller
2010-07-06 16:22 ` Randy Dunlap [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=4C335862.5060703@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=amit.salecha@qlogic.com \
--cc=amwang@redhat.com \
--cc=anirban.chakraborty@qlogic.com \
--cc=bhutchings@solarflare.com \
--cc=brice@myri.com \
--cc=buytenh@wantstofly.org \
--cc=chien.tin.tung@intel.com \
--cc=davem@davemloft.net \
--cc=dm@chelsio.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=faisal.latif@intel.com \
--cc=gallatin@myri.com \
--cc=jgarzik@redhat.com \
--cc=linux-net-drivers@solarflare.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rolandd@cisco.com \
--cc=roprabhu@cisco.com \
--cc=scofeldm@cisco.com \
--cc=sgruszka@redhat.com \
--cc=shemminger@linux-foundation.org \
--cc=vkolluri@cisco.com \
/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).