From patchwork Fri Jun 27 15:28:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernard Metzler X-Patchwork-Id: 4436181 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 90707BEEAA for ; Fri, 27 Jun 2014 15:28:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7D9920172 for ; Fri, 27 Jun 2014 15:28:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 781832038D for ; Fri, 27 Jun 2014 15:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753469AbaF0P23 (ORCPT ); Fri, 27 Jun 2014 11:28:29 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:34090 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbaF0P23 (ORCPT ); Fri, 27 Jun 2014 11:28:29 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jun 2014 16:28:27 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Jun 2014 16:28:25 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 633D51B0805F for ; Fri, 27 Jun 2014 16:28:57 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5RFSOg733882362 for ; Fri, 27 Jun 2014 15:28:24 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5RFSN4p022508 for ; Fri, 27 Jun 2014 11:28:24 -0400 Received: from d06ml359.portsmouth.uk.ibm.com (d06ml359.portsmouth.uk.ibm.com [9.149.76.147]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5RFSNKg022502; Fri, 27 Jun 2014 11:28:23 -0400 In-Reply-To: <1403881360-32168-1-git-send-email-metze@samba.org> References: <1403881360-32168-1-git-send-email-metze@samba.org> Subject: Re: [PATCH] siw_cm: use to_sockaddr_in() also within dprint() statements X-KeepSent: B6C9720B:1B898531-C1257D04:0054F1BE; type=4; name=$KeepSent To: Stefan Metzmacher Cc: linux-rdma@vger.kernel.org X-Mailer: IBM Notes Release 9.0 SHF141 June 05, 2013 Message-ID: From: Bernard Metzler Date: Fri, 27 Jun 2014 17:28:23 +0200 X-MIMETrack: Serialize by Router on D06ML359/06/M/IBM(Release 8.5.3FP5IF1HF3|November 07, 2013) at 27/06/2014 17:28:23 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14062715-0542-0000-0000-000009B3BF7D 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=unavailable 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 Stefan, Thanks! Done. Bernard. From: Stefan Metzmacher To: Bernard Metzler Cc: Stefan Metzmacher , linux-rdma@vger.kernel.org Date: 06/27/2014 05:03 PM Subject: [PATCH] siw_cm: use to_sockaddr_in() also within dprint() statements Signed-off-by: Stefan Metzmacher --- softiwarp/siw_cm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) remote_addr).sin_addr.s_addr), + ntohs(to_sockaddr_in(id->remote_addr).sin_port)); laddr = (struct sockaddr *)&id->local_addr; raddr = (struct sockaddr *)&id->remote_addr; @@ -1832,9 +1832,9 @@ int siw_create_listen(struct iw_cm_id *id, int backlog) "raddr(id) : ipv4=%d.%d.%d.%d, port=%d\n", id, l_ip[0], l_ip[1], l_ip[2], l_ip[3], - ntohs(id->local_addr.sin_port), + ntohs(to_sockaddr_in(id-> local_addr).sin_port), r_ip[0], r_ip[1], r_ip[2], r_ip[3], - ntohs(id->remote_addr.sin_port)); + ntohs(to_sockaddr_in(id-> remote_addr).sin_port)); in_dev = in_dev_get(sdev->netdev); if (!in_dev) { -- 1.9.1 -- 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/softiwarp/siw_cm.c b/softiwarp/siw_cm.c index ad3d617..e4d97bb 100644 --- a/softiwarp/siw_cm.c +++ b/softiwarp/siw_cm.c @@ -1303,10 +1303,10 @@ int siw_connect(struct iw_cm_id *id, struct iw_cm_conn_param *params) id, QP_ID(qp), sdev->ofa_dev.name, sdev->netdev-> name); dprint(DBG_CM, "(id=0x%p, QP%d): laddr=(0x%x,%d), raddr= (0x%x,%d)\n", id, QP_ID(qp), - ntohl(id->local_addr.sin_addr.s_addr), - ntohs(id->local_addr.sin_port), - ntohl(id->remote_addr.sin_addr.s_addr), - ntohs(id->remote_addr.sin_port)); + ntohl(to_sockaddr_in(id-> local_addr).sin_addr.s_addr), + ntohs(to_sockaddr_in(id->local_addr).sin_port), + ntohl(to_sockaddr_in(id->