From owner-freebsd-geom@freebsd.org Wed Nov 25 02:27:05 2015 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB060A37F1F; Wed, 25 Nov 2015 02:27:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5EF01097; Wed, 25 Nov 2015 02:27:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C7840B95B; Tue, 24 Nov 2015 21:27:04 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Cc: Adrian Chadd , "Pokala, Ravi" , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" Subject: Re: Low-level trace-buffers in CAM Date: Tue, 24 Nov 2015 18:07:39 -0800 Message-ID: <1676097.ULW1yzL7e7@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Nov 2015 21:27:04 -0500 (EST) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 02:27:06 -0000 On Monday, October 26, 2015 09:52:25 PM Adrian Chadd wrote: > Hi, > > ok. So this is where I create work for people. :-) > > Something I've been tossing up for quite some time is a generic > version of this that exposes a ring-buffer of entries back to > userland. For things like this, things like ALQ/KTR, etc, it's all > just a producer-consumer ring based thing. You don't even care about > multiple readers; that's a userland thing. > > So, I'm a big fan of this. I did this for the ath driver to debug > descriptors and register accesses and it was a big help. I'd really > like to see a more generic way we can expose this data in an efficient > manner! I actually think bpf might not be a bad interface (as I suggested at the vendor summit), though I think we need a way to enumerate BPF taps that aren't network interfaces (if we fix this then we can remove the fake USB ifnets and make glebius@ happy as well). Then you can look at these things in wireshark (which would be a bit bizarre perhaps) -- John Baldwin From owner-freebsd-geom@freebsd.org Wed Nov 25 23:34:39 2015 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C12CEA36CCE; Wed, 25 Nov 2015 23:34:39 +0000 (UTC) (envelope-from rpokala@panasas.com) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0068.outbound.protection.outlook.com [157.56.110.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 925EE1CCD; Wed, 25 Nov 2015 23:34:37 +0000 (UTC) (envelope-from rpokala@panasas.com) Received: from CY1PR08MB1803.namprd08.prod.outlook.com (10.162.218.25) by CY1PR08MB1804.namprd08.prod.outlook.com (10.162.218.26) with Microsoft SMTP Server (TLS) id 15.1.331.20; Wed, 25 Nov 2015 23:18:38 +0000 Received: from CY1PR08MB1803.namprd08.prod.outlook.com ([10.162.218.25]) by CY1PR08MB1803.namprd08.prod.outlook.com ([10.162.218.25]) with mapi id 15.01.0331.019; Wed, 25 Nov 2015 23:18:38 +0000 From: "Pokala, Ravi" To: John Baldwin , "freebsd-hackers@freebsd.org" CC: Adrian Chadd , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" Subject: Re: Low-level trace-buffers in CAM Thread-Topic: Low-level trace-buffers in CAM Thread-Index: AQHREF5W2DCPOIdjUUGMRg6fRJs3w55+pEiAgC2HGoCAANz+gA== Date: Wed, 25 Nov 2015 23:18:37 +0000 Message-ID: <4C8D47C3-CA6C-46DA-A318-98E114B2A506@panasas.com> References: <1676097.ULW1yzL7e7@ralph.baldwin.cx> In-Reply-To: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/0.0.0.151105 authentication-results: spf=none (sender IP is ) smtp.mailfrom=rpokala@panasas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [64.80.217.3] x-microsoft-exchange-diagnostics: 1; CY1PR08MB1804; 5:A6yut9WBvVBgzrYFWRoHofcgqoUxDxfdMadisZQZr3vzOu+W1GR1UhaRS33nIlb5x7tQY4Am+bLflgVwDu4/psUmbIdjTySBOEeFlKEuvXKr2sVeqBSTdWzkdh70NN92aJUQBharyFp+T18phFKUQA==; 24:hNLANSEq4hNx2m7zYkOmQKhUo84RqYRcbq2c7RP6zOE/mvk9iH7DGMfBehjFmPwxW7TQnc3Cou4NMQHa9FGXG/BmT2ibVcOWgcONXselamw= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR08MB1804; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(239227872634102); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(10201501046)(3002001); SRVR:CY1PR08MB1804; BCL:0; PCL:0; RULEID:; SRVR:CY1PR08MB1804; x-forefront-prvs: 0771670921 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(377424004)(377454003)(199003)(13464003)(189002)(24454002)(10400500002)(2900100001)(106116001)(99286002)(4001150100001)(66066001)(36756003)(102836003)(106356001)(5008740100001)(101416001)(1220700001)(5001770100001)(81156007)(4001350100001)(77096005)(83506001)(5004730100002)(76176999)(92566002)(97736004)(105586002)(11100500001)(2501003)(33656002)(3846002)(86362001)(586003)(40100003)(19580405001)(5001960100002)(82746002)(54356999)(50986999)(19580395003)(87936001)(122556002)(189998001)(2950100001)(6116002)(83716003)(5002640100001)(1096002)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR08MB1804; H:CY1PR08MB1803.namprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: panasas.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <0CAB380AABB07C4BB4B80B072D1649AD@namprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2015 23:18:37.8766 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR08MB1804 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 23:34:39 -0000 LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCg0KDQpGcm9tOiBKb2huIEJhbGR3aW4gPGpoYkBm cmVlYnNkLm9yZz4NCkRhdGU6IDIwMTUtMTEtMjQsIFR1ZXNkYXkgYXQgMTg6MDcNClRvOiAiZnJl ZWJzZC1oYWNr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XZpbmcgbWUgYSBtYWpvciBwYXJzZSBl cnJvci4uLg0KDQotUmF2aQ0KDQo+LS0gDQo+Sm9obiBCYWxkd2luDQo= From owner-freebsd-geom@freebsd.org Thu Nov 26 00:21:07 2015 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E565CA37640; Thu, 26 Nov 2015 00:21:07 +0000 (UTC) (envelope-from stas@freebsd.org) Received: from mx0.deglitch.com (cl-414.sto-01.se.sixxs.net [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 945201C63; Thu, 26 Nov 2015 00:21:07 +0000 (UTC) (envelope-from stas@freebsd.org) Received: from [172.27.138.58] (unknown [199.201.64.131]) by mx0.deglitch.com (Postfix) with ESMTPSA id 8F8898FC2D; Wed, 25 Nov 2015 16:20:54 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: Low-level trace-buffers in CAM From: Stanislav Sedov In-Reply-To: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Date: Wed, 25 Nov 2015 16:20:50 -0800 Cc: freebsd-hackers@freebsd.org, Adrian Chadd , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "Pokala, Ravi" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <1676097.ULW1yzL7e7@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3096.5) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:21:08 -0000 > On Nov 24, 2015, at 6:07 PM, John Baldwin wrote: >=20 > I actually think bpf might not be a bad interface (as I suggested at > the vendor summit), though I think we need a way to enumerate BPF taps > that aren't network interfaces (if we fix this then we can remove the > fake USB ifnets and make glebius@ happy as well). Then you can look > at these things in wireshark (which would be a bit bizarre perhaps) This is an interesting idea! Wireshark access does not sound too = bizzare actually -- wireshark supports FC protocol parsing as well as generic = SCSI dissecting. This is immensely useful when debugging FC communication problems, and I can imaging it would be helpful in other situations as = well. On the other hand, if we are talking about generic ring buffer logger with userland access -- isn't DTrace essentialy that? DTrace provides a very efficient data collection framework with the filtering = capabilities not unlike BPF. We can already access most of the information the new = proposed framework hopes to provide without any kernel code modifications = (including raw CDBs), and by adding the missing static DTrace probes we can provide an easy access to the same data both BPF and an ad-hoc framework would = while also giving a flexibility of accessing auxiliary data without code = modifications. This will allow for a pure-userland pcap generation as well (or any kind = of custom reporting). Something to think about as well. -- Stanislav Sedov ST4096-RIPE From owner-freebsd-geom@freebsd.org Thu Nov 26 03:28:16 2015 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EDB2A37519; Thu, 26 Nov 2015 03:28:16 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 539AE1498; Thu, 26 Nov 2015 03:28:15 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-251-140.lns20.per4.internode.on.net [121.45.251.140]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id tAQ3RxZL074102 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Nov 2015 19:28:02 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: Low-level trace-buffers in CAM To: John Baldwin , freebsd-hackers@freebsd.org References: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Cc: Adrian Chadd , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "Pokala, Ravi" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" From: Julian Elischer Message-ID: <56567C39.6050002@freebsd.org> Date: Thu, 26 Nov 2015 11:27:53 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 03:28:16 -0000 On 25/11/2015 10:07 AM, John Baldwin wrote: > On Monday, October 26, 2015 09:52:25 PM Adrian Chadd wrote: >> Hi, >> >> ok. So this is where I create work for people. :-) >> >> Something I've been tossing up for quite some time is a generic >> version of this that exposes a ring-buffer of entries back to >> userland. For things like this, things like ALQ/KTR, etc, it's all >> just a producer-consumer ring based thing. You don't even care about >> multiple readers; that's a userland thing. >> >> So, I'm a big fan of this. I did this for the ath driver to debug >> descriptors and register accesses and it was a big help. I'd really >> like to see a more generic way we can expose this data in an efficient >> manner! > I actually think bpf might not be a bad interface (as I suggested at > the vendor summit), though I think we need a way to enumerate BPF taps > that aren't network interfaces (if we fix this then we can remove the > fake USB ifnets and make glebius@ happy as well). Then you can look > at these things in wireshark (which would be a bit bizarre perhaps) I disagree. the advent of iSCSI makes this a natural thing. I would be very surprised if there were not already patches for wireshark to interpret scsi command blocks. I agree with you on this, it is a very logical way to do it. We may need to define a new form of interface for it but it makes perfect sense.