[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250911123232.GI30363@horms.kernel.org>
Date: Thu, 11 Sep 2025 13:32:32 +0100
From: Simon Horman <horms@...nel.org>
To: Fan Gong <gongfan1@...wei.com>
Cc: Zhu Yikai <zhuyikai1@...artners.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>, linux-doc@...r.kernel.org,
Jonathan Corbet <corbet@....net>,
Bjorn Helgaas <helgaas@...nel.org>, luosifu <luosifu@...wei.com>,
Xin Guo <guoxin09@...wei.com>,
Shen Chenyang <shenchenyang1@...ilicon.com>,
Zhou Shuai <zhoushuai28@...wei.com>, Wu Like <wulike1@...wei.com>,
Shi Jing <shijing34@...wei.com>,
Luo Yang <luoyang82@...artners.com>,
Meny Yossefi <meny.yossefi@...wei.com>,
Gur Stavi <gur.stavi@...wei.com>, Lee Trager <lee@...ger.us>,
Michael Ellerman <mpe@...erman.id.au>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Suman Ghosh <sumang@...vell.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Joe Damato <jdamato@...tly.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH net-next v05 08/14] hinic3: Queue pair resource
initialization
On Tue, Sep 09, 2025 at 03:33:33PM +0800, Fan Gong wrote:
> Add Tx & Rx queue resources and functions for packet transmission
> and reception.
>
> Co-developed-by: Zhu Yikai <zhuyikai1@...artners.com>
> Signed-off-by: Zhu Yikai <zhuyikai1@...artners.com>
> Signed-off-by: Fan Gong <gongfan1@...wei.com>
...
> +static void hinic3_config_num_qps(struct net_device *netdev,
> + struct hinic3_dyna_txrxq_params *q_params)
> +{
> + struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> + u16 alloc_num_irq, cur_num_irq;
> + u16 dst_num_irq;
> +
> + if (!test_bit(HINIC3_RSS_ENABLE, &nic_dev->flags))
> + q_params->num_qps = 1;
> +
> + if (nic_dev->num_qp_irq >= q_params->num_qps)
> + goto out;
> +
> + cur_num_irq = nic_dev->num_qp_irq;
> +
> + alloc_num_irq = hinic3_qp_irq_change(netdev, q_params->num_qps);
> + if (alloc_num_irq < q_params->num_qps) {
> + q_params->num_qps = alloc_num_irq;
> + netdev_warn(netdev, "Can not get enough irqs, adjust num_qps to %u\n",
> + q_params->num_qps);
> +
> + /* The current irq may be in use, we must keep it */
> + dst_num_irq = max_t(u16, cur_num_irq, q_params->num_qps);
> + hinic3_qp_irq_change(netdev, dst_num_irq);
> + }
> +
> +out:
> + netdev_dbg(netdev, "Finally num_qps: %u\n", q_params->num_qps);
I'm not sure that "Finally" will be readily understood
(or, for that matter, that I readily understand it).
Could this be clarified somehow?
> +}
Powered by blists - more mailing lists