public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrisious Haddad <phaddad@nvidia.com>
To: <leon@kernel.org>, <dsahern@gmail.com>, <stephen@networkplumber.org>
Cc: Patrisious Haddad <phaddad@nvidia.com>, <netdev@vger.kernel.org>,
	<jgg@nvidia.com>, <linux-rdma@vger.kernel.org>
Subject: [PATCH iproute2-next 0/2] Add optional-counters binding support
Date: Wed, 19 Mar 2025 10:25:24 +0200	[thread overview]
Message-ID: <20250319082529.287168-1-phaddad@nvidia.com> (raw)

Add optional-counters binding support together with new packets/bytes
counters. Previously optional-counters were on a per link basis, this
series allows users to bind optional-counters to a specific counter,
which allows tracking optional-counter over a specific QP group.

The support is added for both binding modes, automatic and manual,
in both cases the bound optional counters are those that are currently
configured over the link when trying to bind the QP.

In addition introduce four new optional-counters :
rdma_tx_bytes, rdma_tx_packets, rdma_rx_bytes, rdma_rx_packets
That just as their name implies allow tracking RDMA egress and ingress
traffic.

This is exposed to users through the iproute2 package which needs to be
updated as well to provide the support for this feature.

Example commands:
- rdma stat set link rocep8s0f0/1 optional-counters
  rdma_tx_bytes,rdma_rx_packets
        Enables rdma_tx_bytes and rdma_rx_packets optional-counters over
        the link.

- rdma stat qp set link rocep8s0f0/1 auto type on optional-counters on
        Enabled link automatic counter binding for QPs of same type,
        with optional-counter binding support.

- rdma stat qp bind link rocep8s0f0/1 lqpn 134
        Manually bind QP number 134 to all available counters.

- rdma stat qp bind link rocep8s0f0/1 lqpn 134 cntn 4
        Manually bind QP number 134 to counter number 4 depending on its
        configured counters.

Thanks

Patrisious Haddad (2):
  rdma: update uapi headers
  rdma: Add optional-counter option to rdma stat bind commands

 man/man8/rdma-statistic.8             |  6 ++++
 rdma/include/uapi/rdma/rdma_netlink.h |  2 ++
 rdma/stat.c                           | 50 +++++++++++++++++++++++++--
 rdma/utils.c                          |  1 +
 4 files changed, 57 insertions(+), 2 deletions(-)

-- 
2.47.0


             reply	other threads:[~2025-03-19  8:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  8:25 Patrisious Haddad [this message]
2025-03-19  8:25 ` [PATCH iproute2-next 1/2] rdma: update uapi headers Patrisious Haddad
2025-03-19  8:25 ` [PATCH iproute2-next 2/2] rdma: Add optional-counter option to rdma stat bind commands Patrisious Haddad
2025-03-24  2:50 ` [PATCH iproute2-next 0/2] Add optional-counters binding support patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250319082529.287168-1-phaddad@nvidia.com \
    --to=phaddad@nvidia.com \
    --cc=dsahern@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox