lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR11MB465799A5A9BB0B8E73A073449B5AA@DM6PR11MB4657.namprd11.prod.outlook.com>
Date: Wed, 14 Jun 2023 12:21:29 +0000
From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>
To: Jiri Pirko <jiri@...nulli.us>, Jakub Kicinski <kuba@...nel.org>
CC: "vadfed@...a.com" <vadfed@...a.com>, "jonathan.lemon@...il.com"
	<jonathan.lemon@...il.com>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"corbet@....net" <corbet@....net>, "davem@...emloft.net"
	<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
	"vadfed@...com" <vadfed@...com>, "Brandeburg, Jesse"
	<jesse.brandeburg@...el.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "M, Saeed" <saeedm@...dia.com>,
	"leon@...nel.org" <leon@...nel.org>, "richardcochran@...il.com"
	<richardcochran@...il.com>, "sj@...nel.org" <sj@...nel.org>,
	"javierm@...hat.com" <javierm@...hat.com>, "ricardo.canuelo@...labora.com"
	<ricardo.canuelo@...labora.com>, "mst@...hat.com" <mst@...hat.com>,
	"tzimmermann@...e.de" <tzimmermann@...e.de>, "Michalik, Michal"
	<michal.michalik@...el.com>, "gregkh@...uxfoundation.org"
	<gregkh@...uxfoundation.org>, "jacek.lawrynowicz@...ux.intel.com"
	<jacek.lawrynowicz@...ux.intel.com>, "airlied@...hat.com"
	<airlied@...hat.com>, "ogabbay@...nel.org" <ogabbay@...nel.org>,
	"arnd@...db.de" <arnd@...db.de>, "nipun.gupta@....com" <nipun.gupta@....com>,
	"axboe@...nel.dk" <axboe@...nel.dk>, "linux@...y.sk" <linux@...y.sk>,
	"masahiroy@...nel.org" <masahiroy@...nel.org>,
	"benjamin.tissoires@...hat.com" <benjamin.tissoires@...hat.com>,
	"geert+renesas@...der.be" <geert+renesas@...der.be>, "Olech, Milena"
	<milena.olech@...el.com>, "kuniyu@...zon.com" <kuniyu@...zon.com>,
	"liuhangbin@...il.com" <liuhangbin@...il.com>, "hkallweit1@...il.com"
	<hkallweit1@...il.com>, "andy.ren@...cruise.com" <andy.ren@...cruise.com>,
	"razor@...ckwall.org" <razor@...ckwall.org>, "idosch@...dia.com"
	<idosch@...dia.com>, "lucien.xin@...il.com" <lucien.xin@...il.com>,
	"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>, "phil@....cc"
	<phil@....cc>, "claudiajkang@...il.com" <claudiajkang@...il.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, poros <poros@...hat.com>, mschmidt
	<mschmidt@...hat.com>, "linux-clk@...r.kernel.org"
	<linux-clk@...r.kernel.org>, "vadim.fedorenko@...ux.dev"
	<vadim.fedorenko@...ux.dev>
Subject: RE: [RFC PATCH v8 01/10] dpll: documentation on DPLL subsystem
 interface

>From: Jiri Pirko <jiri@...nulli.us>
>Sent: Wednesday, June 14, 2023 11:27 AM
>
>Tue, Jun 13, 2023 at 06:38:01PM CEST, kuba@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ