~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/rdma/rdma_counter.h

Version: ~ [ linux-6.0-rc1 ] ~ [ linux-5.19.1 ] ~ [ linux-5.18.17 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.60 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.136 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.210 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.255 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.290 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.325 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
  2 /*
  3  * Copyright (c) 2019 Mellanox Technologies. All rights reserved.
  4  */
  5 
  6 #ifndef _RDMA_COUNTER_H_
  7 #define _RDMA_COUNTER_H_
  8 
  9 #include <linux/mutex.h>
 10 #include <linux/pid_namespace.h>
 11 
 12 #include <rdma/restrack.h>
 13 #include <rdma/rdma_netlink.h>
 14 
 15 struct ib_device;
 16 struct ib_qp;
 17 
 18 struct auto_mode_param {
 19         int qp_type;
 20 };
 21 
 22 struct rdma_counter_mode {
 23         enum rdma_nl_counter_mode mode;
 24         enum rdma_nl_counter_mask mask;
 25         struct auto_mode_param param;
 26 };
 27 
 28 struct rdma_port_counter {
 29         struct rdma_counter_mode mode;
 30         struct rdma_hw_stats *hstats;
 31         unsigned int num_counters;
 32         struct mutex lock;
 33 };
 34 
 35 struct rdma_counter {
 36         struct rdma_restrack_entry      res;
 37         struct ib_device                *device;
 38         uint32_t                        id;
 39         struct kref                     kref;
 40         struct rdma_counter_mode        mode;
 41         struct mutex                    lock;
 42         struct rdma_hw_stats            *stats;
 43         u32                             port;
 44 };
 45 
 46 void rdma_counter_init(struct ib_device *dev);
 47 void rdma_counter_release(struct ib_device *dev);
 48 int rdma_counter_set_auto_mode(struct ib_device *dev, u32 port,
 49                                enum rdma_nl_counter_mask mask,
 50                                struct netlink_ext_ack *extack);
 51 int rdma_counter_bind_qp_auto(struct ib_qp *qp, u32 port);
 52 int rdma_counter_unbind_qp(struct ib_qp *qp, bool force);
 53 
 54 int rdma_counter_query_stats(struct rdma_counter *counter);
 55 u64 rdma_counter_get_hwstat_value(struct ib_device *dev, u32 port, u32 index);
 56 int rdma_counter_bind_qpn(struct ib_device *dev, u32 port,
 57                           u32 qp_num, u32 counter_id);
 58 int rdma_counter_bind_qpn_alloc(struct ib_device *dev, u32 port,
 59                                 u32 qp_num, u32 *counter_id);
 60 int rdma_counter_unbind_qpn(struct ib_device *dev, u32 port,
 61                             u32 qp_num, u32 counter_id);
 62 int rdma_counter_get_mode(struct ib_device *dev, u32 port,
 63                           enum rdma_nl_counter_mode *mode,
 64                           enum rdma_nl_counter_mask *mask);
 65 
 66 #endif /* _RDMA_COUNTER_H_ */
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp