rdma-core: Provide missing user space pieces for multicast sendonly join V2
cover rdma-core: Provide missing user space pieces for multicast sendonly join V2
V1->V2
- Fix comments and API spec
- Improve test code.
The userspace portion that enables to join a multicast group only for sending was not merged when the kernel portion was merged.
The patches are straightforward and have been used by us for quite some time. We were surprised when the new distro releases where missing these definitions and we had to add these patches manually again.
This adds what is missing.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/2 librdmacm: Add support for extended join multicast API V2
From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>
Subject: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
V1->V2
- Fix comments to correctly refer to sendonly joins
- Fix API spec.
Add support for specifying MC join flags.
The following multicast join flags will now be supported by librdmacm (as already defined in the join flags in rdma_user_cm.h through the UAPI of the kernel).
-Full Member:
The initiator creates the Multicast group(MCG) if it wasn't previously created, can send Multicast messages to the group and receive messages from the MCG.
-Send Only Full Member:
The initiator creates the Multicast group(MCG) if it wasn't previously created, can send Multicast messages but doesn't receive any messages from the MCG (send-only).
Reviewed by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/[email protected]>
---
debian/librdmacm-dev.install +1 -0
@@ -33,6 +33,7 @@ usr/share/man/man3/rdma_get_send_comp.3 usr/share/man/man3/rdma_get_src_port.3 usr/share/man/man3/rdma_getaddrinfo.3 usr/share/man/man3/rdma_join_multicast.3 +usr/share/man/man3/rdma_join_multicast_ex.3 usr/share/man/man3/rdma_leave_multicast.3 usr/share/man/man3/rdma_listen.3 usr/share/man/man3/rdma_migrate_id.3
debian/librdmacm1.symbols +1 -0
@@ -31,6 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.15 rdma_leave_multicast@RDMACM_1.0 1.0.15 rdma_listen@RDMACM_1.0 1.0.15 rdma_migrate_id@RDMACM_1.0 1.0.15
librdmacm/cma.c +37 -4
89 lines not on this page · raw message
librdmacm/librdmacm.map +5 -0
@@ -71,3 +71,8 @@ RDMACM_1.0 { rdma_create_qp_ex; local: *; }; + +RDMACM_1.1 { + global: + rdma_join_multicast_ex; +} RDMACM_1.0;
librdmacm/man/CMakeLists.txt +1 -0
@@ -33,6 +33,7 @@ rdma_man_pages( rdma_get_src_port.3 rdma_getaddrinfo.3 rdma_join_multicast.3 + rdma_join_multicast_ex.3 rdma_leave_multicast.3 rdma_listen.3 rdma_migrate_id.3
librdmacm/man/rdma_join_multicast_ex.3 new file +66 -0
66 lines not on this page · raw message
librdmacm/rdma_cma.h +47 -0
59 lines not on this page · raw message
librdmacm/rdma_cma_abi.h +1 -1
@@ -302,7 +302,7 @@ struct ucma_abi_join_mcast {__u64 uid;__u32 id;__u16 addr_size; -__u16 reserved; +__u16 join_flags;struct sockaddr_storage addr; };
Signature · 7 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jason Gunthorpe
Reviewed-byRe: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
debian/librdmacm1.symbols librdmacm.so.1 librdmacm1 #MINVER# · line 35
Quoted 9 lines · Christoph Lameter
debian/librdmacm1.symbols +2
-0+++ b/debian/librdmacm1.symbols@@ -31,6 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.15 rdma_leave_multicast@RDMACM_1.0 1.0.15
I'm sorry I missed this in the first look.. Needs to be
rdma_join_multicast_ex@RDMACM_1.1 16
Ie package version 16, not the really old 1.0.15
Everything else looks fine to me:
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171114192558.GL4263-uk2M96/[email protected]
Re: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
Quoted 1 line · Jason Gunthorpe
Ie package version 16, not the really old 1.0.15
Ok fixup patch:
From: Christoph Lameter <[email protected]>
Subject: Increase rdma_join_multicast_ex package version to 1.0.16
debian/librdmacm1.symbols +1 -1
@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.16 rdma_leave_multicast@RDMACM_1.0 1.0.15 rdma_listen@RDMACM_1.0 1.0.15 rdma_migrate_id@RDMACM_1.0 1.0.15
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
Quoted 15 lines · Christopher Lameter
Quoted 1 line · Jason Gunthorpe
Ie package version 16, not the really old 1.0.15
Ok fixup patch:
From: Christoph Lameter <[email protected]>
Subject: Increaserdma_join_multicast_expackage version to 1.0.16Signed-off-by Christoph Lameter <[email protected]>Index: rdma-core/debian/librdmacm1.symbols
===================================================================
+++ rdma-core/debian/librdmacm1.symbols
debian/librdmacm1.symbols librdmacm.so.1 librdmacm1 #MINVER# · line 34
Quoted 5 lines
debian/librdmacm1.symbols +1
-1@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.16
No, just '16', not '1.0.16'
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171114195659.GP4263-uk2M96/[email protected]
Re: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
Quoted 11 lines · Jason Gunthorpe
Review librdmacm.so.1 librdmacm1 #MINVER# · line 34
Quoted 9 lines
Index: rdma-core/debian/librdmacm1.symbols
===================================================================
+++ rdma-core/debian/librdmacm1.symbols(quoted diff) +1
-1@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.16No, just '16', not '1.0.16'
Subject: Increase rdma_join_multicast_ex package version to 16
debian/librdmacm1.symbols +1 -1
@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 16 rdma_leave_multicast@RDMACM_1.0 1.0.15 rdma_listen@RDMACM_1.0 1.0.15 rdma_migrate_id@RDMACM_1.0 1.0.15
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
Quoted 13 lines · Christopher Lameter
Quoted 11 lines · Jason Gunthorpe
debian/librdmacm1.symbols librdmacm.so.1 librdmacm1 #MINVER# · line 34
Quoted 9 lines
Index: rdma-core/debian/librdmacm1.symbols
===================================================================
+++ rdma-core/debian/librdmacm1.symbolsdebian/librdmacm1.symbols +1
-1@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.16No, just '16', not '1.0.16'
I fixed eveything and put the series into a PR:
https://github.com/linux-rdma/rdma-core/pull/254
Please check it and let me know.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] librdmacm: Add support for extended join multicast API V2
In reply to Christopher LameterQuoted 22 lines · Christopher Lameter
Quoted 11 lines · Jason Gunthorpe
debian/librdmacm1.symbols librdmacm.so.1 librdmacm1 #MINVER# · line 34
Quoted 9 lines
Index: rdma-core/debian/librdmacm1.symbols
===================================================================
+++ rdma-core/debian/librdmacm1.symbolsdebian/librdmacm1.symbols +1
-1@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 1.0.16No, just '16', not '1.0.16'
Subject: Increase
rdma_join_multicast_expackage version to 16Signed-off-by Christoph Lameter <[email protected]>Index: rdma-core/debian/librdmacm1.symbols
===================================================================
+++ rdma-core/debian/librdmacm1.symbols
debian/librdmacm1.symbols librdmacm.so.1 librdmacm1 #MINVER# · line 37
Quoted 8 lines
debian/librdmacm1.symbols +1
-1@@ -31,7 +31,7 @@ librdmacm.so.1 librdmacm1 #MINVER# rdma_get_src_port@RDMACM_1.0 1.0.19 rdma_getaddrinfo@RDMACM_1.0 1.0.15 rdma_join_multicast@RDMACM_1.0 1.0.15 - rdma_join_multicast_ex@RDMACM_1.1 1.0.15 + rdma_join_multicast_ex@RDMACM_1.1 16 rdma_leave_multicast@RDMACM_1.0 1.0.15 rdma_listen@RDMACM_1.0 1.0.15 rdma_migrate_id@RDMACM_1.0 1.0.15
This series was applied via PR with some more revisions from me.
Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 librdmacm: Mckey test support for send only full member
In reply to Christoph LameterFrom: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>
Subject: [PATCH 2/2] librdmacm: Mckey test support for send only full member
Use rdma_join_multicast_ex instead of rdma_join_multicast. Added a new flag to -o to mckey, this flag will allow mckey to join a MC as Send Only Full Member.
--- librdmacm/examples/mckey.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-)
librdmacm/examples/mckey.c +15 -3
@@ -77,6 +77,7 @@ static int connections = 1;static int message_size =100 ;static int message_count =10 ;static int is_sender; +static int send_only =0 ;static int unmapped_addr;static char *dst_addr;static char *src_addr;
@@ -241,6 +242,7 @@ static void connect_error(void)static int addr_handler (struct cmatest_node *node) {int ret; +struct rdma_cm_join_mc_attr_ex mc_attr; ret =verify_test_params (node);if (ret)
@@ -256,7 +258,13 @@ static int addr_handler(struct cmatest_node *node) goto err; } - ret =rdma_join_multicast (node->cma_id, test.dst_addr, node); + mc_attr.comp_mask =RDMA_CM_JOIN_MC_ATTR_ADDRESS |RDMA_CM_JOIN_MC_ATTR_JOIN_FLAGS ; + mc_attr.addr = test.dst_addr; + mc_attr.join_flags = send_only ?RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER : \ +RDMA_MC_JOIN_FLAG_FULLMEMBER ; + + ret =rdma_join_multicast_ex (node->cma_id, &mc_attr, node); +if (ret) {perror ("mckey: failure joining" ); goto err;
@@ -555,8 +563,7 @@ int main(int argc, char **argv) {int op, ret; - -while ((op =getopt (argc, argv,"m:M:sb:c:C:S:p:" )) !=-1 ) { +while ((op =getopt (argc, argv,"m:M:sb:c:C:S:p:o" )) !=-1 ) {switch (op) {case 'm' : dst_addr = optarg;
@@ -584,6 +591,10 @@ int main(int argc, char **argv)case 'p' : port_space =strtol (optarg,NULL ,0 );break ; +case 'o' : + send_only =1 ; +break ; +default :printf ("usage: %s\n" , argv[0 ]);printf ("\t-m multicast_address\n" );
@@ -596,6 +607,7 @@ int main(int argc, char **argv)printf ("\t[-S message_size]\n" );printf ("\t[-p port_space - %#x for UDP (default), " "%#x for IPOIB]\n" ,RDMA_PS_UDP ,RDMA_PS_IPOIB ); +printf ("\t[-o join as sendonly fullmember]\n" );exit (1 ); } }
Signature · 7 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html