lkml.org 
[lkml]   [2016]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next 5/7] Driver: Vmxnet3: Add support for get_coalesce, set_coalesce ethtool operations
From
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 07 May 2016 13:04:46 +0100

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

Agreed.

\
 
 \ /
  Last update: 2016-05-07 20:01    [W:0.104 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site