mbox series

[net-next,v3,0/5] hinic: add some ethtool ops support

Message ID 20200627065242.26761-1-luobin9@huawei.com
Headers show
Series hinic: add some ethtool ops support | expand

Message

Luo bin June 27, 2020, 6:52 a.m. UTC
patch #1: support to set and get pause params with
          "ethtool -A/a" cmd
patch #2: support to set and get irq coalesce params with
          "ethtool -C/c" cmd
patch #3: support to do self test with "ethtool -t" cmd
patch #4: support to identify physical device with "ethtool -p" cmd
patch #5: support to get eeprom information with "ethtool -m" cmd

Luo bin (5):
  hinic: add support to set and get pause params
  hinic: add support to set and get irq coalesce
  hinic: add self test support
  hinic: add support to identify physical device
  hinic: add support to get eeprom information

 drivers/net/ethernet/huawei/hinic/hinic_dev.h |  14 +
 .../net/ethernet/huawei/hinic/hinic_ethtool.c | 678 +++++++++++++++++-
 .../net/ethernet/huawei/hinic/hinic_hw_dev.c  |  66 ++
 .../net/ethernet/huawei/hinic/hinic_hw_dev.h  |  31 +
 .../net/ethernet/huawei/hinic/hinic_hw_io.h   |  10 +
 .../net/ethernet/huawei/hinic/hinic_hw_mgmt.h |   7 +-
 .../net/ethernet/huawei/hinic/hinic_main.c    | 131 +++-
 .../net/ethernet/huawei/hinic/hinic_port.c    | 197 +++++
 .../net/ethernet/huawei/hinic/hinic_port.h    |  94 +++
 drivers/net/ethernet/huawei/hinic/hinic_rx.c  |  58 +-
 .../net/ethernet/huawei/hinic/hinic_sriov.c   |   4 +-
 drivers/net/ethernet/huawei/hinic/hinic_tx.c  |  80 +++
 drivers/net/ethernet/huawei/hinic/hinic_tx.h  |   2 +
 13 files changed, 1357 insertions(+), 15 deletions(-)

Comments

David Miller June 28, 2020, 12:52 a.m. UTC | #1
From: Luo bin <luobin9@huawei.com>
Date: Sat, 27 Jun 2020 14:52:37 +0800

> patch #1: support to set and get pause params with
>           "ethtool -A/a" cmd
> patch #2: support to set and get irq coalesce params with
>           "ethtool -C/c" cmd
> patch #3: support to do self test with "ethtool -t" cmd
> patch #4: support to identify physical device with "ethtool -p" cmd
> patch #5: support to get eeprom information with "ethtool -m" cmd

In general,  I want you to decrease the amount of log messages.

You should only use them when the device or the kernel does something
unexpected which should be notifier to the user.

Kernel log messages are not for informating the user of limitations
of what they can perform with "ethtool".

For example, when setting pause paramenters, you complain in the logs
if the autonet setting is different.

This is completely inappropriate.

Then in patch #2 you have these crazy macros that print out state
changes with netdev_info().  That is also inappropriate.  The user
gets a success status, and they can query the settings later if
they like as well.

Please stop abusing kernel log messaging, it isn't a framework for
giving more detailed ethtool command result statuses.

Thank you.
Luo bin June 28, 2020, 12:58 a.m. UTC | #2
On 2020/6/28 8:52, David Miller wrote:
> From: Luo bin <luobin9@huawei.com>
> Date: Sat, 27 Jun 2020 14:52:37 +0800
> 
>> patch #1: support to set and get pause params with
>>           "ethtool -A/a" cmd
>> patch #2: support to set and get irq coalesce params with
>>           "ethtool -C/c" cmd
>> patch #3: support to do self test with "ethtool -t" cmd
>> patch #4: support to identify physical device with "ethtool -p" cmd
>> patch #5: support to get eeprom information with "ethtool -m" cmd
> 
> In general,  I want you to decrease the amount of log messages.
> 
> You should only use them when the device or the kernel does something
> unexpected which should be notifier to the user.
> 
> Kernel log messages are not for informating the user of limitations
> of what they can perform with "ethtool".
> 
> For example, when setting pause paramenters, you complain in the logs
> if the autonet setting is different.
> 
> This is completely inappropriate.
> 
> Then in patch #2 you have these crazy macros that print out state
> changes with netdev_info().  That is also inappropriate.  The user
> gets a success status, and they can query the settings later if
> they like as well.
> 
> Please stop abusing kernel log messaging, it isn't a framework for
> giving more detailed ethtool command result statuses.
> 
> Thank you.
> .
> 
Okay, I'll remove these normal kernel logs. Thank you for your review.