Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1168946ybk; Wed, 20 May 2020 23:52:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ8eOILnStICqd2Jz+9yMq4dYQgbEcXwsyns/tWUnvkff4VXkilTSEtmcNSfnnPzBK8SkR X-Received: by 2002:a17:906:4753:: with SMTP id j19mr2392678ejs.83.1590043958589; Wed, 20 May 2020 23:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590043958; cv=none; d=google.com; s=arc-20160816; b=r42A8IROpHixPnEYxjWB6/axReu9OMRLBkN2LlWFXLZdtvoJPInV868QCQYW0StJzu tN9aAl9O7WEjmxdClO26iUCuTt2GgHHQz9+sNQy0IbgCctLrhpaOnGhuqnBSWlMwdci8 3F7M6UDt9N3HsxJu2z6kb1JxHS2tWGNBvU/gQsnxflJmyDSYmhLwapIAh4Ub7YEIhHoy ikb9qMII40dvVUJG4LRRBAf73NcYnM56B9qxy3Y0/hKVN28u4Cx/C6QQSXTnDl2YK410 HxkAfGLuB3F8cnaXKuyr2agw6Cr42ax5rBQYyZm8mCf3kd3TuMaYRs5tAuhabJeNxdG/ Hp0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=HOXt+hjBxAiHfEk6e1Nwq4aYv1F5LcozIKtHGyINKlQ=; b=OQfK2JND144Db2AyScTCRPY0wKtlks3xY+m4TR5heArARk3LygdzaGP4hA8Gbi+jKq 6CoJEdAFbLoIK/pHp7thMWNDQ/qfofrN6l2UeewVqkB4qjnhE4kO2c/3F9k1/bdD4Y3N inTiPv0sQJudBoat3XHhVpwioKQJgUCUv/A9q0x2A+cOJrtX4bwOQMkyESHQb6tGvmna uwbevrl1ZHMbv3oYTtHI6kBTGFKjipeP864h7xAiQQ+7EiBT6Ovcz4vDiM9nW6sG1B3n XsUlqPwm8RevJqeSuEuCS4Qp/LUHPh9ysfi33XQz4Yb/cfz3g562wgaH/OIGEPsEouif KFvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=TD2fDeKC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si2897228edi.376.2020.05.20.23.52.16; Wed, 20 May 2020 23:52:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=TD2fDeKC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727900AbgEUGs2 (ORCPT + 99 others); Thu, 21 May 2020 02:48:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbgEUGs2 (ORCPT ); Thu, 21 May 2020 02:48:28 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E72AC061A0E for ; Wed, 20 May 2020 23:48:28 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49SKvV6hDcz9sT9; Thu, 21 May 2020 16:48:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1590043704; bh=mylN82RMn5av9mlUtP03Bq7JN7H0txBfw8gjg+ZMQ7s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TD2fDeKCARBDrWHY+VsGAe2iNnjSqQg60E3P1g7BHV/e9JoUek2xU6OXtkwdaFBlG aGsN7rfCMbH628gOSdZXEoRypdxmeNdDtrpbG4z8i41l8g31J3EgJqZna48GJKwC2D 5bRYia+7Z03muiVkvkWqj3ePOGlgXK0kW3acfngvbgMdQClEMJRRQ5Z8x3nV+qRPyX EraBdtFn9TliOy7sS163c8RGPhBZnu6NStAC3CIu4NHNsMKW+KtIsGQQxbHCcvH6dx 4yVgcFUs0HZ2rGH7IcJSH/rK0vExeIUOkgCbyQhjDX2DlL14cZeT9FW4/IsS3D9Hip vvOPM4L7nSzmA== From: Michael Ellerman To: Ira Weiny , Vaibhav Jain Cc: linuxppc-dev@lists.ozlabs.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, "Aneesh Kumar K . V" , Steven Rostedt Subject: Re: [RESEND PATCH v7 4/5] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods In-Reply-To: <20200520153209.GC3660833@iweiny-DESK2.sc.intel.com> References: <20200519190058.257981-1-vaibhav@linux.ibm.com> <20200519190058.257981-5-vaibhav@linux.ibm.com> <20200520153209.GC3660833@iweiny-DESK2.sc.intel.com> Date: Thu, 21 May 2020 16:48:40 +1000 Message-ID: <87367t941j.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ira Weiny writes: > On Wed, May 20, 2020 at 12:30:57AM +0530, Vaibhav Jain wrote: >> Introduce support for Papr nvDimm Specific Methods (PDSM) in papr_scm >> modules and add the command family to the white list of NVDIMM command >> sets. Also advertise support for ND_CMD_CALL for the dimm >> command mask and implement necessary scaffolding in the module to >> handle ND_CMD_CALL ioctl and PDSM requests that we receive. ... >> + * >> + * Payload Version: >> + * >> + * A 'payload_version' field is present in PDSM header that indicates a specific >> + * version of the structure present in PDSM Payload for a given PDSM command. >> + * This provides backward compatibility in case the PDSM Payload structure >> + * evolves and different structures are supported by 'papr_scm' and 'libndctl'. >> + * >> + * When sending a PDSM Payload to 'papr_scm', 'libndctl' should send the version >> + * of the payload struct it supports via 'payload_version' field. The 'papr_scm' >> + * module when servicing the PDSM envelope checks the 'payload_version' and then >> + * uses 'payload struct version' == MIN('payload_version field', >> + * 'max payload-struct-version supported by papr_scm') to service the PDSM. >> + * After servicing the PDSM, 'papr_scm' put the negotiated version of payload >> + * struct in returned 'payload_version' field. > > FWIW many people believe using a size rather than version is more sustainable. > It is expected that new payload structures are larger (more features) than the > previous payload structure. > > I can't find references at the moment through. I think clone_args is a good modern example: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/sched.h#n88 cheers