From patchwork Thu Nov 9 17:16:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph Lameter (Ampere)" X-Patchwork-Id: 10051411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8BA9960381 for ; Thu, 9 Nov 2017 17:16:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70B5D2B05B for ; Thu, 9 Nov 2017 17:16:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 636942B058; Thu, 9 Nov 2017 17:16:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 033572B058 for ; Thu, 9 Nov 2017 17:16:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753062AbdKIRQX (ORCPT ); Thu, 9 Nov 2017 12:16:23 -0500 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:40314 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686AbdKIRQV (ORCPT ); Thu, 9 Nov 2017 12:16:21 -0500 Received: from resomta-ch2-10v.sys.comcast.net ([69.252.207.106]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id CqR9exY8UWCI8CqRBeojF4; Thu, 09 Nov 2017 17:16:21 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-10v.sys.comcast.net with SMTP id CqRAeMbP2VigWCqRBeGQV1; Thu, 09 Nov 2017 17:16:21 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 0911611603D5; Thu, 9 Nov 2017 11:16:19 -0600 (CST) Message-Id: <20171109171618.963310045@linux.com> User-Agent: quilt/0.63-1 Date: Thu, 09 Nov 2017 11:16:11 -0600 From: Christoph Lameter To: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, Doug Ledford , Alex Vesker , Sean Hefty Subject: [PATCH 2/2] librdmacm: mckey test with rdma_join_multicast_ex References: <20171109171609.169281977@linux.com> MIME-Version: 1.0 Content-Disposition: inline; filename=0002-librdmacm-add-test-code X-CMAE-Envelope: MS4wfEQS7mp/Qf4W6BasdGsMd84bDoaPBNksXlcAQWiW+lC8PoKc4lvKZ/Bg37fi4lttU29/suVg3nbQxT+W6OXvg1x2oY3wTIdh55q2tqLtqdgVV2jml7Yg nQjjX1D/x55SrBoiglTgwDAeHlG6tok+3p74ydWhN1Wl+u90af+il/woMOJUj3754AbkcM+cRtnOovnfzrBL4t73kFh47DvgoSCmXNZvIc2+s3yj7XnODW0P 63ovBVE+jWnrwQdgi3j2zWy72wQBnO3eGEkgMHEQi+Q= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alex Vesker Subject: [PATCH 2/2] librdmacm: mckey test with rdma_join_multicast_ex This is a temporary commit modifying mckey to run 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. Tested-by: Christoph Lameter Signed-off-by: Alex Vesker Signed-off-by: Christoph Lameter --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: rdma-core/librdmacm/examples/mckey.c =================================================================== --- rdma-core.orig/librdmacm/examples/mckey.c +++ rdma-core/librdmacm/examples/mckey.c @@ -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 my_attr; ret = verify_test_params(node); if (ret) @@ -256,7 +258,13 @@ static int addr_handler(struct cmatest_n goto err; } - ret = rdma_join_multicast(node->cma_id, test.dst_addr, node); + my_attr.comp_mask = RDMA_CM_JOIN_MC_ATTR_ADDRESS | RDMA_CM_JOIN_MC_ATTR_JOIN_FLAGS; + my_attr.addr = test.dst_addr; + my_attr.join_flags = send_only ? RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER : \ + RDMA_MC_JOIN_FLAG_FULLMEMBER; + + ret = rdma_join_multicast_ex(node->cma_id, &my_attr, node); + if (ret) { perror("mckey: failure joining"); goto err; @@ -555,9 +563,12 @@ 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 'o': + puts("Will join as send only full member"); + send_only = 1; + break; case 'm': dst_addr = optarg; break; @@ -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 use sendonly fullmember]\n"); exit(1); } }