Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3658520imm; Mon, 30 Jul 2018 00:47:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeWPrYCvbvwUCG+W4qHc83YJ4RIEchkpoTV6+naemqso9yVmhuf+mp3ZxT1ZMVkx/QBRmAy X-Received: by 2002:a62:8a4f:: with SMTP id y76-v6mr16954136pfd.233.1532936865691; Mon, 30 Jul 2018 00:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532936865; cv=none; d=google.com; s=arc-20160816; b=ldZVgbveo9MJrrmjAq4Lrs4Yv99Y5Xc7+Onrr/TkwItO1zRXydSGTfBH0EPp8zMN++ Q0NpQbCTdhKB9w2vuV6Bb30Xtv1LedNzXP+boTU18n/fyfwL/N0M+hzp4DCsqNzLk+8e X7ywWOc7KwVQSiWBa3m3wIRGonLlis0GHYmD8r0OBpOjXjPfIUEbkZXvK6wJEqnD98Dn Sq3Ij9CeyS7cdpeZYoUU+UGVTzNMbq3RbFzo53utUVrAskfs6R/KOuxORTcPRMJAO0nC dxH4hW82bKQli//8VTxf6ETQd9Ym9CvLQk9f/nj+6lnRVaHfhj1O/x0Te5tmEHY40+ba 36LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=gqTaQ+sStFKltwlvDEj6Zb8Sg+U7k30viwdPKn9FsN0=; b=GJLsYAyjem820ag4kJfevn/taXIlqV+QbiKLqozIAb5rPwQurCA1Jad38K/qkFPM/d o+mqgLurPSJvej/FiPaEpsq0HdTQbN6XiuONh+AataXwRVll+N8RJJ3QgUJvbLITXf1l SE5gThkdNYpyG7FfaUQD937cNgZZWdBJ0uLEI13c/FViasHrqSpoEeCgseg6KYW+7b2y QZlpOVHq/LyXBxT76hukTOsng5jITfIJ/TsZO21cRedoY5CSzEo3hZK90SsHgN0e9vO7 OE/WzuWMcUerSk6jO3gt5Hhto5TBSsS62MDtrC3iHEXdA2aVLMfyKDATkqYcH7lBJ63J NAWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=bXtwZSnQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=Bf8yM36o; 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 f12-v6si10551256pgm.601.2018.07.30.00.47.31; Mon, 30 Jul 2018 00:47:45 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=bXtwZSnQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=Bf8yM36o; 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 S1726651AbeG3JTv (ORCPT + 99 others); Mon, 30 Jul 2018 05:19:51 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:44146 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726486AbeG3JTu (ORCPT ); Mon, 30 Jul 2018 05:19:50 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EB9716034F; Mon, 30 Jul 2018 07:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532936767; bh=MbgmtupYDTeVSnc8rmFt48Zq8EJTSg020yRqwfVnTBE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=bXtwZSnQXeE7AAm6NjdiI/sPwl7astf+NcXYx1oWlaWt3kDlBYbLVlP0Q7dZFPWC8 H66X4CfTb25Mmq1F7iDNcMiU6/3yAe3B1AwdlCCvv29CqNMv79GrERvCA2lXhSSSA6 RxezhUGa6PC/msket66cppPy6QkvyCcpzqs4Zt2U= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.206.24.124] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sayalil@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0A7AB6034F; Mon, 30 Jul 2018 07:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532936766; bh=MbgmtupYDTeVSnc8rmFt48Zq8EJTSg020yRqwfVnTBE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Bf8yM36oZy3tcmYlit1zLoDGVHnoNB/kTLMfnVEWpvYUvigr+i5fEa1kvpcIy5YxT eToGav4vzdkG7wAdPPGo5Oz4QXu2fkvOazmnlsLdj6i+2XdhWuQa9W0MRn+yIvGqUn 0IUnSTtMPHgtU44S2MT9Mhm3ycJ+KuliLbxwqQYQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0A7AB6034F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sayalil@codeaurora.org Subject: Re: [PATCH V5 2/2] scsi: ufs: Add configfs support for ufs provisioning To: Evan Green , Bart.VanAssche@wdc.com Cc: Vinayak Holikatti , linux-kernel@vger.kernel.org, asutoshd@codeaurora.org, riteshh@codeaurora.org, cang@codeaurora.org, martin.petersen@oracle.com, subhashj@codeaurora.org, linux-scsi@vger.kernel.org, vivek.gautam@codeaurora.org, Rajendra Nayak , jejb@linux.vnet.ibm.com References: <1530858040-13971-1-git-send-email-sayalil@codeaurora.org> <1530858040-13971-3-git-send-email-sayalil@codeaurora.org> <0dce9e9c-4f93-9857-72ee-f65ff195c41a@codeaurora.org> <4cb931e199599314829f5ff750797c88fc123f1f.camel@wdc.com> From: Sayali Lokhande Message-ID: <8e6af8ed-1ec0-f10e-69b2-08281b638a4b@codeaurora.org> Date: Mon, 30 Jul 2018 13:16:00 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Evan, On 7/18/2018 1:53 AM, Evan Green wrote: > On Mon, Jul 16, 2018 at 5:04 PM Bart Van Assche wrote: >> On Mon, 2018-07-16 at 16:46 -0700, Evan Green wrote: >>> I see Bart has chimed in on the next series with a suggestion to break >>> out each field into individual files within configfs. Bart, what are >>> your feelings about converting to a binary attribute? I remember when >>> I did my sysfs equivalent of this patch, somebody chimed in indicating >>> a "commit" file might be needed so that the new configuration could be >>> written in one fell swoop. One advantage of the binary attribute is >>> that it writes the configuration atomically. >> Hello Evan, >> >> I may be missing some UFS background information. But since a configfs interface >> is being added I think the same rule applies as to all Linux kernel user space >> interfaces, namely that it should be backwards compatible. Additionally, if >> anyone ever will want to use this interface from a shell script, I think that >> it will be much easier to write multiple ASCII attributes than a single binary >> attribute. >> > Hi Bart, > I'm unsure about the compatibility aspect for binary attributes that > essentially represent direct windows into hardware. I suppose this > comes down to who this interface is most useful to. Hypothetically > lets say a future revision of UFS adds fields to the configuration > descriptor, but is otherwise backwards compatible. If this interface > is primarily for OEMs initializing their devices in the factory, then > I'd argue they'd want the most direct window to the configuration > descriptor. These folks probably just have a configuration they want > to plunk into the hardware, and would prefer being able to write all > fields over having some sort of compatibility restriction. If, on the > other hand, this is used by long-running scripts that stick around for > years without modification, then yes, it seems like it would be more > important to stay compatible, and have smarts in the kernel to make > writes of old descriptors work in new devices. > > At least for myself, I fall into the category of someone who just > needs to plunk a configuration descriptor in once, and would prefer > not to have to submit kernel changes if the descriptor evolves > slightly. It also seemed a little odd that this patch now spends a > bunch of energy converting ASCII into bytes, just to write it without > modification into the hardware, and convert back again to ASCII for > reads. > > We plan to use a script for provisioning, and could easily handle > ASCII or rawbytes: > > # Some bytes, ready to go with the interface today... > some_bytes="00 01 02 03" > > # Same bytes, now in binary format > bytes_fmt=$(echo " $some_bytes" | sed 's/ /\\x/g') > /usr/bin/printf "$bytes_fmt" > /configfs/ufs_provision > > I'm not dead set on binary, since as above I could do it either way, > but it seemed worth at least talking through. Let me know what you > think. > -Evan I am using ASCII format for reading/writing to config desc as it will be more readable for users and easier/comfortable to compare any value to default spec value(if required). So I don't really see any harm in using current ASCII format for provisioning purpose. -Sayali