Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp116747lqm; Mon, 10 Jun 2024 14:54:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQecLBNkFW9FDJDOtc1MlmMF5TT4I+iH6oFf/gn07nFvbOs3SOlTeOhhTSPx8XyEzbnxFcLdUUVW7mPyGr1cyPB69Pn/vw2Rwf4hueww== X-Google-Smtp-Source: AGHT+IG/I14YcfHggStANghsyCpZj+4CRnjJrLQJicjOf6kwG4cPAPLoSZE5bnqMC0rnLGR0zFLD X-Received: by 2002:a17:902:e84a:b0:1f7:37f:728d with SMTP id d9443c01a7336-1f7037f75d2mr65053685ad.10.1718056476437; Mon, 10 Jun 2024 14:54:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718056476; cv=pass; d=google.com; s=arc-20160816; b=cSNYQrjK934Shkso8wm/H8gIcX2FslRJajdZlZsmFK+n4j79C37YmVIK1leXI8WJOK iamiqsfMbIuwBr3WyhN6MitWTkjGfcsXyK8RLSShZrE+Wig8pmaMaNnVW6zLh8IabqG2 2hC6x0XT2wUlweiXnMMr6R5RL3JMdAGsYknOLeqqtWxma8dTGpuRUMlAsj5+hHlAQTSR M4fiNfnvIg3GTxXPBtRQc4dDhvpPSUNVWozqD2LcSh9Wu4L2ZoW1/E1689R6DO/COWBG a/uLFggc/GaIMkCV3vGhfAZdqwobqiav9f/3OZZKrIwZHt/n4X84JmJjA86D7wxfBapM d+Ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=+/+1WZ9Qli7ENIFuydnVAiZxGbcQ1OYsf5kSIXdQmPU=; fh=bKSAdOD9sjDLFpuVEw2QY/iOhn17PgYAzgX/PkCBS1w=; b=uUP678RphRqaQMYo7CCd+yrOlyuhJNRgwFHkkzZv3MyU7i96xpyZhByqS1gzwa6DAu iPRF7NrH3SWXQ6cxf/434tJxpYGywLh3D+VYajaJTcLFjzS6OzVw77CShs1tGGBja4Rm ALrp9hevfb34vrQkpEUck0IRkU/Awgq+Jst3j1LnddeZwBSmMVVo5dxk05pJXZg648iq Z6WTb9lOc57yoX+DCSAmzZNw0UqpZV4fUaaLphQ2n+8B/9QitLaAtJBk7E7RPc3oqdqQ +qTLp61ytLOmMPvQ305LzoErBLySOMaHJiGqaQKNTxG5C85Lj8Qk0AtDS/a2JyeA0r6b afTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b="LJnmf/8Q"; arc=pass (i=1 spf=pass spfdomain=cisco.com dkim=pass dkdomain=cisco.com dmarc=pass fromdomain=cisco.com); spf=pass (google.com: domain of linux-kernel+bounces-208950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cisco.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f6ebb909adsi43840055ad.377.2024.06.10.14.54.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 14:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b="LJnmf/8Q"; arc=pass (i=1 spf=pass spfdomain=cisco.com dkim=pass dkdomain=cisco.com dmarc=pass fromdomain=cisco.com); spf=pass (google.com: domain of linux-kernel+bounces-208950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cisco.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BE0B4B22E8E for ; Mon, 10 Jun 2024 21:52:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 872C414F11E; Mon, 10 Jun 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cisco.com header.i=@cisco.com header.b="LJnmf/8Q" Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAD46142620; Mon, 10 Jun 2024 21:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.37.142.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718056351; cv=none; b=rptub9SeSDiOX4d9Ejstg6TlG2156LlUf3d7EBF9t+ZAzMqu95DriJC65oe2CL2QjvSRdxuy7A/GRVkOFC0w+ogq/ZbfpIEJpEcstDwTu9R0um0iq/HpZVA4Jmb61MLDdB6+wpx/feIGnIfjQMjjrGZTCeXQj5HqL+3q+PPBALY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718056351; c=relaxed/simple; bh=20dF36tyLYMvukAEs6/ZOMhFZal8fnBiTzHawZxFwC4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=EUi7t3QO7S8xWKgzIWnk4L++jg97XIZ+kdqV3DlbINFVIzwun4XzXzoRbvExkpcBRjKLNZdjrrFSJGQnzOWI27WffRqsIDPxam+M1CZYkbs982Lbc89PJyp2t47zINl1DJq4I1BBj8hfrYICBZUUlZh2icakCF80BXDogSFLWd8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cisco.com; spf=pass smtp.mailfrom=cisco.com; dkim=pass (1024-bit key) header.d=cisco.com header.i=@cisco.com header.b=LJnmf/8Q; arc=none smtp.client-ip=173.37.142.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cisco.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cisco.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=4768; q=dns/txt; s=iport; t=1718056349; x=1719265949; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+/+1WZ9Qli7ENIFuydnVAiZxGbcQ1OYsf5kSIXdQmPU=; b=LJnmf/8QaVoac5gl5OdLO+m7+yccDigrqF5XlUQT0udug3Tux5d3SWp/ yKm7Q+sRV73Zo+1nWeYGbO7qSSha9DOZw/CQr/2GZVlx867nEvEcX+SVK PGFZp4gn1VaqZYraXnK0XvqEk9HAyS7YhDcbfoFGCH5mg/TiFiQkP6Sf1 s=; X-CSE-ConnectionGUID: bV5CvFE1SweijZFgi/Hwvg== X-CSE-MsgGUID: 7brQSmZHTfmbJqkBrOt6rw== X-IronPort-AV: E=Sophos;i="6.08,227,1712620800"; d="scan'208";a="294807107" Received: from alln-core-4.cisco.com ([173.36.13.137]) by alln-iport-5.cisco.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 21:51:20 +0000 Received: from localhost.cisco.com ([10.193.101.253]) (authenticated bits=0) by alln-core-4.cisco.com (8.15.2/8.15.2) with ESMTPSA id 45ALpBCO012699 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 10 Jun 2024 21:51:19 GMT From: Karan Tilak Kumar To: sebaddel@cisco.com Cc: arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com, mkai2@cisco.com, satishkh@cisco.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Karan Tilak Kumar Subject: [PATCH 00/14] Introduce support for feature Fabric Discovery and Date: Mon, 10 Jun 2024 14:50:46 -0700 Message-Id: <20240610215100.673158-1-kartilak@cisco.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-User: kartilak@cisco.com X-Outbound-SMTP-Client: 10.193.101.253, [10.193.101.253] X-Outbound-Node: alln-core-4.cisco.com Hi Martin, reviewers, This cover letter describes the feature: add support for Fabric Discovery and Login Services (FDLS) to fnic driver. This functionality is needed to support port channel RSCN (PC-RSCN) handling and serves as a base to create FC-NVME initiators (planned later), and eCPU handling (planned later). It is used to discover the fabric and target ports associated with the fabric. It will then login to the target ports that are zoned to it. The driver uses the tport structure presented by FDLS. Port channel RSCN is a Cisco vendor specific RSCN event. It is applicable only to Cisco UCS fabrics. In cases where the eCPU in the UCS VIC (Unified Computing Services Virtual Interface Card) hangs, a fabric log out is sent to the fabric. Upon successful log out from the fabric, the IO path is failed over to a new path. Generally from a feature perspective, the code is divided into adding support for this functionality initially. Then, code has been added to modify the IO path and interfaces. Finally, support for port channel RSCN handling has been added. Here are the headers of some of the salient patches: o add headers and definitions for FDLS o add support for fabric based solicited requests and responses o add support for target based solicited requests and responses o add support for unsolicited requests and responses o add support for FDMI o add support for FIP o add functionality in fnic to support FDLS o modify IO path to use FDLS and tport o modify fnic interfaces to use FDLS o add support to handle port channel RSCN Even though the patches have been made into a series, some patches are heavier than others. But, every effort has been made to keep the purpose of each patch as a single-purpose, and to compile cleanly. All the individual patches compile cleanly. There are some unused function warnings, but since the function calls happen in later patches, those warnings go away. This patchset has been tested as a whole. Therefore, the tested-by fields have been added only to one patch in the set. I've refrained from adding tested-by to most of the patches, so as to not mislead the reviewer/reader. A brief note on the unit tests: o. Perform zone in zone out testing in a loop: remove a target port from the zone, add it to the zone in a loop. 1000+ iterations of this test have been successful. o. Configure multipathing, and run link flaps on single link. IOs drop briefly, but pick up as expected. o. Configure multipathing, and run link flaps on two links, with a 30 second delay in between. IOs drop briefly, but pick up as expected. o. Module load/unload test. o. Repeat the above tests with 1 queue and 64 queues. All tests were successful. Please consider this patch series for the next merge window. Thanks and regards, Karan Karan Tilak Kumar (14): scsi: fnic: Replace shost_printk with pr_info/pr_err scsi: fnic: Add headers and definitions for FDLS scsi: fnic: Add support for fabric based solicited requests and responses scsi: fnic: Add support for target based solicited requests and responses scsi: fnic: Add support for unsolicited requests and responses scsi: fnic: Add and integrate support for FDMI scsi: fnic: Add and integrate support for FIP scsi: fnic: Add functionality in fnic to support FDLS scsi: fnic: Modify IO path to use FDLS scsi: fnic: Modify fnic interfaces to use FDLS scsi: fnic: Add stats and related functionality scsi: fnic: Code cleanup scsi: fnic: Add support to handle port channel RSCN scsi: fnic: Increment driver version drivers/scsi/fnic/Makefile | 5 +- drivers/scsi/fnic/fdls_disc.c | 3942 +++++++++++++++++++++ drivers/scsi/fnic/fdls_fc.h | 548 +++ drivers/scsi/fnic/fip.c | 900 +++++ drivers/scsi/fnic/fip.h | 341 ++ drivers/scsi/fnic/fnic.h | 216 +- drivers/scsi/fnic/fnic_attrs.c | 12 +- drivers/scsi/fnic/fnic_debugfs.c | 30 +- drivers/scsi/fnic/fnic_fcs.c | 1775 ++++------ drivers/scsi/fnic/fnic_fdls.h | 371 ++ drivers/scsi/fnic/fnic_io.h | 14 +- drivers/scsi/fnic/fnic_isr.c | 28 +- drivers/scsi/fnic/fnic_main.c | 670 ++-- drivers/scsi/fnic/fnic_pci_subsys_devid.c | 133 + drivers/scsi/fnic/fnic_res.c | 76 +- drivers/scsi/fnic/fnic_scsi.c | 1406 +++++--- drivers/scsi/fnic/fnic_stats.h | 48 +- drivers/scsi/fnic/fnic_trace.c | 83 +- 18 files changed, 8640 insertions(+), 1958 deletions(-) create mode 100644 drivers/scsi/fnic/fdls_disc.c create mode 100644 drivers/scsi/fnic/fdls_fc.h create mode 100644 drivers/scsi/fnic/fip.c create mode 100644 drivers/scsi/fnic/fip.h create mode 100644 drivers/scsi/fnic/fnic_fdls.h create mode 100644 drivers/scsi/fnic/fnic_pci_subsys_devid.c -- 2.31.1