linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>
To: Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>
Cc: "vadfed@meta.com" <vadfed@meta.com>,
	"jonathan.lemon@gmail.com" <jonathan.lemon@gmail.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"vadfed@fb.com" <vadfed@fb.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"M, Saeed" <saeedm@nvidia.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"sj@kernel.org" <sj@kernel.org>,
	"javierm@redhat.com" <javierm@redhat.com>,
	"ricardo.canuelo@collabora.com" <ricardo.canuelo@collabora.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"Michalik, Michal" <michal.michalik@intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jacek.lawrynowicz@linux.intel.com" 
	<jacek.lawrynowicz@linux.intel.com>,
	"airlied@redhat.com" <airlied@redhat.com>,
	"ogabbay@kernel.org" <ogabbay@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"nipun.gupta@amd.com" <nipun.gupta@amd.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux@zary.sk" <linux@zary.sk>,
	"masahiroy@kernel.org" <masahiroy@kernel.org>,
	"benjamin.tissoires@redhat.com" <benjamin.tissoires@redhat.com>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"Olech, Milena" <milena.olech@intel.com>,
	"kuniyu@amazon.com" <kuniyu@amazon.com>,
	"liuhangbin@gmail.com" <liuhangbin@gmail.com>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"andy.ren@getcruise.com" <andy.ren@getcruise.com>,
	"razor@blackwall.org" <razor@blackwall.org>,
	"idosch@nvidia.com" <idosch@nvidia.com>,
	"lucien.xin@gmail.com" <lucien.xin@gmail.com>,
	"nicolas.dichtel@6wind.com" <nicolas.dichtel@6wind.com>,
	"phil@nwl.cc" <phil@nwl.cc>,
	"claudiajkang@gmail.com" <claudiajkang@gmail.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>, poros <poros@redhat.com>,
	mschmidt <mschmidt@redhat.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"vadim.fedorenko@linux.dev" <vadim.fedorenko@linux.dev>
Subject: RE: [RFC PATCH v8 01/10] dpll: documentation on DPLL subsystem interface
Date: Wed, 14 Jun 2023 12:21:29 +0000	[thread overview]
Message-ID: <DM6PR11MB465799A5A9BB0B8E73A073449B5AA@DM6PR11MB4657.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ZImH/6GzGdydC3U3@nanopsycho>

>From: Jiri Pirko <jiri@resnulli.us>
>Sent: Wednesday, June 14, 2023 11:27 AM
>
>Tue, Jun 13, 2023 at 06:38:01PM CEST, kuba@kernel.org wrote:
>>On Tue, 13 Jun 2023 11:55:11 +0200 Jiri Pirko wrote:
>>> >> +``'pin': [{
>>> >> + {'clock-id': 282574471561216,
>>> >> +  'module-name': 'ice',
>>> >> +  'pin-dpll-caps': 4,
>>> >> +  'pin-id': 13,
>>> >> +  'pin-parent': [{'pin-id': 2, 'pin-state': 'connected'},
>>> >> +                 {'pin-id': 3, 'pin-state': 'disconnected'},
>>> >> +                 {'id': 0, 'pin-direction': 'input'},
>>> >> +                 {'id': 1, 'pin-direction': 'input'}],
>>> >> +  'pin-type': 'synce-eth-port'}
>>> >> +}]``
>>> >
>>> >It seems like pin-parent is overloaded, can we split it into two
>>> >different nests?
>>>
>>> Yeah, we had it as two and converged to this one. The thing is, the rest
>>> of the attrs are the same for both parent pin and parent device. I link
>>> it this way a bit better. No strong feeling.
>>
>>Do you mean the same attribute enum / "space" / "set"?
>
>Yeah, that is my understanding. Arkadiusz, could you please clarify?
>

From user perspective the pin object is configured either:
- by itself (DPLL_A_PIN_FREQUENCY), as this affects all registered pin's dplls 
and frequency set ops are called on all of them,
- in a tuples, where ops are called only on particular parent object:
  - pin:'dpll device' (DPLL_A_PIN_STATE, DPLL_A_PIN_PRIO, DPLL_A_PIN_DIRECTION),
  - pin:'parent MUX-type pin' (DPLL_A_PIN_STATE).
  
Right now DPLL_A_PIN_PARENT nest can convey both parent types:
- if the nest contains DPLL_A_ID, other attributes describe config with the
parent dpll device,
- if it contains DPLL_A_PIN_ID, the other attributes describe config with the
parent pin.

The above example is actually a bit misleading, as this relates to the muxed
pin. From user perspective the information on parent dpll devices is redundant,
and I think in this case we shall not pass it to the user, as the pin was not
explicitly registered with a device by device driver.
The user shall only get parent pin related info, like:
``'pin': [{
 {'clock-id': 282574471561216,
  'module-name': 'ice',
  'pin-dpll-caps': 4,
  'pin-id': 13,
  'pin-parent': [{'pin-id': 2, 'pin-state': 'connected'},
                 {'pin-id': 3, 'pin-state': 'disconnected'},
  'pin-type': 'synce-eth-port'}
}]``

Thus will fix this by removing the parent device information from the muxed
pins info.

But to answer the question: for now it seems good enough to have the PIN_PARENT
nest that conveys either parent pin or parent dpll device information.
IMHO the real question here is about the future, are we going to add pin-parent
only config, which would not be a part of pin-device superset and would make
things unclear?
Unfortunately I don't have on my mind anything more that would be needed for
pin:parent_pin tuple..

Surely, we can skip this discussion and split the nest attr into something like:
- PIN_A_PIN_PARENT_DEVICE,
- PIN_A_PIN_PARENT_PIN.

>
>>In the example above the attributes present don't seem to overlap.
>>For user space its an extra if to sift thru the objects under
>>pin-parent.
>>
>>> >Also sounds like setting pin attrs and pin-parent attrs should be
>>> >different commands.
>>>
>>> Could be, but what't the benefit? Also, you are not configuring
>>> pin-parent. You are configuring pin:pin-parent tuple. Basically the pin
>>> configuration as a child. So this is mainly config of the pin itsest
>>> Therefore does not really make sense to me to split to two comments.
>>
>>Clarity of the API. If muxing everything thru few calls was the goal
>>we should also have very few members in struct dpll_pin_ops, and we
>>don't.
>
>How the the internal kernel api related to the uapi? I mean, it's quite
>common to have 1:N relationsip between cmd and op. I have to be missing
>your point. Could you be more specific please?
>
>Current code presents PIN_SET command with accepts structured set of
>attribute to be set. The core-driver api is pretty clear. Squashing to
>a single op would be disaster. Having one command per attr looks like an
>overkill without any real benefit. How exactly do you propose to change
>this?

Well, I agree that one command per attribute might be an overkill.

Thank you,
Arkadiusz

  reply	other threads:[~2023-06-14 12:21 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 12:18 [RFC PATCH v8 00/10] Create common DPLL configuration API Arkadiusz Kubalewski
2023-06-09 12:18 ` [RFC PATCH v8 01/10] dpll: documentation on DPLL subsystem interface Arkadiusz Kubalewski
2023-06-10  3:22   ` Bagas Sanjaya
2023-06-12 14:24     ` Kubalewski, Arkadiusz
2023-06-10 16:28   ` Jiri Pirko
2023-06-12 15:24     ` Kubalewski, Arkadiusz
2023-06-12 22:30     ` Jakub Kicinski
2023-06-12 15:30   ` Bart Van Assche
2023-06-12 16:01     ` Kubalewski, Arkadiusz
2023-06-12 22:43   ` Jakub Kicinski
2023-06-13  9:55     ` Jiri Pirko
2023-06-13 16:38       ` Jakub Kicinski
2023-06-14  9:27         ` Jiri Pirko
2023-06-14 12:21           ` Kubalewski, Arkadiusz [this message]
2023-06-14 19:15             ` Jakub Kicinski
2023-06-14 19:23               ` Jakub Kicinski
2023-06-15 10:18                 ` Jiri Pirko
2023-06-15 13:44                   ` Kubalewski, Arkadiusz
2023-06-15 16:31                   ` Jakub Kicinski
2023-06-17 10:36                     ` Jiri Pirko
2023-06-12 23:49   ` Jakub Kicinski
2023-06-14 12:23     ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 02/10] dpll: spec: Add Netlink spec in YAML Arkadiusz Kubalewski
2023-06-10 16:22   ` Jiri Pirko
2023-06-15 13:42     ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 03/10] dpll: core: Add DPLL framework base functions Arkadiusz Kubalewski
2023-06-10 17:38   ` Jiri Pirko
2023-06-21 16:28     ` Kubalewski, Arkadiusz
2023-06-21 18:55     ` Kubalewski, Arkadiusz
2023-06-22  7:05       ` Jiri Pirko
2023-06-11  9:36   ` Jiri Pirko
2023-06-12  7:25     ` Paolo Abeni
2023-06-21 20:38       ` Kubalewski, Arkadiusz
2023-06-11 10:01   ` Jiri Pirko
2023-06-12 23:45   ` Jakub Kicinski
2023-06-21 21:17     ` Kubalewski, Arkadiusz
2023-06-22  7:09       ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 04/10] dpll: netlink: " Arkadiusz Kubalewski
2023-06-11 11:42   ` Jiri Pirko
2023-06-23  1:01     ` Kubalewski, Arkadiusz
2023-06-21 11:18   ` Petr Oros
2023-06-21 11:53     ` Jiri Pirko
2023-06-21 13:07       ` Jiri Pirko
2023-06-23  0:56         ` Kubalewski, Arkadiusz
2023-06-23  7:48           ` Jiri Pirko
2023-06-23  0:56     ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 05/10] dpll: api header: " Arkadiusz Kubalewski
2023-06-10  7:25   ` Jiri Pirko
2023-06-10  7:29     ` Jiri Pirko
2023-06-12 15:00     ` Vadim Fedorenko
2023-06-10  7:32   ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 06/10] netdev: expose DPLL pin handle for netdevice Arkadiusz Kubalewski
2023-06-12  9:17   ` Petr Oros
2023-06-13 13:51     ` Jiri Pirko
2023-06-14 12:25       ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 07/10] ice: add admin commands to access cgu configuration Arkadiusz Kubalewski
2023-06-10  8:46   ` Jiri Pirko
2023-06-15 21:35     ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 08/10] ice: implement dpll interface to control cgu Arkadiusz Kubalewski
2023-06-10  9:57   ` Jiri Pirko
2023-06-19 18:08     ` Kubalewski, Arkadiusz
2023-06-21 12:28       ` Jiri Pirko
2023-06-10 16:36   ` Jiri Pirko
2023-06-19 20:34     ` Kubalewski, Arkadiusz
2023-06-21 12:29       ` Jiri Pirko
2023-06-29  6:14         ` Jiri Pirko
2023-07-03 12:37           ` Kubalewski, Arkadiusz
2023-07-10  8:23             ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 09/10] ptp_ocp: implement DPLL ops Arkadiusz Kubalewski
2023-06-10  8:06   ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 10/10] mlx5: Implement SyncE support using DPLL infrastructure Arkadiusz Kubalewski
2023-06-09 23:27 ` [RFC PATCH v8 00/10] Create common DPLL configuration API Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB465799A5A9BB0B8E73A073449B5AA@DM6PR11MB4657.namprd11.prod.outlook.com \
    --to=arkadiusz.kubalewski@intel.com \
    --cc=airlied@redhat.com \
    --cc=andy.ren@getcruise.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=benjamin.tissoires@redhat.com \
    --cc=claudiajkang@gmail.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacek.lawrynowicz@linux.intel.com \
    --cc=javierm@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jiri@resnulli.us \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=leon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux@zary.sk \
    --cc=liuhangbin@gmail.com \
    --cc=lucien.xin@gmail.com \
    --cc=masahiroy@kernel.org \
    --cc=michal.michalik@intel.com \
    --cc=milena.olech@intel.com \
    --cc=mschmidt@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=nipun.gupta@amd.com \
    --cc=ogabbay@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=phil@nwl.cc \
    --cc=poros@redhat.com \
    --cc=razor@blackwall.org \
    --cc=ricardo.canuelo@collabora.com \
    --cc=richardcochran@gmail.com \
    --cc=saeedm@nvidia.com \
    --cc=sj@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=vadfed@fb.com \
    --cc=vadfed@meta.com \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).