From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Sathya Perla <sathya.perla@emulex.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 12/12] be2net: query max_tx_qs for BE3 super-nic profile from FW
Date: Mon, 01 Sep 2014 17:10:29 +0400 [thread overview]
Message-ID: <54047045.4080400@cogentembedded.com> (raw)
In-Reply-To: <1409552664-15990-13-git-send-email-sathya.perla@emulex.com>
Hello.
On 9/1/2014 10:24 AM, Sathya Perla wrote:
> From: Suresh Reddy <Suresh.Reddy@emulex.com>
> In the BE3 super-nic profile, the max_tx_qs value can vary for each function.
> So the driver needs to query this value from FW instead of using the
> pre-defined constant BE3_MAX_TX_QS.
> Signed-off-by: Suresh Reddy <Suresh.Reddy@emulex.com>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
> drivers/net/ethernet/emulex/benet/be_main.c | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index f3235d1..a30156b 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -3324,10 +3324,19 @@ static void BEx_get_resources(struct be_adapter *adapter,
> */
> if (BE2_chip(adapter) || use_sriov || (adapter->port_num > 1) ||
> !be_physfn(adapter) || (be_is_mc(adapter) &&
> - !(adapter->function_caps & BE_FUNCTION_CAPS_RSS)))
> + !(adapter->function_caps & BE_FUNCTION_CAPS_RSS))) {
> res->max_tx_qs = 1;
> - else
> + } else if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC) {
> + struct be_resources super_nic_res = {0};
Empty line is needed after declaration.
> + /* On a SuperNIC profile, the driver needs to use the
> + * GET_PROFILE_CONFIG cmd to query the per-function TXQ limits
> + */
> + be_cmd_get_profile_config(adapter, &super_nic_res, 0);
> + /* Some old versions of BE3 FW don't report max_tx_qs value */
> + res->max_tx_qs = super_nic_res.max_tx_qs ? : BE3_MAX_TX_QS;
> + } else {
> res->max_tx_qs = BE3_MAX_TX_QS;
> + }
WBR, Sergei
next prev parent reply other threads:[~2014-09-01 13:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-01 6:24 [PATCH net-next 00/12] be2net: patch set Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 01/12] be2net: add a few log messages Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 02/12] be2net: shorten AMAP_GET/SET_BITS() macro calls Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 03/12] be2net: add a description for counter rx_input_fifo_overflow_drop Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 04/12] be2net: Add TX completion error statistics in ethtool Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 05/12] be2net: Add a dma_mapping_error counter " Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 06/12] be2net: fix log messages in lancer FW download path Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 07/12] be2net: remove unncessary gotos Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 08/12] be2net: define BE_MAX_MTU Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 09/12] be2net: make be_cmd_get_regs() return a status Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 10/12] be2net: get rid of TX budget Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 11/12] be2net: define macro for_all_tx_queues_on_eq() Sathya Perla
2014-09-01 6:24 ` [PATCH net-next 12/12] be2net: query max_tx_qs for BE3 super-nic profile from FW Sathya Perla
2014-09-01 13:10 ` Sergei Shtylyov [this message]
2014-09-02 4:08 ` Sathya Perla
2014-09-04 19:28 ` Jiri Pirko
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=54047045.4080400@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=netdev@vger.kernel.org \
--cc=sathya.perla@emulex.com \
/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;
as well as URLs for NNTP newsgroup(s).