From: Souradeep Chakrabarti <schakrabarti@microsoft.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Souradeep Chakrabarti <schakrabarti@linux.microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
Dexuan Cui <decui@microsoft.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
Long Li <longli@microsoft.com>,
Ajay Sharma <sharmaajay@microsoft.com>,
"leon@kernel.org" <leon@kernel.org>,
"cai.huoqing@linux.dev" <cai.huoqing@linux.dev>,
"ssengar@linux.microsoft.com" <ssengar@linux.microsoft.com>,
"vkuznets@redhat.com" <vkuznets@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH V2 net] net: mana: Configure hwc timeout from hardware
Date: Tue, 11 Jul 2023 04:34:14 +0000 [thread overview]
Message-ID: <PUZP153MB07885FF6CC0FB6CECBC811B5CC31A@PUZP153MB0788.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <2023070713-subway-stony-9ae1@gregkh>
>-----Original Message-----
>From: Greg KH <gregkh@linuxfoundation.org>
>Sent: Friday, July 7, 2023 3:47 PM
>To: Souradeep Chakrabarti <schakrabarti@linux.microsoft.com>
>Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
><haiyangz@microsoft.com>; wei.liu@kernel.org; Dexuan Cui
><decui@microsoft.com>; davem@davemloft.net; edumazet@google.com;
>kuba@kernel.org; pabeni@redhat.com; Long Li <longli@microsoft.com>; Ajay
>Sharma <sharmaajay@microsoft.com>; leon@kernel.org;
>cai.huoqing@linux.dev; ssengar@linux.microsoft.com; vkuznets@redhat.com;
>tglx@linutronix.de; linux-hyperv@vger.kernel.org; netdev@vger.kernel.org;
>linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org;
>stable@vger.kernel.org; Souradeep Chakrabarti
><schakrabarti@microsoft.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@linux.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
next prev parent reply other threads:[~2023-07-11 4:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 9:45 [PATCH V2 net] net: mana: Configure hwc timeout from hardware Souradeep Chakrabarti
2023-07-07 10:16 ` Greg KH
2023-07-07 10:17 ` Greg KH
2023-07-11 4:34 ` Souradeep Chakrabarti [this message]
2023-07-08 13:30 ` Simon Horman
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=PUZP153MB07885FF6CC0FB6CECBC811B5CC31A@PUZP153MB0788.APCP153.PROD.OUTLOOK.COM \
--to=schakrabarti@microsoft.com \
--cc=cai.huoqing@linux.dev \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=leon@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=schakrabarti@linux.microsoft.com \
--cc=sharmaajay@microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wei.liu@kernel.org \
/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