From patchwork Tue Jun 6 18:07:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert LeBlanc X-Patchwork-Id: 9769491 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 88C8160353 for ; Tue, 6 Jun 2017 18:08:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85D3D2846F for ; Tue, 6 Jun 2017 18:08:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 791C628500; Tue, 6 Jun 2017 18:08:59 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 0BC562846F for ; Tue, 6 Jun 2017 18:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbdFFSIj (ORCPT ); Tue, 6 Jun 2017 14:08:39 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35126 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbdFFSHd (ORCPT ); Tue, 6 Jun 2017 14:07:33 -0400 Received: by mail-pg0-f67.google.com with SMTP id f127so13657900pgc.2 for ; Tue, 06 Jun 2017 11:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leblancnet-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3cNrax7aauVkUgUnW7g4NmEDXjMfQ5gWStkB8xk5IBQ=; b=Bj3HqInH3PRoN1aCJEG31Y1i8AQnVZ6ht+FwuFsjpGzn9fTzlvnBVkVq/unYb2guxy cl0uYu/ENiMTCNpIjip3pUsb1G1ZOOeGo/sXza2g3d3iPzmrBRpHYh8FXqotgsaoKaGy xBJ53hyAdEC+DNT/QCcdetgEj2MXSOBx7sLo/j/aY2NAx5ajmQrLh72WW/9KOk+Dy0PV agyedV2+498LNHAFtKto7qAPsY/NF87C+UFrk4D0HvP1k6ZWFit+uBuyQRT1BTsnc0UE RA9zBqikKyEFpM1nz3jSayxmeXfzk/0GsEKFlPNhwZvi6QCZWuUjjUsO7T/ocMv3HIVS E5yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3cNrax7aauVkUgUnW7g4NmEDXjMfQ5gWStkB8xk5IBQ=; b=gZGTrW2gCNG396R9cYV/BrXBJckVLnPnedhF5BnqPsVZ9BEDuWtENaiBwYmHJMNOo4 Oh8oGltBuFWcxBQnhK1XYHOAruhMWPJTF20xyYJg6cnrG6eCqpiLFMXnE7nVvLzOs4s8 dgAj3mPytZojt6lc9MvuUn/f6j2Cnavt5qaAvhWqPh3rTWtLbLqM8uibyfhihqyisugs qcCEjDYXJuiyEIYFIB/KhN8jXhVGIqKYbtTMrgTlGLDJJRMx+iKggj9XrDuRixXELM4+ /j4nyYMLnFUDAuQX5uLE5XTLezJbc0tsDH+yujHYI012Vsyp8KO+wC4QEiVT/c1ssBha GZIQ== X-Gm-Message-State: AODbwcDHu6lEtOgHZiVBZcLHXBamv6bdDqpXFrmH+jMxSiB7TvaBQDLL Xn6sjpQ33HWrJ2Ft X-Received: by 10.98.85.130 with SMTP id j124mr21891122pfb.196.1496772452676; Tue, 06 Jun 2017 11:07:32 -0700 (PDT) Received: from rleblanc-pc ([2604:ba00:2:1:1043:d22c:d907:91b1]) by smtp.gmail.com with ESMTPSA id r73sm60623083pfk.114.2017.06.06.11.07.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Jun 2017 11:07:29 -0700 (PDT) Received: from rleblanc by rleblanc-pc with local (Exim 4.89) (envelope-from ) id 1dIIt6-0001Jv-DW; Tue, 06 Jun 2017 12:07:28 -0600 From: Robert LeBlanc To: lduncan@suse.com Cc: cleech@redhat.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, ogerlitz@mellanox.com, sagi@grimberg.me, roid@mellanox.com, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org, subbu.seetharaman@broadcom.com, ketan.mukadam@broadcom.com, jitendra.bhivare@broadcom.com, QLogic-Storage-Upstream@qlogic.com, varun@chelsio.com, Robert LeBlanc Subject: [PATCH 6/7] scsi/cxgbi: Update cxgbi_ep_connect to accept iface and sockaddr_storage. Date: Tue, 6 Jun 2017 12:07:16 -0600 Message-Id: <20170606180717.5007-7-robert@leblancnet.us> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606180717.5007-1-robert@leblancnet.us> References: <20170606180717.5007-1-robert@leblancnet.us> 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 Update Chelsio iSCSI driver to accept the session iface for creating the iSCSI connection. Also accept dst_addr as sockaddr_storage instead of sockaddr. Signed-off-by: Robert LeBlanc --- drivers/scsi/cxgbi/libcxgbi.c | 15 ++++++++------- drivers/scsi/cxgbi/libcxgbi.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index bd7d39ecbd24..62f62305be49 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c @@ -2499,8 +2499,9 @@ int cxgbi_get_host_param(struct Scsi_Host *shost, enum iscsi_host_param param, EXPORT_SYMBOL_GPL(cxgbi_get_host_param); struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *shost, - struct sockaddr *dst_addr, - int non_blocking) + struct sockaddr_storage *dst_addr, + int non_blocking, + struct iface_rec *iface) { struct iscsi_endpoint *ep; struct cxgbi_endpoint *cep; @@ -2520,15 +2521,15 @@ struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *shost, } } - if (dst_addr->sa_family == AF_INET) { - csk = cxgbi_check_route(dst_addr); + if (dst_addr->ss_family == AF_INET) { + csk = cxgbi_check_route((struct sockaddr *)dst_addr); #if IS_ENABLED(CONFIG_IPV6) - } else if (dst_addr->sa_family == AF_INET6) { - csk = cxgbi_check_route6(dst_addr); + } else if (dst_addr->ss_family == AF_INET6) { + csk = cxgbi_check_route6((struct sockaddr *)dst_addr); #endif } else { pr_info("address family 0x%x NOT supported.\n", - dst_addr->sa_family); + dst_addr->ss_family); err = -EAFNOSUPPORT; return (struct iscsi_endpoint *)ERR_PTR(err); } diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index 18e0ea83d361..e2e0c4dc7abc 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h @@ -596,7 +596,7 @@ int cxgbi_set_host_param(struct Scsi_Host *, enum iscsi_host_param, char *, int); int cxgbi_get_host_param(struct Scsi_Host *, enum iscsi_host_param, char *); struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *, - struct sockaddr *, int); + struct sockaddr_storage *, int, struct iface_rec *); int cxgbi_ep_poll(struct iscsi_endpoint *, int); void cxgbi_ep_disconnect(struct iscsi_endpoint *);