Re: [PATCH net-next v05 08/14] hinic3: Queue pair resource initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> Signed-off-by: Zhu Yikai <zhuyikai1@xxxxxxxxxxxxxx>
> Signed-off-by: Fan Gong <gongfan1@xxxxxxxxxx>

...

> +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?

> +}




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux