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: <DM6PR11MB46576DF96B9A44AB42241E469B5BA@DM6PR11MB4657.namprd11.prod.outlook.com>
Date: Thu, 15 Jun 2023 21:35:08 +0000
From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>
To: Jiri Pirko <jiri@...nulli.us>
CC: "kuba@...nel.org" <kuba@...nel.org>, "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 07/10] ice: add admin commands to access cgu
 configuration

>From: Jiri Pirko <jiri@...nulli.us>
>Sent: Saturday, June 10, 2023 10:46 AM
>
>Fri, Jun 09, 2023 at 02:18:50PM CEST, arkadiusz.kubalewski@...el.com wrote:
>>Add firmware admin command to access clock generation unit
>>configuration, it is required to enable Extended PTP and SyncE features
>>in the driver.
>
>Empty line here perhaps?
>

Sure, will do.

>
>>Add definitions of possible hardware variations of input and output pins
>>related to clock generation unit and functions to access the data.
>>
>>Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
>
>I just skimmed over this, not really give it much of a time. Couple of
>nits:
>
>
>>+
>>+#define MAX_NETLIST_SIZE	10
>
>Prefix perhaps?
>

Fixed.

>[...]
>
>
>>+/**
>>+ * convert_s48_to_s64 - convert 48 bit value to 64 bit value
>>+ * @signed_48: signed 64 bit variable storing signed 48 bit value
>>+ *
>>+ * Convert signed 48 bit value to its 64 bit representation.
>>+ *
>>+ * Return: signed 64 bit representation of signed 48 bit value.
>>+ */
>>+static inline
>
>Never use "inline" in a c file.
>
>
>>+s64 convert_s48_to_s64(s64 signed_48)
>>+{
>>+	const s64 MASK_SIGN_BITS = GENMASK_ULL(63, 48);
>
>variable with capital letters? Not nice. Define? You have that multiple
>times in the patch.
>
>
>>+	const s64 SIGN_BIT_47 = BIT_ULL(47);
>>+
>>+	return ((signed_48 & SIGN_BIT_47) ? (s64)(MASK_SIGN_BITS | signed_48)
>
>Pointless cast, isn't it?
>
>You don't need () around "signed_48 & SIGN_BIT_47"
>
>
>>+		: signed_48);
>
>Return is not a function. Drop the outer "()"s.
>
>
>The whole fuction can look like:
>static s64 convert_s48_to_s64(s64 signed_48)
>{
>	return signed_48 & BIT_ULL(47) ? signed_48 | GENMASK_ULL(63, 48) :
>					 signed_48;
>}
>
>Nicer?
>

Sure, fixed.

>
>[...]
>
>
>
>>+int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx)
>>+{
>>+	struct ice_aqc_get_link_topo cmd;
>>+	u8 node_part_number;
>>+	u16 node_handle;
>>+	int status;
>>+	u8 ctx;
>>+
>>+	if (hw->mac_type != ICE_MAC_E810)
>>+		return -ENODEV;
>>+
>>+	if (hw->device_id != ICE_DEV_ID_E810C_QSFP) {
>>+		*idx = C827_0;
>>+		return 0;
>>+	}
>>+
>>+	memset(&cmd, 0, sizeof(cmd));
>>+
>>+	ctx = ICE_AQC_LINK_TOPO_NODE_TYPE_PHY <<
>ICE_AQC_LINK_TOPO_NODE_TYPE_S;
>>+	ctx |= ICE_AQC_LINK_TOPO_NODE_CTX_PORT <<
>>ICE_AQC_LINK_TOPO_NODE_CTX_S;
>>+	cmd.addr.topo_params.node_type_ctx = ctx;
>>+	cmd.addr.topo_params.index = 0;
>
>You zeroed the struct 4 lines above...
>

Fixed.

Thank you!
Arkadiusz

>
>>+
>>+	status = ice_aq_get_netlist_node(hw, &cmd, &node_part_number,
>>+					 &node_handle);
>>+	if (status || node_part_number != ICE_ACQ_GET_LINK_TOPO_NODE_NR_C827)
>>+		return -ENOENT;
>>+
>>+	if (node_handle == E810C_QSFP_C827_0_HANDLE)
>>+		*idx = C827_0;
>>+	else if (node_handle == E810C_QSFP_C827_1_HANDLE)
>>+		*idx = C827_1;
>>+	else
>>+		return -EIO;
>>+
>>+	return 0;
>>+}
>>+
>
>[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ