mbox series

[net-next,0/4] net/smc: Add SMC statistic support

Message ID 20210607182014.3384922-1-kgraul@linux.ibm.com (mailing list archive)
Headers show
Series net/smc: Add SMC statistic support | expand

Message

Karsten Graul June 7, 2021, 6:20 p.m. UTC
Please apply the following patch series for smc to netdev's net-next tree.

The patchset adds statistic support to the SMC protocol. Per-cpu
variables are used to collect the statistic information for better
performance and for reducing concurrency pitfalls. The code that is
collecting statistic data is implemented in macros to increase code
reuse and readability.
The generic netlink mechanism in SMC is extended to provide the
collected statistics to userspace.
Network namespace awareness is also part of the statistics
implementation.

Guvenc Gulce (4):
  net/smc: Add SMC statistics support
  net/smc: Add netlink support for SMC statistics
  net/smc: Add netlink support for SMC fallback statistics
  net/smc: Make SMC statistics network namespace aware

 include/net/net_namespace.h |   4 +
 include/net/netns/smc.h     |  16 ++
 include/uapi/linux/smc.h    |  83 ++++++++
 net/smc/Makefile            |   2 +-
 net/smc/af_smc.c            | 102 +++++++--
 net/smc/smc_core.c          |  13 +-
 net/smc/smc_netlink.c       |  11 +
 net/smc/smc_netlink.h       |   2 +-
 net/smc/smc_rx.c            |   8 +
 net/smc/smc_stats.c         | 413 ++++++++++++++++++++++++++++++++++++
 net/smc/smc_stats.h         | 266 +++++++++++++++++++++++
 net/smc/smc_tx.c            |  18 +-
 12 files changed, 917 insertions(+), 21 deletions(-)
 create mode 100644 include/net/netns/smc.h
 create mode 100644 net/smc/smc_stats.c
 create mode 100644 net/smc/smc_stats.h

Comments

David Miller June 7, 2021, 8:33 p.m. UTC | #1
From: Karsten Graul <kgraul@linux.ibm.com>
Date: Mon,  7 Jun 2021 20:20:10 +0200

> Please apply the following patch series for smc to netdev's net-next tree.
> 
> The patchset adds statistic support to the SMC protocol. Per-cpu
> variables are used to collect the statistic information for better
> performance and for reducing concurrency pitfalls. The code that is
> collecting statistic data is implemented in macros to increase code
> reuse and readability.
> The generic netlink mechanism in SMC is extended to provide the
> collected statistics to userspace.
> Network namespace awareness is also part of the statistics
> implementation.

Why not use ethtool stats?

Thank you.
Guvenc Gulce June 8, 2021, 8:59 a.m. UTC | #2
Hi Dave,
Thank you for looking into this. SMC is a protocol interacting with PCI devices (like RoCE Cards) and
runs on top of TCP protocol. As SMC is a network protocol and not an ethernet device driver, we
decided to use the generic netlink interface. There is already an established internal generic netlink
interface mechanism in SMC which is used to collect SMC Protocol internal information. This patchset
extends that existing mechanism.
Ethtool's predefined netlink interfaces are specifically tailored for the ethernet device internals and needs
and these netlink interfaces wouldn't really fit to the use cases of the SMC protocol.

Other protocols (like tipc, ncsi, ieee802154, tcp metrics) under the net subsystem use also similar generic
netlink mechanism for collecting and transporting protocol specific information to userspace. This also
encouraged us to make the generic netlink decision for exposing the gathered SMC protocol statistics
and internal information to the userspace.

Regards,

Guvenc Gulce

On 07/06/2021 22:33, David Miller wrote:
> From: Karsten Graul <kgraul@linux.ibm.com>
> Date: Mon,  7 Jun 2021 20:20:10 +0200
>
>> Please apply the following patch series for smc to netdev's net-next tree.
>>
>> The patchset adds statistic support to the SMC protocol. Per-cpu
>> variables are used to collect the statistic information for better
>> performance and for reducing concurrency pitfalls. The code that is
>> collecting statistic data is implemented in macros to increase code
>> reuse and readability.
>> The generic netlink mechanism in SMC is extended to provide the
>> collected statistics to userspace.
>> Network namespace awareness is also part of the statistics
>> implementation.
> Why not use ethtool stats?
>
> Thank you.
Karsten Graul June 11, 2021, 9:28 a.m. UTC | #3
> On 07/06/2021 22:33, David Miller wrote:
>> From: Karsten Graul <kgraul@linux.ibm.com>
>> Date: Mon,  7 Jun 2021 20:20:10 +0200
>>
>>> Please apply the following patch series for smc to netdev's net-next tree.
>>>
>>> The patchset adds statistic support to the SMC protocol. Per-cpu
>>> variables are used to collect the statistic information for better
>>> performance and for reducing concurrency pitfalls. The code that is
>>> collecting statistic data is implemented in macros to increase code
>>> reuse and readability.
>>> The generic netlink mechanism in SMC is extended to provide the
>>> collected statistics to userspace.
>>> Network namespace awareness is also part of the statistics
>>> implementation.
>> Why not use ethtool stats?
>>
>> Thank you.

On 08/06/2021 10:59, Guvenc Gulce wrote:
> Hi Dave,
> Thank you for looking into this. SMC is a protocol interacting with PCI devices (like RoCE Cards) and
> runs on top of TCP protocol. As SMC is a network protocol and not an ethernet device driver, we
> decided to use the generic netlink interface. There is already an established internal generic netlink
> interface mechanism in SMC which is used to collect SMC Protocol internal information. This patchset
> extends that existing mechanism.
> Ethtool's predefined netlink interfaces are specifically tailored for the ethernet device internals and needs
> and these netlink interfaces wouldn't really fit to the use cases of the SMC protocol.
> 
> Other protocols (like tipc, ncsi, ieee802154, tcp metrics) under the net subsystem use also similar generic
> netlink mechanism for collecting and transporting protocol specific information to userspace. This also
> encouraged us to make the generic netlink decision for exposing the gathered SMC protocol statistics
> and internal information to the userspace.
> 
> Regards,
> 
> Guvenc Gulce
> 

I just wanted to touch base with you regarding Guvenc's response where he explained our ideas about the statistics interface. We would be happy to hear your thoughts on how to proceed.

--
Karsten