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]
Message-ID: <1462622686.19332.33.camel@decadent.org.uk>
Date:	Sat, 07 May 2016 13:04:46 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Shrikrishna Khare <skhare@...are.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, pv-drivers@...are.com
Cc:	Keyong Sun <sunk@...are.com>, Manoj Tammali <tammalim@...are.com>
Subject: Re: [PATCH net-next 5/7] Driver: Vmxnet3: Add support for
 get_coalesce, set_coalesce ethtool operations

On Fri, 2016-05-06 at 16:12 -0700, Shrikrishna Khare wrote:
[...]
> +static int
> +vmxnet3_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
> +{
[...]
> +	switch (ec->rx_coalesce_usecs) {
> +	case VMXNET3_COALESCE_DEFAULT:
> +	case VMXNET3_COALESCE_DISABLED:
> +	case VMXNET3_COALESCE_ADAPT:
> +		if (ec->tx_max_coalesced_frames ||
> +		    ec->tx_max_coalesced_frames_irq ||
> +		    ec->rx_max_coalesced_frames_irq) {
> +			return -EINVAL;
> +		}
> +		memset(adapter->coal_conf, 0, sizeof(*adapter->coal_conf));
> +		adapter->coal_conf->coalMode = ec->rx_coalesce_usecs;
> +		break;
> +	case VMXNET3_COALESCE_STATIC:
[...]

I don't want to see drivers introducing magic values for fields that
are denominated in microseconds (especially not for 0, which is the
correct way to specify 'no coalescing').  If the current
ethtool_coalesce structure is inadequate, propose an extension.

Ben.

-- 
Ben Hutchings
Editing code like this is akin to sticking plasters on the bleeding stump
of a severed limb. - me, 29 June 1999
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ