354 +#include <infiniband/ofa_solaris.h> |
354 +#include <infiniband/ofa_solaris.h> |
355 +#endif |
355 +#endif |
356 |
356 |
357 /* |
357 /* |
358 * Increment this value if any changes that break userspace ABI |
358 * Increment this value if any changes that break userspace ABI |
|
359 @@ -47,7 +51,10 @@ |
|
360 IB_USER_VERBS_CMD_ALLOC_PD, |
|
361 IB_USER_VERBS_CMD_DEALLOC_PD, |
|
362 IB_USER_VERBS_CMD_REG_MR, |
|
363 - IB_USER_VERBS_CMD_DEREG_MR |
|
364 + IB_USER_VERBS_CMD_DEREG_MR, |
|
365 + IB_USER_VERBS_CMD_REG_MR_RELAXED, |
|
366 + IB_USER_VERBS_CMD_DEREG_MR_RELAXED, |
|
367 + IB_USER_VERBS_CMD_FLUSH_RELAXED_MR |
|
368 }; |
|
369 |
|
370 /* |
359 diff -r -u /tmp/846623/libibverbs-1.1.4/src/verbs.c libibverbs-1.1.4/src/verbs.c |
371 diff -r -u /tmp/846623/libibverbs-1.1.4/src/verbs.c libibverbs-1.1.4/src/verbs.c |
360 --- /tmp/846623/libibverbs-1.1.4/src/verbs.c Thu Feb 3 01:53:17 2011 |
372 --- /tmp/846623/libibverbs-1.1.4/src/verbs.c Thu Feb 3 01:53:17 2011 |
361 +++ libibverbs-1.1.4/src/verbs.c Fri Feb 11 04:02:33 2011 |
373 +++ libibverbs-1.1.4/src/verbs.c Fri Feb 11 04:02:33 2011 |
362 @@ -41,6 +41,11 @@ |
374 @@ -41,6 +41,11 @@ |
363 #include <stdlib.h> |
375 #include <stdlib.h> |
411 return 0; |
423 return 0; |
412 +#endif |
424 +#endif |
413 } |
425 } |
414 default_symver(__ibv_query_pkey, ibv_query_pkey); |
426 default_symver(__ibv_query_pkey, ibv_query_pkey); |
415 |
427 |
416 @@ -212,6 +231,10 @@ |
428 @@ -148,6 +167,27 @@ |
|
429 } |
|
430 default_symver(__ibv_alloc_pd, ibv_alloc_pd); |
|
431 |
|
432 +struct ibv_shpd *__ibv_alloc_shpd(struct ibv_pd *pd, uint64_t share_key, struct ibv_shpd *shpd) |
|
433 +{ |
|
434 + |
|
435 + shpd = pd->context->ops.alloc_shpd(pd, share_key, shpd); |
|
436 + |
|
437 + return shpd; |
|
438 +} |
|
439 +default_symver(__ibv_alloc_shpd, ibv_alloc_shpd); |
|
440 + |
|
441 +struct ibv_pd *__ibv_share_pd(struct ibv_context *context, struct ibv_shpd *shpd, uint64_t share_key) |
|
442 +{ |
|
443 + struct ibv_pd *pd; |
|
444 + |
|
445 + pd = context->ops.share_pd(context, shpd, share_key); |
|
446 + if (pd) |
|
447 + pd->context = context; |
|
448 + |
|
449 + return pd; |
|
450 +} |
|
451 +default_symver(__ibv_share_pd, ibv_share_pd); |
|
452 + |
|
453 int __ibv_dealloc_pd(struct ibv_pd *pd) |
|
454 { |
|
455 return pd->context->ops.dealloc_pd(pd); |
|
456 @@ -175,6 +215,27 @@ |
|
457 } |
|
458 default_symver(__ibv_reg_mr, ibv_reg_mr); |
|
459 |
|
460 +struct ibv_mr *__ibv_reg_mr_relaxed(struct ibv_pd *pd, void *addr, |
|
461 + size_t length, int access) |
|
462 +{ |
|
463 + struct ibv_mr *mr; |
|
464 + |
|
465 + if (ibv_dontfork_range(addr, length)) |
|
466 + return NULL; |
|
467 + |
|
468 + mr = pd->context->ops.reg_mr_relaxed(pd, addr, length, access); |
|
469 + if (mr) { |
|
470 + mr->context = pd->context; |
|
471 + mr->pd = pd; |
|
472 + mr->addr = addr; |
|
473 + mr->length = length; |
|
474 + } else |
|
475 + ibv_dofork_range(addr, length); |
|
476 + |
|
477 + return mr; |
|
478 +} |
|
479 +default_symver(__ibv_reg_mr_relaxed, ibv_reg_mr_relaxed); |
|
480 + |
|
481 int __ibv_dereg_mr(struct ibv_mr *mr) |
|
482 { |
|
483 int ret; |
|
484 @@ -189,6 +250,26 @@ |
|
485 } |
|
486 default_symver(__ibv_dereg_mr, ibv_dereg_mr); |
|
487 |
|
488 +int __ibv_dereg_mr_relaxed(struct ibv_mr *mr) |
|
489 +{ |
|
490 + int ret; |
|
491 + void *addr = mr->addr; |
|
492 + size_t length = mr->length; |
|
493 + |
|
494 + ret = mr->context->ops.dereg_mr_relaxed(mr); |
|
495 + if (!ret) |
|
496 + ibv_dofork_range(addr, length); |
|
497 + |
|
498 + return ret; |
|
499 +} |
|
500 +default_symver(__ibv_dereg_mr_relaxed, ibv_dereg_mr_relaxed); |
|
501 + |
|
502 +int __ibv_flush_relaxed_mr(struct ibv_pd *pd) |
|
503 +{ |
|
504 + return pd->context->ops.flush_relaxed_mr(pd); |
|
505 +} |
|
506 +default_symver(__ibv_flush_relaxed_mr, ibv_flush_relaxed_mr); |
|
507 + |
|
508 static struct ibv_comp_channel *ibv_create_comp_channel_v2(struct ibv_context *context) |
|
509 { |
|
510 struct ibv_abi_compat_v2 *t = context->abi_compat; |
|
511 @@ -212,6 +293,10 @@ |
417 struct ibv_comp_channel *channel; |
512 struct ibv_comp_channel *channel; |
418 struct ibv_create_comp_channel cmd; |
513 struct ibv_create_comp_channel cmd; |
419 struct ibv_create_comp_channel_resp resp; |
514 struct ibv_create_comp_channel_resp resp; |
420 +#if defined(__SVR4) && defined(__sun) |
515 +#if defined(__SVR4) && defined(__sun) |
421 + int event_fd; |
516 + int event_fd; |
422 + struct stat fstat_buf; |
517 + struct stat fstat_buf; |
423 +#endif |
518 +#endif |
424 |
519 |
425 if (abi_ver <= 2) |
520 if (abi_ver <= 2) |
426 return ibv_create_comp_channel_v2(context); |
521 return ibv_create_comp_channel_v2(context); |
427 @@ -221,7 +244,23 @@ |
522 @@ -221,7 +306,23 @@ |
428 return NULL; |
523 return NULL; |
429 |
524 |
430 IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_COMP_CHANNEL, &resp, sizeof resp); |
525 IBV_INIT_CMD_RESP(&cmd, sizeof cmd, CREATE_COMP_CHANNEL, &resp, sizeof resp); |
431 +#if defined(__SVR4) && defined(__sun) |
526 +#if defined(__SVR4) && defined(__sun) |
432 + event_fd = open("/dev/infiniband/ofs/uverbs:event", O_RDWR); |
527 + event_fd = open("/dev/infiniband/ofs/uverbs:event", O_RDWR); |
515 #define INIT __attribute__((constructor)) |
610 #define INIT __attribute__((constructor)) |
516 #define FINI __attribute__((destructor)) |
611 #define FINI __attribute__((destructor)) |
517 diff -r -u /tmp/846623/libibverbs-1.1.4/src/libibverbs.map libibverbs-1.1.4/src/libibverbs.map |
612 diff -r -u /tmp/846623/libibverbs-1.1.4/src/libibverbs.map libibverbs-1.1.4/src/libibverbs.map |
518 --- /tmp/846623/libibverbs-1.1.4/src/libibverbs.map Thu Mar 10 06:58:21 2011 |
613 --- /tmp/846623/libibverbs-1.1.4/src/libibverbs.map Thu Mar 10 06:58:21 2011 |
519 +++ libibverbs-1.1.4/src/libibverbs.map Mon Mar 28 13:44:44 2011 |
614 +++ libibverbs-1.1.4/src/libibverbs.map Mon Mar 28 13:44:44 2011 |
520 @@ -71,6 +71,7 @@ |
615 @@ -13,9 +13,14 @@ |
|
616 ibv_query_gid; |
|
617 ibv_query_pkey; |
|
618 ibv_alloc_pd; |
|
619 + ibv_alloc_shpd; |
|
620 + ibv_share_pd; |
|
621 ibv_dealloc_pd; |
|
622 ibv_reg_mr; |
|
623 + ibv_reg_mr_relaxed; |
|
624 ibv_dereg_mr; |
|
625 + ibv_dereg_mr_relaxed; |
|
626 + ibv_flush_relaxed_mr; |
|
627 ibv_create_comp_channel; |
|
628 ibv_destroy_comp_channel; |
|
629 ibv_create_cq; |
|
630 @@ -41,9 +46,14 @@ |
|
631 ibv_cmd_query_gid; |
|
632 ibv_cmd_query_pkey; |
|
633 ibv_cmd_alloc_pd; |
|
634 + ibv_cmd_alloc_shpd; |
|
635 + ibv_cmd_share_pd; |
|
636 ibv_cmd_dealloc_pd; |
|
637 ibv_cmd_reg_mr; |
|
638 + ibv_cmd_reg_mr_relaxed; |
|
639 ibv_cmd_dereg_mr; |
|
640 + ibv_cmd_dereg_mr_relaxed; |
|
641 + ibv_cmd_flush_relaxed_mr; |
|
642 ibv_cmd_create_cq; |
|
643 ibv_cmd_poll_cq; |
|
644 ibv_cmd_req_notify_cq; |
|
645 @@ -71,6 +81,7 @@ |
521 mult_to_ibv_rate; |
646 mult_to_ibv_rate; |
522 ibv_get_sysfs_path; |
647 ibv_get_sysfs_path; |
523 ibv_read_sysfs_file; |
648 ibv_read_sysfs_file; |
524 + sol_get_cpu_info; |
649 + sol_get_cpu_info; |
525 |
650 |
639 + } |
764 + } |
640 +#endif |
765 +#endif |
641 return 0; |
766 return 0; |
642 } |
767 } |
643 |
768 |
644 @@ -315,7 +380,19 @@ |
769 @@ -218,6 +283,45 @@ |
|
770 return 0; |
|
771 } |
|
772 |
|
773 +int ibv_cmd_alloc_shpd(struct ibv_context *context, struct ibv_pd *pd, |
|
774 + uint64_t share_key, struct ibv_shpd *shpd, |
|
775 + struct ibv_alloc_shpd *cmd, size_t cmd_size, |
|
776 + struct ibv_alloc_shpd_resp *resp, size_t resp_size) |
|
777 +{ |
|
778 + IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_SHPD, resp, resp_size); |
|
779 + cmd->pd_handle = pd->handle; |
|
780 + cmd->share_key = share_key; |
|
781 + |
|
782 + if (write(context->cmd_fd, cmd, cmd_size) != cmd_size) |
|
783 + return errno; |
|
784 + |
|
785 + VALGRIND_MAKE_MEM_DEFINED(resp, resp_size); |
|
786 + |
|
787 + shpd->handle = resp->shpd_handle; |
|
788 + |
|
789 + return 0; |
|
790 +} |
|
791 + |
|
792 +int ibv_cmd_share_pd(struct ibv_context *context, struct ibv_shpd *shpd, |
|
793 + uint64_t share_key, struct ibv_pd *pd, |
|
794 + struct ibv_share_pd *cmd, size_t cmd_size, |
|
795 + struct ibv_share_pd_resp *resp, size_t resp_size) |
|
796 +{ |
|
797 + IBV_INIT_CMD_RESP(cmd, cmd_size, SHARE_PD, resp, resp_size); |
|
798 + cmd->shpd_handle = shpd->handle; |
|
799 + cmd->share_key = share_key; |
|
800 + |
|
801 + if (write(context->cmd_fd, cmd, cmd_size) != cmd_size) |
|
802 + return errno; |
|
803 + |
|
804 + VALGRIND_MAKE_MEM_DEFINED(resp, resp_size); |
|
805 + |
|
806 + pd->handle = resp->pd_handle; |
|
807 + pd->context = context; |
|
808 + |
|
809 + return 0; |
|
810 +} |
|
811 + |
|
812 int ibv_cmd_dealloc_pd(struct ibv_pd *pd) |
|
813 { |
|
814 struct ibv_dealloc_pd cmd; |
|
815 @@ -259,6 +363,34 @@ |
|
816 return 0; |
|
817 } |
|
818 |
|
819 +int ibv_cmd_reg_mr_relaxed(struct ibv_pd *pd, void *addr, size_t length, |
|
820 + uint64_t hca_va, int access, |
|
821 + struct ibv_mr *mr, struct ibv_reg_mr *cmd, |
|
822 + size_t cmd_size, |
|
823 + struct ibv_reg_mr_resp *resp, size_t resp_size) |
|
824 +{ |
|
825 + |
|
826 + IBV_INIT_CMD_RESP(cmd, cmd_size, REG_MR_RELAXED, resp, resp_size); |
|
827 + |
|
828 + cmd->start = (uintptr_t) addr; |
|
829 + cmd->length = length; |
|
830 + cmd->hca_va = hca_va; |
|
831 + cmd->pd_handle = pd->handle; |
|
832 + cmd->access_flags = access; |
|
833 + |
|
834 + if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size) |
|
835 + return errno; |
|
836 + |
|
837 + VALGRIND_MAKE_MEM_DEFINED(resp, resp_size); |
|
838 + |
|
839 + mr->handle = resp->mr_handle; |
|
840 + mr->lkey = resp->lkey; |
|
841 + mr->rkey = resp->rkey; |
|
842 + mr->context = pd->context; |
|
843 + |
|
844 + return 0; |
|
845 +} |
|
846 + |
|
847 int ibv_cmd_dereg_mr(struct ibv_mr *mr) |
|
848 { |
|
849 struct ibv_dereg_mr cmd; |
|
850 @@ -272,6 +404,32 @@ |
|
851 return 0; |
|
852 } |
|
853 |
|
854 +int ibv_cmd_dereg_mr_relaxed(struct ibv_mr *mr) |
|
855 +{ |
|
856 + struct ibv_dereg_mr cmd; |
|
857 + |
|
858 + IBV_INIT_CMD(&cmd, sizeof cmd, DEREG_MR_RELAXED); |
|
859 + cmd.mr_handle = mr->handle; |
|
860 + |
|
861 + if (write(mr->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd) |
|
862 + return errno; |
|
863 + |
|
864 + return 0; |
|
865 +} |
|
866 + |
|
867 +int ibv_cmd_flush_relaxed_mr(struct ibv_pd *pd) |
|
868 +{ |
|
869 + struct ibv_flush_relaxed_mr cmd; |
|
870 + |
|
871 + IBV_INIT_CMD(&cmd, sizeof cmd, FLUSH_RELAXED_MR); |
|
872 + cmd.pd_handle = pd->handle; |
|
873 + |
|
874 + if (write(pd->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd) |
|
875 + return errno; |
|
876 + |
|
877 + return 0; |
|
878 +} |
|
879 + |
|
880 static int ibv_cmd_create_cq_v2(struct ibv_context *context, int cqe, |
|
881 struct ibv_cq *cq, |
|
882 struct ibv_create_cq *new_cmd, size_t new_cmd_size, |
|
883 @@ -315,7 +473,19 @@ |
645 cmd->user_handle = (uintptr_t) cq; |
884 cmd->user_handle = (uintptr_t) cq; |
646 cmd->cqe = cqe; |
885 cmd->cqe = cqe; |
647 cmd->comp_vector = comp_vector; |
886 cmd->comp_vector = comp_vector; |
648 +#if defined(__SVR4) && defined(__sun) |
887 +#if defined(__SVR4) && defined(__sun) |
649 + if (channel) { |
888 + if (channel) { |
767 } |
1006 } |
768 |
1007 |
769 static void add_device(struct ibv_device *dev, |
1008 static void add_device(struct ibv_device *dev, |
770 diff -r -u /tmp/846623/libibverbs-1.1.4/src/enum_strs.c libibverbs-1.1.4/src/enum_strs.c |
1009 diff -r -u /tmp/846623/libibverbs-1.1.4/src/enum_strs.c libibverbs-1.1.4/src/enum_strs.c |
771 --- /tmp/846623/libibverbs-1.1.4/src/enum_strs.c Wed Sep 16 04:27:22 2009 |
1010 --- /tmp/846623/libibverbs-1.1.4/src/enum_strs.c Wed Sep 16 04:27:22 2009 |
772 +++ libibverbs-1.1.4/src/enum_strs.c Fri Mar 16 22:51:54 2012 |
1011 +++ libibverbs-1.1.4/src/enum_strs.c Tue Mar 20 16:27:45 2012 |
773 @@ -85,6 +85,7 @@ |
1012 @@ -85,6 +85,7 @@ |
774 [IBV_EVENT_SRQ_LIMIT_REACHED] = "SRQ limit reached", |
1013 [IBV_EVENT_SRQ_LIMIT_REACHED] = "SRQ limit reached", |
775 [IBV_EVENT_QP_LAST_WQE_REACHED] = "last WQE reached", |
1014 [IBV_EVENT_QP_LAST_WQE_REACHED] = "last WQE reached", |
776 [IBV_EVENT_CLIENT_REREGISTER] = "client reregistration", |
1015 [IBV_EVENT_CLIENT_REREGISTER] = "client reregistration", |
777 + [IBV_EVENT_GID_CHANGE] = "GID change", |
1016 + [IBV_EVENT_GID_CHANGE] = "GID change", |
942 +#include <infiniband/ofa_solaris.h> |
1181 +#include <infiniband/ofa_solaris.h> |
943 +#endif |
1182 +#endif |
944 |
1183 |
945 /* |
1184 /* |
946 * This file must be kept in sync with the kernel's version of |
1185 * This file must be kept in sync with the kernel's version of |
947 @@ -94,6 +98,10 @@ |
1186 @@ -94,6 +98,15 @@ |
948 IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP, |
1187 IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP, |
949 IB_USER_VERBS_CMD_REG_XRC_RCV_QP, |
1188 IB_USER_VERBS_CMD_REG_XRC_RCV_QP, |
950 IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP, |
1189 IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP, |
|
1190 + IB_USER_VERBS_CMD_REG_MR_RELAXED, |
|
1191 + IB_USER_VERBS_CMD_DEREG_MR_RELAXED, |
|
1192 + IB_USER_VERBS_CMD_FLUSH_RELAXED_MR, |
|
1193 + IB_USER_VERBS_CMD_ALLOC_SHPD, |
|
1194 + IB_USER_VERBS_CMD_SHARE_PD, |
951 +#if defined(__SVR4) && defined(__sun) |
1195 +#if defined(__SVR4) && defined(__sun) |
952 + IB_USER_VERBS_CMD_QUERY_GID, |
1196 + IB_USER_VERBS_CMD_QUERY_GID, |
953 + IB_USER_VERBS_CMD_QUERY_PKEY |
1197 + IB_USER_VERBS_CMD_QUERY_PKEY |
954 +#endif |
1198 +#endif |
955 }; |
1199 }; |
956 |
1200 |
957 /* |
1201 /* |
958 @@ -235,6 +243,38 @@ |
1202 @@ -235,6 +248,38 @@ |
959 __u8 reserved[2]; |
1203 __u8 reserved[2]; |
960 }; |
1204 }; |
961 |
1205 |
962 +#if defined(__SVR4) && defined(__sun) |
1206 +#if defined(__SVR4) && defined(__sun) |
963 +struct ibv_query_gid { |
1207 +struct ibv_query_gid { |
1015 +struct ibv_alloc_pd_resp { |
1259 +struct ibv_alloc_pd_resp { |
1016 __u32 pd_handle; |
1260 __u32 pd_handle; |
1017 }; |
1261 }; |
1018 +#endif |
1262 +#endif |
1019 |
1263 |
|
1264 +struct ibv_alloc_shpd { |
|
1265 + __u32 command; |
|
1266 + __u16 in_words; |
|
1267 + __u16 out_words; |
|
1268 + __u64 response; |
|
1269 + __u32 pd_handle; |
|
1270 + __u32 reserved; |
|
1271 + __u64 share_key; |
|
1272 + __u64 driver_data[0]; |
|
1273 +}; |
|
1274 + |
|
1275 +struct ibv_alloc_shpd_resp { |
|
1276 + __u32 shpd_handle; |
|
1277 +}; |
|
1278 + |
|
1279 +struct ibv_share_pd { |
|
1280 + __u32 command; |
|
1281 + __u16 in_words; |
|
1282 + __u16 out_words; |
|
1283 + __u64 response; |
|
1284 + __u32 shpd_handle; |
|
1285 + __u32 reserved; |
|
1286 + __u64 share_key; |
|
1287 + __u64 driver_data[0]; |
|
1288 +}; |
|
1289 + |
|
1290 +struct ibv_share_pd_resp { |
|
1291 + __u32 pd_handle; |
|
1292 + __u32 reserved; |
|
1293 + ofuv_pd_drv_data_out_t drv_out; |
|
1294 +}; |
|
1295 + |
1020 struct ibv_dealloc_pd { |
1296 struct ibv_dealloc_pd { |
1021 __u32 command; |
1297 __u32 command; |
1022 @@ -304,10 +359,25 @@ |
1298 __u16 in_words; |
|
1299 @@ -280,6 +372,13 @@ |
|
1300 __u32 mr_handle; |
|
1301 }; |
|
1302 |
|
1303 +struct ibv_flush_relaxed_mr { |
|
1304 + __u32 command; |
|
1305 + __u16 in_words; |
|
1306 + __u16 out_words; |
|
1307 + __u32 pd_handle; |
|
1308 +}; |
|
1309 + |
|
1310 struct ibv_create_comp_channel { |
|
1311 __u32 command; |
|
1312 __u16 in_words; |
|
1313 @@ -304,10 +403,25 @@ |
1023 __u64 driver_data[0]; |
1314 __u64 driver_data[0]; |
1024 }; |
1315 }; |
1025 |
1316 |
1026 +#if defined(__SVR4) && defined(__sun) |
1317 +#if defined(__SVR4) && defined(__sun) |
1027 +/* |
1318 +/* |
1121 +}; |
1412 +}; |
1122 +#endif |
1413 +#endif |
1123 |
1414 |
1124 struct ibv_modify_srq { |
1415 struct ibv_modify_srq { |
1125 __u32 command; |
1416 __u32 command; |
|
1417 @@ -946,6 +1102,11 @@ |
|
1418 IB_USER_VERBS_CMD_QUERY_XRC_RCV_QP_V2 = -1, |
|
1419 IB_USER_VERBS_CMD_REG_XRC_RCV_QP_V2 = -1, |
|
1420 IB_USER_VERBS_CMD_UNREG_XRC_RCV_QP_V2 = -1, |
|
1421 + IB_USER_VERBS_CMD_REG_MR_RELAXED_V2 = -1, |
|
1422 + IB_USER_VERBS_CMD_DEREG_MR_RELAXED_V2 = -1, |
|
1423 + IB_USER_VERBS_CMD_FLUSH_RELAXED_MR_V2 = -1, |
|
1424 + IB_USER_VERBS_CMD_ALLOC_SHPD_V2 = -1, |
|
1425 + IB_USER_VERBS_CMD_SHARE_PD_V2 = -1, |
|
1426 }; |
|
1427 |
|
1428 struct ibv_destroy_cq_v1 { |
1126 diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/driver.h libibverbs-1.1.4/include/infiniband/driver.h |
1429 diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/driver.h libibverbs-1.1.4/include/infiniband/driver.h |
1127 --- /tmp/846623/libibverbs-1.1.4/include/infiniband/driver.h Thu Feb 3 01:53:17 2011 |
1430 --- /tmp/846623/libibverbs-1.1.4/include/infiniband/driver.h Thu Feb 3 01:53:17 2011 |
1128 +++ libibverbs-1.1.4/include/infiniband/driver.h Fri Feb 11 04:02:20 2011 |
1431 +++ libibverbs-1.1.4/include/infiniband/driver.h Fri Feb 11 04:02:20 2011 |
1129 @@ -164,8 +164,8 @@ |
1432 @@ -74,6 +74,14 @@ |
|
1433 int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd, |
|
1434 struct ibv_alloc_pd *cmd, size_t cmd_size, |
|
1435 struct ibv_alloc_pd_resp *resp, size_t resp_size); |
|
1436 +int ibv_cmd_alloc_shpd(struct ibv_context *context, struct ibv_pd *pd, |
|
1437 + uint64_t share_key, struct ibv_shpd *shpd, |
|
1438 + struct ibv_alloc_shpd *cmd, size_t cmd_size, |
|
1439 + struct ibv_alloc_shpd_resp *resp, size_t resp_size); |
|
1440 +int ibv_cmd_share_pd(struct ibv_context *context, struct ibv_shpd *shpd, |
|
1441 + uint64_t share_key, struct ibv_pd *pd, |
|
1442 + struct ibv_share_pd *cmd, size_t cmd_size, |
|
1443 + struct ibv_share_pd_resp *resp, size_t resp_size); |
|
1444 int ibv_cmd_dealloc_pd(struct ibv_pd *pd); |
|
1445 #define IBV_CMD_REG_MR_HAS_RESP_PARAMS |
|
1446 int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length, |
|
1447 @@ -81,7 +89,15 @@ |
|
1448 struct ibv_mr *mr, struct ibv_reg_mr *cmd, |
|
1449 size_t cmd_size, |
|
1450 struct ibv_reg_mr_resp *resp, size_t resp_size); |
|
1451 +#define IBV_CMD_REG_MR_RELAXED_HAS_RESP_PARAMS |
|
1452 +int ibv_cmd_reg_mr_relaxed(struct ibv_pd *pd, void *addr, size_t length, |
|
1453 + uint64_t hca_va, int access, |
|
1454 + struct ibv_mr *mr, struct ibv_reg_mr *cmd, |
|
1455 + size_t cmd_size, |
|
1456 + struct ibv_reg_mr_resp *resp, size_t resp_size); |
|
1457 int ibv_cmd_dereg_mr(struct ibv_mr *mr); |
|
1458 +int ibv_cmd_dereg_mr_relaxed(struct ibv_mr *mr); |
|
1459 +int ibv_cmd_flush_relaxed_mr(struct ibv_pd *pd); |
|
1460 int ibv_cmd_create_cq(struct ibv_context *context, int cqe, |
|
1461 struct ibv_comp_channel *channel, |
|
1462 int comp_vector, struct ibv_cq *cq, |
|
1463 @@ -164,8 +180,8 @@ |
1130 int ibv_read_sysfs_file(const char *dir, const char *file, |
1464 int ibv_read_sysfs_file(const char *dir, const char *file, |
1131 char *buf, size_t size); |
1465 char *buf, size_t size); |
1132 |
1466 |
1133 -int ibv_resolve_eth_gid(const struct ibv_pd *pd, uint8_t port_num, |
1467 -int ibv_resolve_eth_gid(const struct ibv_pd *pd, uint8_t port_num, |
1134 - union ibv_gid *dgid, uint8_t sgid_index, |
1468 - union ibv_gid *dgid, uint8_t sgid_index, |
1173 +#endif |
1518 +#endif |
1174 + |
1519 + |
1175 struct ibv_qp_init_attr { |
1520 struct ibv_qp_init_attr { |
1176 void *qp_context; |
1521 void *qp_context; |
1177 struct ibv_cq *send_cq; |
1522 struct ibv_cq *send_cq; |
1178 @@ -749,6 +761,13 @@ |
1523 @@ -743,6 +759,12 @@ |
|
1524 int (*detach_mcast)(struct ibv_qp *qp, const union ibv_gid *gid, |
|
1525 uint16_t lid); |
|
1526 void (*async_event)(struct ibv_async_event *event); |
|
1527 + struct ibv_mr * (*reg_mr_relaxed)(struct ibv_pd *pd, void *addr, size_t length, |
|
1528 + int access); |
|
1529 + int (*dereg_mr_relaxed)(struct ibv_mr *mr); |
|
1530 + int (*flush_relaxed_mr)(struct ibv_pd *pd); |
|
1531 + struct ibv_shpd * (*alloc_shpd)(struct ibv_pd *pd, uint64_t share_key, struct ibv_shpd *shpd); |
|
1532 + struct ibv_pd * (*share_pd)(struct ibv_context *context, struct ibv_shpd *shpd, uint64_t share_key); |
|
1533 }; |
|
1534 |
|
1535 struct ibv_context { |
|
1536 @@ -749,6 +771,13 @@ |
1179 struct ibv_device *device; |
1537 struct ibv_device *device; |
1180 struct ibv_context_ops ops; |
1538 struct ibv_context_ops ops; |
1181 int cmd_fd; |
1539 int cmd_fd; |
1182 +#if defined(__SVR4) && defined(__sun) |
1540 +#if defined(__SVR4) && defined(__sun) |
1183 + /* |
1541 + /* |
1187 + int mmap_fd; |
1545 + int mmap_fd; |
1188 +#endif |
1546 +#endif |
1189 int async_fd; |
1547 int async_fd; |
1190 int num_comp_vectors; |
1548 int num_comp_vectors; |
1191 pthread_mutex_t mutex; |
1549 pthread_mutex_t mutex; |
|
1550 @@ -858,6 +887,20 @@ |
|
1551 struct ibv_pd *ibv_alloc_pd(struct ibv_context *context); |
|
1552 |
|
1553 /** |
|
1554 + * ibv_alloc_shpd - Mark given protection domain as shareable & return shpd structure |
|
1555 + * that identify it. |
|
1556 + * the storage for shpd structure needs to be provided by client. |
|
1557 + */ |
|
1558 +struct ibv_shpd *ibv_alloc_shpd(struct ibv_pd *pd, uint64_t share_key, struct ibv_shpd *shpd); |
|
1559 + |
|
1560 +/** |
|
1561 + * ibv_share_pd - share the protection domain identified by given shpd struct & return a |
|
1562 + * process linked ibv_pd struct. |
|
1563 + * the share_key given should match with the share_key specifed in alloc_shpd(). |
|
1564 + */ |
|
1565 +struct ibv_pd *ibv_share_pd(struct ibv_context *context, struct ibv_shpd *shpd, uint64_t share_key); |
|
1566 + |
|
1567 +/** |
|
1568 * ibv_dealloc_pd - Free a protection domain |
|
1569 */ |
|
1570 int ibv_dealloc_pd(struct ibv_pd *pd); |
|
1571 @@ -869,11 +912,27 @@ |
|
1572 size_t length, int access); |
|
1573 |
|
1574 /** |
|
1575 + * ibv_reg_mr_relaxed - Register a memory region using FMR |
|
1576 + */ |
|
1577 +struct ibv_mr *ibv_reg_mr_relaxed(struct ibv_pd *pd, void *addr, |
|
1578 + size_t length, int access); |
|
1579 + |
|
1580 +/** |
|
1581 * ibv_dereg_mr - Deregister a memory region |
|
1582 */ |
|
1583 int ibv_dereg_mr(struct ibv_mr *mr); |
|
1584 |
|
1585 /** |
|
1586 + * ibv_dereg_mr_relaxed - Deregister a memory region registered using FMR |
|
1587 + */ |
|
1588 +int ibv_dereg_mr_relaxed(struct ibv_mr *mr); |
|
1589 + |
|
1590 +/** |
|
1591 + * ibv_flush_relaxed_mr - Flush all free mr's in the protection domain |
|
1592 + */ |
|
1593 +int ibv_flush_relaxed_mr(struct ibv_pd *pd); |
|
1594 + |
|
1595 +/** |
|
1596 * ibv_create_comp_channel - Create a completion event channel |
|
1597 */ |
|
1598 struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context); |
1192 diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/arch.h libibverbs-1.1.4/include/infiniband/arch.h |
1599 diff -r -u /tmp/846623/libibverbs-1.1.4/include/infiniband/arch.h libibverbs-1.1.4/include/infiniband/arch.h |
1193 --- /tmp/846623/libibverbs-1.1.4/include/infiniband/arch.h Wed Sep 16 04:27:22 2009 |
1600 --- /tmp/846623/libibverbs-1.1.4/include/infiniband/arch.h Wed Sep 16 04:27:22 2009 |
1194 +++ libibverbs-1.1.4/include/infiniband/arch.h Fri Feb 11 04:02:20 2011 |
1601 +++ libibverbs-1.1.4/include/infiniband/arch.h Fri Feb 11 04:02:20 2011 |
1195 @@ -34,6 +34,7 @@ |
1602 @@ -34,6 +34,7 @@ |
1196 #define INFINIBAND_ARCH_H |
1603 #define INFINIBAND_ARCH_H |