From patchwork Wed Sep 30 13:06:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 7297911 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E31FD9F1D5 for ; Wed, 30 Sep 2015 13:06:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A8AA20532 for ; Wed, 30 Sep 2015 13:06:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C3C820525 for ; Wed, 30 Sep 2015 13:06:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932519AbbI3NGa (ORCPT ); Wed, 30 Sep 2015 09:06:30 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:36152 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbbI3NG3 (ORCPT ); Wed, 30 Sep 2015 09:06:29 -0400 Received: by wicgb1 with SMTP id gb1so194380802wic.1 for ; Wed, 30 Sep 2015 06:06:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=OaiaDSrecRNyWBPDa2ernNMPneWt/v6mAR9wFXg18+4=; b=EV8FDXZELEQs09+qYCr/gbY1Vpx7QXVMC5K+WVvwy7iTmGDCGNKjrIp3HcEmgSrduL ys8dYJTPWNNDmjS1Ogm0XMGovyQCXQalVVUQjVYhzWFKgIdEghaarpR9N9tBSPDbXXEj eaaYt5tfkt+I2CRzvGWfnI0WU8W5fMrsIfU72+2CZ4EmFtO/xVsK5we7hDfp2LzBJCvj C899NiCKtOt+VW9pE7WzQSmHrjjURbO+L/X4mhB1lKLsl1I7Cw35lWmKg2MK+JCvmWSx DmDNjVQbKmbJCMfSi9ncEHM83FwNE0360smjFX7tj/HDsb14f3h2oqTgiByLI+WgBkr5 Tk8Q== X-Gm-Message-State: ALoCoQmp5AaxvuhNxP3Gm2XTUplpJxsdG2U2+TDOZ1jWE+DGrZRaROhGHQKpMwe97BhHEA98nGmR X-Received: by 10.194.76.7 with SMTP id g7mr4131285wjw.44.1443618368580; Wed, 30 Sep 2015 06:06:08 -0700 (PDT) Received: from [192.168.1.101] (c-71-234-225-223.hsd1.ct.comcast.net. [71.234.225.223]) by smtp.googlemail.com with ESMTPSA id pl7sm29517450wic.4.2015.09.30.06.06.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Sep 2015 06:06:07 -0700 (PDT) Message-ID: <560BDE3E.9070806@dev.mellanox.co.il> Date: Wed, 30 Sep 2015 09:06:06 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "Hefty, Sean" , "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH librdmacm] examples/r[io]stream.c: Better handling of rpoll errors during client async rconnect Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rather than silently exiting when connection is refused by server, print error message (Connection refused) during async rconnect at client. Signed-off-by: Hal Rosenstock --- -- 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 diff --git a/examples/riostream.c b/examples/riostream.c index c12dd0d..b6c9f86 100644 --- a/examples/riostream.c +++ b/examples/riostream.c @@ -470,8 +470,10 @@ static int client_connect(void) fds.fd = rs; fds.events = POLLOUT; ret = do_poll(&fds, poll_timeout); - if (ret) + if (ret) { + perror("rpoll"); goto close; + } len = sizeof err; ret = rgetsockopt(rs, SOL_SOCKET, SO_ERROR, &err, &len); diff --git a/examples/rstream.c b/examples/rstream.c index d93e9aa..4b76bbc 100644 --- a/examples/rstream.c +++ b/examples/rstream.c @@ -469,8 +469,10 @@ static int client_connect(void) fds.fd = rs; fds.events = POLLOUT; ret = do_poll(&fds, poll_timeout); - if (ret) + if (ret) { + perror("rpoll"); goto close; + } len = sizeof err; ret = rs_getsockopt(rs, SOL_SOCKET, SO_ERROR, &err, &len);