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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <PUZP153MB07885FF6CC0FB6CECBC811B5CC31A@PUZP153MB0788.APCP153.PROD.OUTLOOK.COM>
Date: Tue, 11 Jul 2023 04:34:14 +0000
From: Souradeep Chakrabarti <schakrabarti@...rosoft.com>
To: Greg KH <gregkh@...uxfoundation.org>, Souradeep Chakrabarti
	<schakrabarti@...ux.microsoft.com>
CC: KY Srinivasan <kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>,
	"wei.liu@...nel.org" <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, Long Li <longli@...rosoft.com>, Ajay
 Sharma <sharmaajay@...rosoft.com>, "leon@...nel.org" <leon@...nel.org>,
	"cai.huoqing@...ux.dev" <cai.huoqing@...ux.dev>,
	"ssengar@...ux.microsoft.com" <ssengar@...ux.microsoft.com>,
	"vkuznets@...hat.com" <vkuznets@...hat.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "linux-hyperv@...r.kernel.org"
	<linux-hyperv@...r.kernel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-rdma@...r.kernel.org"
	<linux-rdma@...r.kernel.org>, "stable@...r.kernel.org"
	<stable@...r.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH V2 net] net: mana: Configure hwc timeout
 from hardware



>-----Original Message-----
>From: Greg KH <gregkh@...uxfoundation.org>
>Sent: Friday, July 7, 2023 3:47 PM
>To: Souradeep Chakrabarti <schakrabarti@...ux.microsoft.com>
>Cc: KY Srinivasan <kys@...rosoft.com>; Haiyang Zhang
><haiyangz@...rosoft.com>; wei.liu@...nel.org; Dexuan Cui
><decui@...rosoft.com>; davem@...emloft.net; edumazet@...gle.com;
>kuba@...nel.org; pabeni@...hat.com; Long Li <longli@...rosoft.com>; Ajay
>Sharma <sharmaajay@...rosoft.com>; leon@...nel.org;
>cai.huoqing@...ux.dev; ssengar@...ux.microsoft.com; vkuznets@...hat.com;
>tglx@...utronix.de; linux-hyperv@...r.kernel.org; netdev@...r.kernel.org;
>linux-kernel@...r.kernel.org; linux-rdma@...r.kernel.org;
>stable@...r.kernel.org; Souradeep Chakrabarti
><schakrabarti@...rosoft.com>
>Subject: [EXTERNAL] Re: [PATCH V2 net] net: mana: Configure hwc timeout
>from hardware
>
>On Fri, Jul 07, 2023 at 02:45:28AM -0700, Souradeep Chakrabarti wrote:
>> At present hwc timeout value is a fixed value.
>> This patch sets the hwc timeout from the hardware.
>>
>> Signed-off-by: Souradeep Chakrabarti
>> <schakrabarti@...ux.microsoft.com>
>> ---
>> V1 -> V2:
>> * Added return check for mana_gd_query_hwc_timeout
>> * Removed dev_err from mana_gd_query_hwc_timeout
>> ---
>>  .../net/ethernet/microsoft/mana/gdma_main.c   | 30
>++++++++++++++++++-
>>  .../net/ethernet/microsoft/mana/hw_channel.c  | 25 +++++++++++++++-
>>  include/net/mana/gdma.h                       | 20 ++++++++++++-
>>  include/net/mana/hw_channel.h                 |  5 ++++
>>  4 files changed, 77 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c
>> b/drivers/net/ethernet/microsoft/mana/gdma_main.c
>> index 8f3f78b68592..949c927c3a7e 100644
>> --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
>> +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
>> @@ -106,6 +106,27 @@ static int mana_gd_query_max_resources(struct
>pci_dev *pdev)
>>  	return 0;
>>  }
>>
>> +static int mana_gd_query_hwc_timeout(struct pci_dev *pdev, u32
>> +*timeout_val) {
>> +	struct gdma_context *gc = pci_get_drvdata(pdev);
>> +	struct gdma_query_hwc_timeout_req req = {};
>> +	struct gdma_query_hwc_timeout_resp resp = {};
>> +	int err;
>> +
>> +	mana_gd_init_req_hdr(&req.hdr, GDMA_QUERY_HWC_TIMEOUT,
>> +			     sizeof(req), sizeof(resp));
>> +	req.timeout_ms = *timeout_val;
>> +	err = mana_gd_send_request(gc, sizeof(req), &req, sizeof(resp), &resp);
>> +	if (err || resp.hdr.status)
>> +		return err ? err : -EPROTO;
>> +
>> +	*timeout_val = resp.timeout_ms;
>> +	dev_info(gc->dev, "Successfully changed the timeout value %u\n",
>> +		 *timeout_val);
>
>When the kernel works properly, it is quiet.  Please always remove your
>debugging code before submitting changes for inclusion.
>
>thanks,
>
>greg k-h
Thank you for the comments, will take care of them in the next revision.
regards, 
Souradeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ