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:	Mon, 28 Jun 2010 16:14:12 +0200
From:	Stanislaw Gruszka <sgruszka@...hat.com>
To:	Amit Salecha <amit.salecha@...gic.com>,
	Ben Hutchings <bhutchings@...arflare.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Amerigo Wang <amwang@...hat.com>,
	Anirban Chakraborty <anirban.chakraborty@...gic.com>
Subject: Re: [PATCH -next] qlcnic: fail when try to setup unsupported
 features

On Mon, 28 Jun 2010 08:09:18 -0500
Amit Salecha <amit.salecha@...gic.com> wrote:

> >> I plan to add return EOPNOTSUPP to ethtool_op_set_flags().
> I don't know what it will buy you.
> 
> Why don't you submit separate patch for below hunk, after your EOPNOTSUPP in ethtool_op_set_flags get accepted.

To do not brake things between patches, I plan to post one patch
touching every ethtool_op_set_flags() call in every driver (see below).
Hence removing that function where possible will make my work easier.
Beside I think toggling NETIF_F_FLAG bits directly is just simpler
than calling ethtool_op_set_flags() only for that purpose.

On Mon, 28 Jun 2010 14:16:51 +0100
Ben Hutchings <bhutchings@...arflare.com> wrote:

> > Yes, I did not describe that change in the changelog. I want to
> > remove such usage of ethtool_op_set_flags() for my furher patches, where
> > I plan to add return EOPNOTSUPP to ethtool_op_set_flags().
> 
> You might as well remove ethtool_op_set_flags() in that case, as this is
> equivalent to the behaviour when ethtool_ops::set_flags is NULL.

In case of qlcnic we change LRO settings, so removing it here is wrong.

> It would be more useful to add a supported_flags parameter to
> ethtool_op_set_flags() so it can check the requested flags against the
> driver/hardware capabilities.

My plan is something like that:

static const struct ethtool_ops my_ethtool_ops = {
        .get_flags              = ethtool_op_get_flags,
        .set_flags              = ethtool_op_set_flags,
	.supported_flags	= ETH_FLAG_LRO
}

Plus op->supported_flags check in ethtool_op_set_flags. That will allow
to define flags per driver. There is also possible to add supported_flags
to netdev, but I would like to avoid that - in such case drivers can use
custom .set_flags function.

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