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]
Date:   Wed, 27 Oct 2021 13:29:40 +0000
From:   "Machnikowski, Maciej" <maciej.machnikowski@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        "abyagowi@...com" <abyagowi@...com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "idosch@...sch.org" <idosch@...sch.org>,
        "mkubecek@...e.cz" <mkubecek@...e.cz>,
        "saeed@...nel.org" <saeed@...nel.org>,
        "michael.chan@...adcom.com" <michael.chan@...adcom.com>
Subject: RE: [RFC v5 net-next 4/5] rtnetlink: Add support for SyncE recovered
 clock configuration

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Tuesday, October 26, 2021 11:33 PM
> To: Machnikowski, Maciej <maciej.machnikowski@...el.com>
> Subject: Re: [RFC v5 net-next 4/5] rtnetlink: Add support for SyncE recovered
> clock configuration
> 
> Please add a write up of how things fit together in Documentation/.
> I'm sure reviewers and future users will appreciate that.
 
Sure! Documentation/networking/synce.rst would be the right place to add it?
Or is there any better place?

> Some nits below.
> 
> On Tue, 26 Oct 2021 19:31:45 +0200 Maciej Machnikowski wrote:
> > Add support for RTNL messages for reading/configuring SyncE recovered
> > clocks.
> > The messages are:
> > RTM_GETRCLKRANGE: Reads the allowed pin index range for the
> recovered
> > 		  clock outputs. This can be aligned to PHY outputs or
> > 		  to EEC inputs, whichever is better for a given
> > 		  application
> >
> > RTM_GETRCLKSTATE: Read the state of recovered pins that output
> recovered
> > 		  clock from a given port. The message will contain the
> > 		  number of assigned clocks (IFLA_RCLK_STATE_COUNT) and
> > 		  a N pin inexes in IFLA_RCLK_STATE_OUT_IDX
> 
> Do we need two separate calls for the gets?

I feel it's better to separate the "control plane" from the "information plane",
but if having less is better we can merge those 2. Then the GETRCLKSTATE would
return:
Number of active outputs
Output indexes
Max allowed output range
Min allowed output range

Since Min/Max are usually only needed once (and may require some FW
Interaction) I'd rather keep them separate.
 
> > RTM_SETRCLKSTATE: Sets the redirection of the recovered clock for
> > 		  a given pin
> 
> 
> > +struct if_set_rclk_msg {
> > +	__u32 ifindex;
> > +	__u32 out_idx;
> > +	__u32 flags;
> 
> Why not break this out into separate attrs?

I think it would break the functionality - we need both the index and the
action (ena/dis in the flags) to know what to do.
 
> > +++ b/net/core/rtnetlink.c
> > @@ -5524,8 +5524,10 @@ static int rtnl_eec_state_get(struct sk_buff
> *skb, struct nlmsghdr *nlh,
> >
> >  	state = nlmsg_data(nlh);
> >  	dev = __dev_get_by_index(net, state->ifindex);
> > -	if (!dev)
> > +	if (!dev) {
> > +		NL_SET_ERR_MSG(extack, "unknown ifindex");
> >  		return -ENODEV;
> > +	}
> >
> >  	nskb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
> >  	if (!nskb)
> 
> Belongs in previous patch?

True - will fix in next revision :)

Regards
Maciek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ