0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef IB_MAD_H
0011 #define IB_MAD_H
0012
0013 #include <linux/list.h>
0014
0015 #include <rdma/ib_verbs.h>
0016 #include <uapi/rdma/ib_user_mad.h>
0017
0018
0019 #define IB_MGMT_BASE_VERSION 1
0020 #define OPA_MGMT_BASE_VERSION 0x80
0021
0022 #define OPA_SM_CLASS_VERSION 0x80
0023
0024
0025 #define IB_MGMT_CLASS_SUBN_LID_ROUTED 0x01
0026 #define IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE 0x81
0027 #define IB_MGMT_CLASS_SUBN_ADM 0x03
0028 #define IB_MGMT_CLASS_PERF_MGMT 0x04
0029 #define IB_MGMT_CLASS_BM 0x05
0030 #define IB_MGMT_CLASS_DEVICE_MGMT 0x06
0031 #define IB_MGMT_CLASS_CM 0x07
0032 #define IB_MGMT_CLASS_SNMP 0x08
0033 #define IB_MGMT_CLASS_DEVICE_ADM 0x10
0034 #define IB_MGMT_CLASS_BOOT_MGMT 0x11
0035 #define IB_MGMT_CLASS_BIS 0x12
0036 #define IB_MGMT_CLASS_CONG_MGMT 0x21
0037 #define IB_MGMT_CLASS_VENDOR_RANGE2_START 0x30
0038 #define IB_MGMT_CLASS_VENDOR_RANGE2_END 0x4F
0039
0040 #define IB_OPENIB_OUI (0x001405)
0041
0042
0043 #define IB_MGMT_METHOD_GET 0x01
0044 #define IB_MGMT_METHOD_SET 0x02
0045 #define IB_MGMT_METHOD_GET_RESP 0x81
0046 #define IB_MGMT_METHOD_SEND 0x03
0047 #define IB_MGMT_METHOD_TRAP 0x05
0048 #define IB_MGMT_METHOD_REPORT 0x06
0049 #define IB_MGMT_METHOD_REPORT_RESP 0x86
0050 #define IB_MGMT_METHOD_TRAP_REPRESS 0x07
0051
0052 #define IB_MGMT_METHOD_RESP 0x80
0053 #define IB_BM_ATTR_MOD_RESP cpu_to_be32(1)
0054
0055 #define IB_MGMT_MAX_METHODS 128
0056
0057
0058 #define IB_MGMT_MAD_STATUS_SUCCESS 0x0000
0059 #define IB_MGMT_MAD_STATUS_BUSY 0x0001
0060 #define IB_MGMT_MAD_STATUS_REDIRECT_REQD 0x0002
0061 #define IB_MGMT_MAD_STATUS_BAD_VERSION 0x0004
0062 #define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD 0x0008
0063 #define IB_MGMT_MAD_STATUS_UNSUPPORTED_METHOD_ATTRIB 0x000c
0064 #define IB_MGMT_MAD_STATUS_INVALID_ATTRIB_VALUE 0x001c
0065
0066
0067 #define IB_MGMT_RMPP_VERSION 1
0068
0069 #define IB_MGMT_RMPP_TYPE_DATA 1
0070 #define IB_MGMT_RMPP_TYPE_ACK 2
0071 #define IB_MGMT_RMPP_TYPE_STOP 3
0072 #define IB_MGMT_RMPP_TYPE_ABORT 4
0073
0074 #define IB_MGMT_RMPP_FLAG_ACTIVE 1
0075 #define IB_MGMT_RMPP_FLAG_FIRST (1<<1)
0076 #define IB_MGMT_RMPP_FLAG_LAST (1<<2)
0077
0078 #define IB_MGMT_RMPP_NO_RESPTIME 0x1F
0079
0080 #define IB_MGMT_RMPP_STATUS_SUCCESS 0
0081 #define IB_MGMT_RMPP_STATUS_RESX 1
0082 #define IB_MGMT_RMPP_STATUS_ABORT_MIN 118
0083 #define IB_MGMT_RMPP_STATUS_T2L 118
0084 #define IB_MGMT_RMPP_STATUS_BAD_LEN 119
0085 #define IB_MGMT_RMPP_STATUS_BAD_SEG 120
0086 #define IB_MGMT_RMPP_STATUS_BADT 121
0087 #define IB_MGMT_RMPP_STATUS_W2S 122
0088 #define IB_MGMT_RMPP_STATUS_S2B 123
0089 #define IB_MGMT_RMPP_STATUS_BAD_STATUS 124
0090 #define IB_MGMT_RMPP_STATUS_UNV 125
0091 #define IB_MGMT_RMPP_STATUS_TMR 126
0092 #define IB_MGMT_RMPP_STATUS_UNSPEC 127
0093 #define IB_MGMT_RMPP_STATUS_ABORT_MAX 127
0094
0095 #define IB_QP0 0
0096 #define IB_QP1 cpu_to_be32(1)
0097 #define IB_QP1_QKEY 0x80010000
0098 #define IB_QP_SET_QKEY 0x80000000
0099
0100 #define IB_DEFAULT_PKEY_PARTIAL 0x7FFF
0101 #define IB_DEFAULT_PKEY_FULL 0xFFFF
0102
0103
0104
0105
0106 #define IB_NOTICE_TYPE_FATAL 0x80
0107 #define IB_NOTICE_TYPE_URGENT 0x81
0108 #define IB_NOTICE_TYPE_SECURITY 0x82
0109 #define IB_NOTICE_TYPE_SM 0x83
0110 #define IB_NOTICE_TYPE_INFO 0x84
0111
0112
0113
0114
0115 #define IB_NOTICE_PROD_CA cpu_to_be16(1)
0116 #define IB_NOTICE_PROD_SWITCH cpu_to_be16(2)
0117 #define IB_NOTICE_PROD_ROUTER cpu_to_be16(3)
0118 #define IB_NOTICE_PROD_CLASS_MGR cpu_to_be16(4)
0119
0120 enum {
0121 IB_MGMT_MAD_HDR = 24,
0122 IB_MGMT_MAD_DATA = 232,
0123 IB_MGMT_RMPP_HDR = 36,
0124 IB_MGMT_RMPP_DATA = 220,
0125 IB_MGMT_VENDOR_HDR = 40,
0126 IB_MGMT_VENDOR_DATA = 216,
0127 IB_MGMT_SA_HDR = 56,
0128 IB_MGMT_SA_DATA = 200,
0129 IB_MGMT_DEVICE_HDR = 64,
0130 IB_MGMT_DEVICE_DATA = 192,
0131 IB_MGMT_MAD_SIZE = IB_MGMT_MAD_HDR + IB_MGMT_MAD_DATA,
0132 OPA_MGMT_MAD_DATA = 2024,
0133 OPA_MGMT_RMPP_DATA = 2012,
0134 OPA_MGMT_MAD_SIZE = IB_MGMT_MAD_HDR + OPA_MGMT_MAD_DATA,
0135 };
0136
0137 struct ib_mad_hdr {
0138 u8 base_version;
0139 u8 mgmt_class;
0140 u8 class_version;
0141 u8 method;
0142 __be16 status;
0143 __be16 class_specific;
0144 __be64 tid;
0145 __be16 attr_id;
0146 __be16 resv;
0147 __be32 attr_mod;
0148 };
0149
0150 struct ib_rmpp_hdr {
0151 u8 rmpp_version;
0152 u8 rmpp_type;
0153 u8 rmpp_rtime_flags;
0154 u8 rmpp_status;
0155 __be32 seg_num;
0156 __be32 paylen_newwin;
0157 };
0158
0159 typedef u64 __bitwise ib_sa_comp_mask;
0160
0161 #define IB_SA_COMP_MASK(n) ((__force ib_sa_comp_mask) cpu_to_be64(1ull << (n)))
0162
0163
0164
0165
0166
0167
0168
0169 struct ib_sa_hdr {
0170 __be64 sm_key;
0171 __be16 attr_offset;
0172 __be16 reserved;
0173 ib_sa_comp_mask comp_mask;
0174 } __packed;
0175
0176 struct ib_mad {
0177 struct ib_mad_hdr mad_hdr;
0178 u8 data[IB_MGMT_MAD_DATA];
0179 };
0180
0181 struct opa_mad {
0182 struct ib_mad_hdr mad_hdr;
0183 u8 data[OPA_MGMT_MAD_DATA];
0184 };
0185
0186 struct ib_rmpp_mad {
0187 struct ib_mad_hdr mad_hdr;
0188 struct ib_rmpp_hdr rmpp_hdr;
0189 u8 data[IB_MGMT_RMPP_DATA];
0190 };
0191
0192 struct opa_rmpp_mad {
0193 struct ib_mad_hdr mad_hdr;
0194 struct ib_rmpp_hdr rmpp_hdr;
0195 u8 data[OPA_MGMT_RMPP_DATA];
0196 };
0197
0198 struct ib_sa_mad {
0199 struct ib_mad_hdr mad_hdr;
0200 struct ib_rmpp_hdr rmpp_hdr;
0201 struct ib_sa_hdr sa_hdr;
0202 u8 data[IB_MGMT_SA_DATA];
0203 } __packed;
0204
0205 struct ib_vendor_mad {
0206 struct ib_mad_hdr mad_hdr;
0207 struct ib_rmpp_hdr rmpp_hdr;
0208 u8 reserved;
0209 u8 oui[3];
0210 u8 data[IB_MGMT_VENDOR_DATA];
0211 };
0212
0213 #define IB_MGMT_CLASSPORTINFO_ATTR_ID cpu_to_be16(0x0001)
0214
0215 #define IB_CLASS_PORT_INFO_RESP_TIME_MASK 0x1F
0216 #define IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE 5
0217
0218 struct ib_class_port_info {
0219 u8 base_version;
0220 u8 class_version;
0221 __be16 capability_mask;
0222
0223 __be32 cap_mask2_resp_time;
0224 u8 redirect_gid[16];
0225 __be32 redirect_tcslfl;
0226 __be16 redirect_lid;
0227 __be16 redirect_pkey;
0228 __be32 redirect_qp;
0229 __be32 redirect_qkey;
0230 u8 trap_gid[16];
0231 __be32 trap_tcslfl;
0232 __be16 trap_lid;
0233 __be16 trap_pkey;
0234 __be32 trap_hlqp;
0235 __be32 trap_qkey;
0236 };
0237
0238
0239 enum ib_port_capability_mask_bits {
0240 IB_PORT_SM = 1 << 1,
0241 IB_PORT_NOTICE_SUP = 1 << 2,
0242 IB_PORT_TRAP_SUP = 1 << 3,
0243 IB_PORT_OPT_IPD_SUP = 1 << 4,
0244 IB_PORT_AUTO_MIGR_SUP = 1 << 5,
0245 IB_PORT_SL_MAP_SUP = 1 << 6,
0246 IB_PORT_MKEY_NVRAM = 1 << 7,
0247 IB_PORT_PKEY_NVRAM = 1 << 8,
0248 IB_PORT_LED_INFO_SUP = 1 << 9,
0249 IB_PORT_SM_DISABLED = 1 << 10,
0250 IB_PORT_SYS_IMAGE_GUID_SUP = 1 << 11,
0251 IB_PORT_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12,
0252 IB_PORT_EXTENDED_SPEEDS_SUP = 1 << 14,
0253 IB_PORT_CAP_MASK2_SUP = 1 << 15,
0254 IB_PORT_CM_SUP = 1 << 16,
0255 IB_PORT_SNMP_TUNNEL_SUP = 1 << 17,
0256 IB_PORT_REINIT_SUP = 1 << 18,
0257 IB_PORT_DEVICE_MGMT_SUP = 1 << 19,
0258 IB_PORT_VENDOR_CLASS_SUP = 1 << 20,
0259 IB_PORT_DR_NOTICE_SUP = 1 << 21,
0260 IB_PORT_CAP_MASK_NOTICE_SUP = 1 << 22,
0261 IB_PORT_BOOT_MGMT_SUP = 1 << 23,
0262 IB_PORT_LINK_LATENCY_SUP = 1 << 24,
0263 IB_PORT_CLIENT_REG_SUP = 1 << 25,
0264 IB_PORT_OTHER_LOCAL_CHANGES_SUP = 1 << 26,
0265 IB_PORT_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27,
0266 IB_PORT_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28,
0267 IB_PORT_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29,
0268 IB_PORT_MCAST_FDB_TOP_SUP = 1 << 30,
0269 IB_PORT_HIERARCHY_INFO_SUP = 1ULL << 31,
0270 };
0271
0272 enum ib_port_capability_mask2_bits {
0273 IB_PORT_SET_NODE_DESC_SUP = 1 << 0,
0274 IB_PORT_EX_PORT_INFO_EX_SUP = 1 << 1,
0275 IB_PORT_VIRT_SUP = 1 << 2,
0276 IB_PORT_SWITCH_PORT_STATE_TABLE_SUP = 1 << 3,
0277 IB_PORT_LINK_WIDTH_2X_SUP = 1 << 4,
0278 IB_PORT_LINK_SPEED_HDR_SUP = 1 << 5,
0279 IB_PORT_LINK_SPEED_NDR_SUP = 1 << 10,
0280 };
0281
0282 #define OPA_CLASS_PORT_INFO_PR_SUPPORT BIT(26)
0283
0284 struct opa_class_port_info {
0285 u8 base_version;
0286 u8 class_version;
0287 __be16 cap_mask;
0288 __be32 cap_mask2_resp_time;
0289
0290 u8 redirect_gid[16];
0291 __be32 redirect_tc_fl;
0292 __be32 redirect_lid;
0293 __be32 redirect_sl_qp;
0294 __be32 redirect_qkey;
0295
0296 u8 trap_gid[16];
0297 __be32 trap_tc_fl;
0298 __be32 trap_lid;
0299 __be32 trap_hl_qp;
0300 __be32 trap_qkey;
0301
0302 __be16 trap_pkey;
0303 __be16 redirect_pkey;
0304
0305 u8 trap_sl_rsvd;
0306 u8 reserved[3];
0307 } __packed;
0308
0309
0310
0311
0312
0313
0314 static inline u8 ib_get_cpi_resp_time(struct ib_class_port_info *cpi)
0315 {
0316 return (u8)(be32_to_cpu(cpi->cap_mask2_resp_time) &
0317 IB_CLASS_PORT_INFO_RESP_TIME_MASK);
0318 }
0319
0320
0321
0322
0323
0324
0325
0326 static inline void ib_set_cpi_resp_time(struct ib_class_port_info *cpi,
0327 u8 rtime)
0328 {
0329 cpi->cap_mask2_resp_time =
0330 (cpi->cap_mask2_resp_time &
0331 cpu_to_be32(~IB_CLASS_PORT_INFO_RESP_TIME_MASK)) |
0332 cpu_to_be32(rtime & IB_CLASS_PORT_INFO_RESP_TIME_MASK);
0333 }
0334
0335
0336
0337
0338
0339
0340 static inline u32 ib_get_cpi_capmask2(struct ib_class_port_info *cpi)
0341 {
0342 return (be32_to_cpu(cpi->cap_mask2_resp_time) >>
0343 IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE);
0344 }
0345
0346
0347
0348
0349
0350
0351
0352 static inline void ib_set_cpi_capmask2(struct ib_class_port_info *cpi,
0353 u32 capmask2)
0354 {
0355 cpi->cap_mask2_resp_time =
0356 (cpi->cap_mask2_resp_time &
0357 cpu_to_be32(IB_CLASS_PORT_INFO_RESP_TIME_MASK)) |
0358 cpu_to_be32(capmask2 <<
0359 IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE);
0360 }
0361
0362
0363
0364
0365
0366
0367 static inline u32 opa_get_cpi_capmask2(struct opa_class_port_info *cpi)
0368 {
0369 return (be32_to_cpu(cpi->cap_mask2_resp_time) >>
0370 IB_CLASS_PORT_INFO_RESP_TIME_FIELD_SIZE);
0371 }
0372
0373 struct ib_mad_notice_attr {
0374 u8 generic_type;
0375 u8 prod_type_msb;
0376 __be16 prod_type_lsb;
0377 __be16 trap_num;
0378 __be16 issuer_lid;
0379 __be16 toggle_count;
0380
0381 union {
0382 struct {
0383 u8 details[54];
0384 } raw_data;
0385
0386 struct {
0387 __be16 reserved;
0388 __be16 lid;
0389 u8 port_num;
0390 } __packed ntc_129_131;
0391
0392 struct {
0393 __be16 reserved;
0394 __be16 lid;
0395 u8 reserved2;
0396 u8 local_changes;
0397 __be32 new_cap_mask;
0398 u8 reserved3;
0399 u8 change_flags;
0400 } __packed ntc_144;
0401
0402 struct {
0403 __be16 reserved;
0404 __be16 lid;
0405 __be16 reserved2;
0406 __be64 new_sys_guid;
0407 } __packed ntc_145;
0408
0409 struct {
0410 __be16 reserved;
0411 __be16 lid;
0412 __be16 dr_slid;
0413 u8 method;
0414 u8 reserved2;
0415 __be16 attr_id;
0416 __be32 attr_mod;
0417 __be64 mkey;
0418 u8 reserved3;
0419 u8 dr_trunc_hop;
0420 u8 dr_rtn_path[30];
0421 } __packed ntc_256;
0422
0423 struct {
0424 __be16 reserved;
0425 __be16 lid1;
0426 __be16 lid2;
0427 __be32 key;
0428 __be32 sl_qp1;
0429 __be32 qp2;
0430 union ib_gid gid1;
0431 union ib_gid gid2;
0432 } __packed ntc_257_258;
0433
0434 } details;
0435 };
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463 struct ib_mad_send_buf {
0464 struct ib_mad_send_buf *next;
0465 void *mad;
0466 struct ib_mad_agent *mad_agent;
0467 struct ib_ah *ah;
0468 void *context[2];
0469 int hdr_len;
0470 int data_len;
0471 int seg_count;
0472 int seg_size;
0473 int seg_rmpp_size;
0474 int timeout_ms;
0475 int retries;
0476 };
0477
0478
0479
0480
0481
0482 int ib_response_mad(const struct ib_mad_hdr *hdr);
0483
0484
0485
0486
0487
0488 static inline u8 ib_get_rmpp_resptime(struct ib_rmpp_hdr *rmpp_hdr)
0489 {
0490 return rmpp_hdr->rmpp_rtime_flags >> 3;
0491 }
0492
0493
0494
0495
0496
0497 static inline u8 ib_get_rmpp_flags(struct ib_rmpp_hdr *rmpp_hdr)
0498 {
0499 return rmpp_hdr->rmpp_rtime_flags & 0x7;
0500 }
0501
0502
0503
0504
0505
0506
0507 static inline void ib_set_rmpp_resptime(struct ib_rmpp_hdr *rmpp_hdr, u8 rtime)
0508 {
0509 rmpp_hdr->rmpp_rtime_flags = ib_get_rmpp_flags(rmpp_hdr) | (rtime << 3);
0510 }
0511
0512
0513
0514
0515
0516
0517 static inline void ib_set_rmpp_flags(struct ib_rmpp_hdr *rmpp_hdr, u8 flags)
0518 {
0519 rmpp_hdr->rmpp_rtime_flags = (rmpp_hdr->rmpp_rtime_flags & 0xF8) |
0520 (flags & 0x7);
0521 }
0522
0523 struct ib_mad_agent;
0524 struct ib_mad_send_wc;
0525 struct ib_mad_recv_wc;
0526
0527
0528
0529
0530
0531
0532 typedef void (*ib_mad_send_handler)(struct ib_mad_agent *mad_agent,
0533 struct ib_mad_send_wc *mad_send_wc);
0534
0535
0536
0537
0538
0539
0540
0541
0542
0543
0544
0545
0546 typedef void (*ib_mad_recv_handler)(struct ib_mad_agent *mad_agent,
0547 struct ib_mad_send_buf *send_buf,
0548 struct ib_mad_recv_wc *mad_recv_wc);
0549
0550
0551
0552
0553
0554
0555
0556
0557
0558
0559
0560
0561
0562
0563
0564
0565 enum {
0566 IB_MAD_USER_RMPP = IB_USER_MAD_USER_RMPP,
0567 };
0568 struct ib_mad_agent {
0569 struct ib_device *device;
0570 struct ib_qp *qp;
0571 ib_mad_recv_handler recv_handler;
0572 ib_mad_send_handler send_handler;
0573 void *context;
0574 u32 hi_tid;
0575 u32 flags;
0576 void *security;
0577 struct list_head mad_agent_sec_list;
0578 u8 port_num;
0579 u8 rmpp_version;
0580 bool smp_allowed;
0581 };
0582
0583
0584
0585
0586
0587
0588
0589
0590 struct ib_mad_send_wc {
0591 struct ib_mad_send_buf *send_buf;
0592 enum ib_wc_status status;
0593 u32 vendor_err;
0594 };
0595
0596
0597
0598
0599
0600
0601
0602
0603
0604 struct ib_mad_recv_buf {
0605 struct list_head list;
0606 struct ib_grh *grh;
0607 union {
0608 struct ib_mad *mad;
0609 struct opa_mad *opa_mad;
0610 };
0611 };
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624 struct ib_mad_recv_wc {
0625 struct ib_wc *wc;
0626 struct ib_mad_recv_buf recv_buf;
0627 struct list_head rmpp_list;
0628 int mad_len;
0629 size_t mad_seg_size;
0630 };
0631
0632
0633
0634
0635
0636
0637
0638
0639
0640
0641
0642
0643
0644
0645 struct ib_mad_reg_req {
0646 u8 mgmt_class;
0647 u8 mgmt_class_version;
0648 u8 oui[3];
0649 DECLARE_BITMAP(method_mask, IB_MGMT_MAX_METHODS);
0650 };
0651
0652
0653
0654
0655
0656
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0670
0671 struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
0672 u32 port_num,
0673 enum ib_qp_type qp_type,
0674 struct ib_mad_reg_req *mad_reg_req,
0675 u8 rmpp_version,
0676 ib_mad_send_handler send_handler,
0677 ib_mad_recv_handler recv_handler,
0678 void *context,
0679 u32 registration_flags);
0680
0681
0682
0683
0684
0685
0686
0687 void ib_unregister_mad_agent(struct ib_mad_agent *mad_agent);
0688
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708 int ib_post_send_mad(struct ib_mad_send_buf *send_buf,
0709 struct ib_mad_send_buf **bad_send_buf);
0710
0711
0712
0713
0714
0715
0716
0717
0718
0719 void ib_free_recv_mad(struct ib_mad_recv_wc *mad_recv_wc);
0720
0721
0722
0723
0724
0725
0726
0727
0728
0729 int ib_modify_mad(struct ib_mad_send_buf *send_buf, u32 timeout_ms);
0730
0731
0732
0733
0734
0735
0736
0737
0738 static inline void ib_cancel_mad(struct ib_mad_send_buf *send_buf)
0739 {
0740 ib_modify_mad(send_buf, 0);
0741 }
0742
0743
0744
0745
0746
0747
0748
0749
0750
0751
0752
0753
0754
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765
0766
0767
0768
0769
0770 struct ib_mad_send_buf *ib_create_send_mad(struct ib_mad_agent *mad_agent,
0771 u32 remote_qpn, u16 pkey_index,
0772 int rmpp_active,
0773 int hdr_len, int data_len,
0774 gfp_t gfp_mask,
0775 u8 base_version);
0776
0777
0778
0779
0780
0781
0782
0783
0784 int ib_is_mad_class_rmpp(u8 mgmt_class);
0785
0786
0787
0788
0789
0790
0791
0792
0793
0794 int ib_get_mad_data_offset(u8 mgmt_class);
0795
0796
0797
0798
0799
0800
0801
0802
0803
0804 void *ib_get_rmpp_segment(struct ib_mad_send_buf *send_buf, int seg_num);
0805
0806
0807
0808
0809
0810 void ib_free_send_mad(struct ib_mad_send_buf *send_buf);
0811
0812
0813
0814
0815
0816
0817 int ib_mad_kernel_rmpp_agent(const struct ib_mad_agent *agent);
0818
0819 #endif