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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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 ] ~

Diff markup

Differences between /include/rdma/opa_smi.h (Version linux-6.11-rc3) and /include/rdma/opa_smi.h (Version linux-5.10.223)


  1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-O      1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
  2 /*                                                  2 /*
  3  * Copyright (c) 2014 Intel Corporation.  All       3  * Copyright (c) 2014 Intel Corporation.  All rights reserved.
  4  */                                                 4  */
  5                                                     5 
  6 #ifndef OPA_SMI_H                                   6 #ifndef OPA_SMI_H
  7 #define OPA_SMI_H                                   7 #define OPA_SMI_H
  8                                                     8 
  9 #include <rdma/ib_mad.h>                            9 #include <rdma/ib_mad.h>
 10 #include <rdma/ib_smi.h>                           10 #include <rdma/ib_smi.h>
 11                                                    11 
 12 #define OPA_SMP_LID_DATA_SIZE                      12 #define OPA_SMP_LID_DATA_SIZE                   2016
 13 #define OPA_SMP_DR_DATA_SIZE                       13 #define OPA_SMP_DR_DATA_SIZE                    1872
 14 #define OPA_SMP_MAX_PATH_HOPS                      14 #define OPA_SMP_MAX_PATH_HOPS                   64
 15                                                    15 
 16 #define OPA_MAX_VLS                                16 #define OPA_MAX_VLS                             32
 17 #define OPA_MAX_SLS                                17 #define OPA_MAX_SLS                             32
 18 #define OPA_MAX_SCS                                18 #define OPA_MAX_SCS                             32
 19                                                    19 
 20 #define OPA_LID_PERMISSIVE                         20 #define OPA_LID_PERMISSIVE                      cpu_to_be32(0xFFFFFFFF)
 21                                                    21 
 22 struct opa_smp {                                   22 struct opa_smp {
 23         u8      base_version;                      23         u8      base_version;
 24         u8      mgmt_class;                        24         u8      mgmt_class;
 25         u8      class_version;                     25         u8      class_version;
 26         u8      method;                            26         u8      method;
 27         __be16  status;                            27         __be16  status;
 28         u8      hop_ptr;                           28         u8      hop_ptr;
 29         u8      hop_cnt;                           29         u8      hop_cnt;
 30         __be64  tid;                               30         __be64  tid;
 31         __be16  attr_id;                           31         __be16  attr_id;
 32         __be16  resv;                              32         __be16  resv;
 33         __be32  attr_mod;                          33         __be32  attr_mod;
 34         __be64  mkey;                              34         __be64  mkey;
 35         union {                                    35         union {
 36                 struct {                           36                 struct {
 37                         uint8_t data[OPA_SMP_L     37                         uint8_t data[OPA_SMP_LID_DATA_SIZE];
 38                 } lid;                             38                 } lid;
 39                 struct {                           39                 struct {
 40                         __be32  dr_slid;           40                         __be32  dr_slid;
 41                         __be32  dr_dlid;           41                         __be32  dr_dlid;
 42                         u8      initial_path[O     42                         u8      initial_path[OPA_SMP_MAX_PATH_HOPS];
 43                         u8      return_path[OP     43                         u8      return_path[OPA_SMP_MAX_PATH_HOPS];
 44                         u8      reserved[8];       44                         u8      reserved[8];
 45                         u8      data[OPA_SMP_D     45                         u8      data[OPA_SMP_DR_DATA_SIZE];
 46                 } dr;                              46                 } dr;
 47         } route;                                   47         } route;
 48 } __packed;                                        48 } __packed;
 49                                                    49 
 50                                                    50 
 51 /* Subnet management attributes */                 51 /* Subnet management attributes */
 52 /* ... */                                          52 /* ... */
 53 #define OPA_ATTRIB_ID_NODE_DESCRIPTION             53 #define OPA_ATTRIB_ID_NODE_DESCRIPTION          cpu_to_be16(0x0010)
 54 #define OPA_ATTRIB_ID_NODE_INFO                    54 #define OPA_ATTRIB_ID_NODE_INFO                 cpu_to_be16(0x0011)
 55 #define OPA_ATTRIB_ID_PORT_INFO                    55 #define OPA_ATTRIB_ID_PORT_INFO                 cpu_to_be16(0x0015)
 56 #define OPA_ATTRIB_ID_PARTITION_TABLE              56 #define OPA_ATTRIB_ID_PARTITION_TABLE           cpu_to_be16(0x0016)
 57 #define OPA_ATTRIB_ID_SL_TO_SC_MAP                 57 #define OPA_ATTRIB_ID_SL_TO_SC_MAP              cpu_to_be16(0x0017)
 58 #define OPA_ATTRIB_ID_VL_ARBITRATION               58 #define OPA_ATTRIB_ID_VL_ARBITRATION            cpu_to_be16(0x0018)
 59 #define OPA_ATTRIB_ID_SM_INFO                      59 #define OPA_ATTRIB_ID_SM_INFO                   cpu_to_be16(0x0020)
 60 #define OPA_ATTRIB_ID_CABLE_INFO                   60 #define OPA_ATTRIB_ID_CABLE_INFO                cpu_to_be16(0x0032)
 61 #define OPA_ATTRIB_ID_AGGREGATE                    61 #define OPA_ATTRIB_ID_AGGREGATE                 cpu_to_be16(0x0080)
 62 #define OPA_ATTRIB_ID_SC_TO_SL_MAP                 62 #define OPA_ATTRIB_ID_SC_TO_SL_MAP              cpu_to_be16(0x0082)
 63 #define OPA_ATTRIB_ID_SC_TO_VLR_MAP                63 #define OPA_ATTRIB_ID_SC_TO_VLR_MAP             cpu_to_be16(0x0083)
 64 #define OPA_ATTRIB_ID_SC_TO_VLT_MAP                64 #define OPA_ATTRIB_ID_SC_TO_VLT_MAP             cpu_to_be16(0x0084)
 65 #define OPA_ATTRIB_ID_SC_TO_VLNT_MAP               65 #define OPA_ATTRIB_ID_SC_TO_VLNT_MAP            cpu_to_be16(0x0085)
 66 /* ... */                                          66 /* ... */
 67 #define OPA_ATTRIB_ID_PORT_STATE_INFO              67 #define OPA_ATTRIB_ID_PORT_STATE_INFO           cpu_to_be16(0x0087)
 68 /* ... */                                          68 /* ... */
 69 #define OPA_ATTRIB_ID_BUFFER_CONTROL_TABLE         69 #define OPA_ATTRIB_ID_BUFFER_CONTROL_TABLE      cpu_to_be16(0x008A)
 70 /* ... */                                          70 /* ... */
 71                                                    71 
 72 struct opa_node_description {                      72 struct opa_node_description {
 73         u8 data[64];                               73         u8 data[64];
 74 } __packed;                                        74 } __packed;
 75                                                    75 
 76 struct opa_node_info {                             76 struct opa_node_info {
 77         u8      base_version;                      77         u8      base_version;
 78         u8      class_version;                     78         u8      class_version;
 79         u8      node_type;                         79         u8      node_type;
 80         u8      num_ports;                         80         u8      num_ports;
 81         __be32  reserved;                          81         __be32  reserved;
 82         __be64  system_image_guid;                 82         __be64  system_image_guid;
 83         __be64  node_guid;                         83         __be64  node_guid;
 84         __be64  port_guid;                         84         __be64  port_guid;
 85         __be16  partition_cap;                     85         __be16  partition_cap;
 86         __be16  device_id;                         86         __be16  device_id;
 87         __be32  revision;                          87         __be32  revision;
 88         u8      local_port_num;                    88         u8      local_port_num;
 89         u8      vendor_id[3];   /* network byt     89         u8      vendor_id[3];   /* network byte order */
 90 } __packed;                                        90 } __packed;
 91                                                    91 
 92 #define OPA_PARTITION_TABLE_BLK_SIZE 32            92 #define OPA_PARTITION_TABLE_BLK_SIZE 32
 93                                                    93 
 94 static inline u8                                   94 static inline u8
 95 opa_get_smp_direction(struct opa_smp *smp)         95 opa_get_smp_direction(struct opa_smp *smp)
 96 {                                                  96 {
 97         return ib_get_smp_direction((struct ib     97         return ib_get_smp_direction((struct ib_smp *)smp);
 98 }                                                  98 }
 99                                                    99 
100 static inline u8 *opa_get_smp_data(struct opa_    100 static inline u8 *opa_get_smp_data(struct opa_smp *smp)
101 {                                                 101 {
102         if (smp->mgmt_class == IB_MGMT_CLASS_S    102         if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
103                 return smp->route.dr.data;        103                 return smp->route.dr.data;
104                                                   104 
105         return smp->route.lid.data;               105         return smp->route.lid.data;
106 }                                                 106 }
107                                                   107 
108 static inline size_t opa_get_smp_data_size(str    108 static inline size_t opa_get_smp_data_size(struct opa_smp *smp)
109 {                                                 109 {
110         if (smp->mgmt_class == IB_MGMT_CLASS_S    110         if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
111                 return sizeof(smp->route.dr.da    111                 return sizeof(smp->route.dr.data);
112                                                   112 
113         return sizeof(smp->route.lid.data);       113         return sizeof(smp->route.lid.data);
114 }                                                 114 }
115                                                   115 
116 static inline size_t opa_get_smp_header_size(s    116 static inline size_t opa_get_smp_header_size(struct opa_smp *smp)
117 {                                                 117 {
118         if (smp->mgmt_class == IB_MGMT_CLASS_S    118         if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
119                 return sizeof(*smp) - sizeof(s    119                 return sizeof(*smp) - sizeof(smp->route.dr.data);
120                                                   120 
121         return sizeof(*smp) - sizeof(smp->rout    121         return sizeof(*smp) - sizeof(smp->route.lid.data);
122 }                                                 122 }
123                                                   123 
124 #endif /* OPA_SMI_H */                            124 #endif /* OPA_SMI_H */
125                                                   125 

~ [ 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