From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BBB6C4727C for ; Tue, 29 Sep 2020 21:38:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26827208B8 for ; Tue, 29 Sep 2020 21:38:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="ZiL6RMCx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728078AbgI2Vim (ORCPT ); Tue, 29 Sep 2020 17:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727740AbgI2Vim (ORCPT ); Tue, 29 Sep 2020 17:38:42 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498C6C0613D0 for ; Tue, 29 Sep 2020 14:33:21 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id y14so4951639pgf.12 for ; Tue, 29 Sep 2020 14:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=81yt8ZHlFhcARm41HNGZ/DZyWQhRW0xQVcOhh7Pi6lI=; b=ZiL6RMCxIS0x4e/28fGvgLIO3bc0RWETe02fnjs2DOOThBuu9FWdKQzR+qctXqT4b7 H4fEszS3FklcqMe2ZX1kig3TWC1MCOrRTJHfaS8+jAgkx8JFqYbjSjFV8L4Hbc+sWHbg h30gXTztUthsfuzwzb1vUDXmVUvH3fU7+Ilc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=81yt8ZHlFhcARm41HNGZ/DZyWQhRW0xQVcOhh7Pi6lI=; b=rlR2HfF84Ga1n4aZAgZzVDATMFH5mvNxxZva6HW5sjNt8E0/JJEOmUjS7UsO3aYI5e ZBJQG553LhimOpy1c7fANPjNYgK7B3d/x3REfAnxN+WRog+aVRj/7S4HNGIvMhP5Z8ci tE/SLK3OTb4/4+BWjWvDjAk98+SxZuE4OjoA5mREf/ZZj4N+KujNyFk5j1QaWNJGtbcV VwpkNGJHGALv3b4x5zNoj1KtSPQCKR0lQQlGxOXiddVTsnwgeDKHDFZ1kJ5aLpD9rKze mhBpmMj1G3L5oJLulD6JHc7xi6lACFpJK4IY6gSaM8o9Kgkn8nccPO0y8LvO0pGlgD/d aXhQ== X-Gm-Message-State: AOAM532ZumoyWIGSThWVckKEpFf9FQkAO1ZZPrlIjIF54PV0PS17jb4R yZw0i8F85RYYS7nn5z1PHa1+p7aU4V1Z3oOk14c= X-Google-Smtp-Source: ABdhPJzipes+rLaQtByVJl6CBRoAQsRne69PwVXOghof2f+F8hkzkw0oooMiAhZTW/SsIUWkK74eCA== X-Received: by 2002:a65:454c:: with SMTP id x12mr4902263pgr.101.1601415200632; Tue, 29 Sep 2020 14:33:20 -0700 (PDT) Received: from [10.230.185.151] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id z63sm6130938pfz.187.2020.09.29.14.33.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 14:33:19 -0700 (PDT) Subject: Re: [PATCH 1/2] scsi: fc: Update statistics for host and rport on FPIN reception. To: Shyam Sundar , Nilesh Javali , "martin.petersen@oracle.com" Cc: "linux-scsi@vger.kernel.org" , GR-QLogic-Storage-Upstream , James Smart References: <20200730061116.20111-1-njavali@marvell.com> <20200730061116.20111-2-njavali@marvell.com> <31d735ac-90d6-a601-0d8e-c15739684d23@broadcom.com> <1230F28E-B730-4022-B4CA-6A47C49F15FD@marvell.com> From: James Smart Message-ID: Date: Tue, 29 Sep 2020 14:33:18 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <1230F28E-B730-4022-B4CA-6A47C49F15FD@marvell.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000032e2c305b07a8810" Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org --00000000000032e2c305b07a8810 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US On 9/28/2020 1:07 PM, Shyam Sundar wrote: > I am open to removing the accounting against the "detecting" port for now, given that currently, there are no known implementations where the N_Port initiates the FPIN ELS. > Let me know what you think. Ok - let's not change counters on the "detecting" port. > > I guess this is ok - but it makes it hard for administrators. I believe > this is the list of the other nports (aka npiv) on the "attached port" > that is generating the error. In that respect, it is correct to > increment their counters - but I hope that an administrator knows that > may resolve to a single physical port with only 1/N the error count. > From our use case in linux, as an initiator, to match an rport it must > be a target port using npiv and from our point of view we don't know > that they are all sharing the same physical port. > > Shyam: I agree. But with the information in hand, I am not sure how we could do this better at this point. Agree - we'll leave it as is. > > Question: I know we've been asked to log the fpins to the kernel log. > Holding on to the counts and so is good, but it still loses some of the > relationship of the detected port (what detected what attached port). > What's your thinking on it. Should it be something in these common > routines and enabled/disabled by a sysfs toggle ? > > Shyam: So far, I have been looking at it from the point of gathering and maintain the error stats, closest to the source of their origin. > So irrespective of if an error was "detected" by the Nx_Port itself, or by the F_Port attached to it, we are pointing the administrator towards the Nx_Port (by accounting for the error and tying it to that port). > > Having said that, I do not think I completely grasp the essence of your question here, and your proposal of turning it on/off. Could you please elaborate. I'm saying that we have no idea who the "detecting" port was in all of the statistics. At least, by not counting the detecting port, we know that anything that has counters incrementing was generating the issue.   I don't know how important it is to know the detecting port - if switch/fabric, it probably doesn't matter. If an NxPort, it may be interesting to know.  We also have no idea if all the counter updates occurred in 1 fpin, or in N fpins.    What I was suggesting was to log something like "FPIN  ", with one per descriptor type in the FPIN.  We could default this logging off, and change a tunable to turn it on. However, I feel like I'm trying to hard for this - so let's just ignore it. We can always add it in the future. > > All the other comments make sense to me. I'll roll them in and send out another patchset shortly. > > Regards > Shyam > > Sounds good.  Thanks -- james --00000000000032e2c305b07a8810 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQPwYJKoZIhvcNAQcCoIIQMDCCECwCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2UMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAH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