Received: by 10.213.65.68 with SMTP id h4csp553139imn; Fri, 6 Apr 2018 05:11:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FkGmpD3p65AcLy2Co1w0w8g1rXHJKDhBYHNbHSs5zaRLxMtdEq2mBySbOWZAcmhltU2fD X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr27625449plb.338.1523016660268; Fri, 06 Apr 2018 05:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523016660; cv=none; d=google.com; s=arc-20160816; b=efciBz7yotPmfSRl70QeEc5FPZfdJmcMzZNYJhV1au2CUICcFNWzQyiA/gDgM2mAiq EuC/RdoK5jXmbQF/aSLhX961h2ZCjFZ7EwhB8M/p8H6lulJ1derNcXVufN+TCmfvMNQp FjI1E6Co6NKh9XDXL6UXwsG/Qxs66IKfpEWuT8m6GbnoBlOJfuDv4/lguR28Rh0eZqeO b/+dp2YO/DnqiSBlwthAa7ZXckaPMRTfrqP99cy3zd1sBQr25UbSXPwPn+4bgp+ihbl1 AxCrYfwF7ZHW0Wru5T/ffLGHfHNOvzllsuset/I9+cs/diB+AdLrZnud9qEUFIBd16J+ mSqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=Tnfm0u7ZMIhftjdPr3znwS/r9mSLD6clU3ieyITbTts=; b=sID7Li9tUi8t7kEBqUG79qEbAF9vsaqAOCo8NllQKErz3xQB9lN6GaNkaYhfrLHdzy JuSqWezeK4MblxbJmiAoVyVZ6YMmPXGMqk9meg6+xf6cxqGl/+QZafO32KWRH3Xb5lfN +fTYPgcRhOQtWEa/cR6RMU/7ERS9qZOn+5xhX+WJwzROlJbBLzxYydzc8gnFRqetqGLT M1oPdkxn/pvHy2jDGtGCKLA+a/T7PcDHU3X8UpNfcvkBpGPIIdoE2uDsZDD+PkKzrfUR iDkN4e68QOxrV3nGRFaenzQY/BYyBe5pjaiPwhHo5Y0Zyn5BA1KQNVF3sdX+5e88pguY 7gYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14-v6si8522472pls.723.2018.04.06.05.10.46; Fri, 06 Apr 2018 05:11:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752282AbeDFMJi (ORCPT + 99 others); Fri, 6 Apr 2018 08:09:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:45549 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbeDFMJh (ORCPT ); Fri, 6 Apr 2018 08:09:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0DE80AF5E; Fri, 6 Apr 2018 12:09:36 +0000 (UTC) Date: Fri, 6 Apr 2018 14:09:34 +0200 From: David Disseldorp To: Zhang Zhuoyu Cc: nab@linux-iscsi.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] target:separate tx/rx cmd_puds Message-ID: <20180406140934.2dfafd45@suse.de> In-Reply-To: <20180405131212.3f26339d@suse.de> References: <1521625963-657195-1-git-send-email-zhangzhuoyu@cmss.chinamobile.com> <20180405131212.3f26339d@suse.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 5 Apr 2018 13:12:12 +0200, David Disseldorp wrote: > > -CONFIGFS_ATTR_RO(target_stat_tgt_port_, in_cmds); > > +CONFIGFS_ATTR_RO(target_stat_tgt_port_, tx_cmds); > > +CONFIGFS_ATTR_RO(target_stat_tgt_port_, rx_cmds); > > I don't think the in_cmds metric should be deleted here. It could be > calculated on the fly via tx_cmds + rx_cmds + nodata_cmds. @Zhang Zhuoyu: How about something like the following? https://git.samba.org/?p=ddiss/linux.git;a=commitdiff;h=73723ccf433424721830797d70cfb88d4596e0fc ...this keeps the in_cmds metric, and renames tx/rx_cmds read/write_cmds respectively. read/write_cmds is still a bit ambiguous, as it refers to the command data direction rather than SCSI READ/WRITE CDBs, but IMO it's clearer, and more consistent with the read/write_mbytes metrics. Cheers, David