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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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) 2004 Topspin Communications.  All rights reserved.
  4  * Copyright (c) 2005 Intel Corporation. All rights reserved.
  5  * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
  6  */
  7 
  8 #ifndef _IB_CACHE_H
  9 #define _IB_CACHE_H
 10 
 11 #include <rdma/ib_verbs.h>
 12 
 13 int rdma_query_gid(struct ib_device *device, u32 port_num, int index,
 14                    union ib_gid *gid);
 15 void *rdma_read_gid_hw_context(const struct ib_gid_attr *attr);
 16 const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
 17                                         const union ib_gid *gid,
 18                                         enum ib_gid_type gid_type,
 19                                         struct net_device *ndev);
 20 const struct ib_gid_attr *rdma_find_gid_by_port(struct ib_device *ib_dev,
 21                                                 const union ib_gid *gid,
 22                                                 enum ib_gid_type gid_type,
 23                                                 u32 port,
 24                                                 struct net_device *ndev);
 25 const struct ib_gid_attr *rdma_find_gid_by_filter(
 26         struct ib_device *device, const union ib_gid *gid, u32 port_num,
 27         bool (*filter)(const union ib_gid *gid, const struct ib_gid_attr *,
 28                        void *),
 29         void *context);
 30 
 31 int rdma_read_gid_l2_fields(const struct ib_gid_attr *attr,
 32                             u16 *vlan_id, u8 *smac);
 33 struct net_device *rdma_read_gid_attr_ndev_rcu(const struct ib_gid_attr *attr);
 34 
 35 /**
 36  * ib_get_cached_pkey - Returns a cached PKey table entry
 37  * @device: The device to query.
 38  * @port_num: The port number of the device to query.
 39  * @index: The index into the cached PKey table to query.
 40  * @pkey: The PKey value found at the specified index.
 41  *
 42  * ib_get_cached_pkey() fetches the specified PKey table entry stored in
 43  * the local software cache.
 44  */
 45 int ib_get_cached_pkey(struct ib_device    *device_handle,
 46                        u32                  port_num,
 47                        int                  index,
 48                        u16                 *pkey);
 49 
 50 /**
 51  * ib_find_cached_pkey - Returns the PKey table index where a specified
 52  *   PKey value occurs.
 53  * @device: The device to query.
 54  * @port_num: The port number of the device to search for the PKey.
 55  * @pkey: The PKey value to search for.
 56  * @index: The index into the cached PKey table where the PKey was found.
 57  *
 58  * ib_find_cached_pkey() searches the specified PKey table in
 59  * the local software cache.
 60  */
 61 int ib_find_cached_pkey(struct ib_device    *device,
 62                         u32                  port_num,
 63                         u16                  pkey,
 64                         u16                 *index);
 65 
 66 /**
 67  * ib_find_exact_cached_pkey - Returns the PKey table index where a specified
 68  *   PKey value occurs. Comparison uses the FULL 16 bits (incl membership bit)
 69  * @device: The device to query.
 70  * @port_num: The port number of the device to search for the PKey.
 71  * @pkey: The PKey value to search for.
 72  * @index: The index into the cached PKey table where the PKey was found.
 73  *
 74  * ib_find_exact_cached_pkey() searches the specified PKey table in
 75  * the local software cache.
 76  */
 77 int ib_find_exact_cached_pkey(struct ib_device    *device,
 78                               u32                  port_num,
 79                               u16                  pkey,
 80                               u16                 *index);
 81 
 82 /**
 83  * ib_get_cached_lmc - Returns a cached lmc table entry
 84  * @device: The device to query.
 85  * @port_num: The port number of the device to query.
 86  * @lmc: The lmc value for the specified port for that device.
 87  *
 88  * ib_get_cached_lmc() fetches the specified lmc table entry stored in
 89  * the local software cache.
 90  */
 91 int ib_get_cached_lmc(struct ib_device *device,
 92                       u32               port_num,
 93                       u8                *lmc);
 94 
 95 /**
 96  * ib_get_cached_port_state - Returns a cached port state table entry
 97  * @device: The device to query.
 98  * @port_num: The port number of the device to query.
 99  * @port_state: port_state for the specified port for that device.
100  *
101  * ib_get_cached_port_state() fetches the specified port_state table entry stored in
102  * the local software cache.
103  */
104 int ib_get_cached_port_state(struct ib_device *device,
105                              u32               port_num,
106                               enum ib_port_state *port_active);
107 
108 bool rdma_is_zero_gid(const union ib_gid *gid);
109 const struct ib_gid_attr *rdma_get_gid_attr(struct ib_device *device,
110                                             u32 port_num, int index);
111 void rdma_put_gid_attr(const struct ib_gid_attr *attr);
112 void rdma_hold_gid_attr(const struct ib_gid_attr *attr);
113 ssize_t rdma_query_gid_table(struct ib_device *device,
114                              struct ib_uverbs_gid_entry *entries,
115                              size_t max_entries);
116 
117 #endif /* _IB_CACHE_H */
118 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php