[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df861206-0a7a-4744-98f6-6335303d29ef@huawei.com>
Date: Thu, 29 Aug 2024 10:32:33 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <shaojijie@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <shenjian15@...wei.com>, <wangpeiyang1@...wei.com>,
<liuyonglong@...wei.com>, <chenhao418@...wei.com>, <sudongming1@...wei.com>,
<xujunsheng@...wei.com>, <shiyongbang@...wei.com>, <libaihan@...wei.com>,
<andrew@...n.ch>, <jdamato@...tly.com>, <horms@...nel.org>,
<jonathan.cameron@...wei.com>, <shameerali.kolothum.thodi@...wei.com>,
<salil.mehta@...wei.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V5 net-next 06/11] net: hibmcge: Implement .ndo_start_xmit
function
on 2024/8/29 9:41, Jakub Kicinski wrote:
> On Tue, 27 Aug 2024 21:14:50 +0800 Jijie Shao wrote:
>> @@ -111,6 +135,14 @@ static int hbg_init(struct hbg_priv *priv)
>> if (ret)
>> return ret;
>>
>> + ret = hbg_txrx_init(priv);
>> + if (ret)
>> + return ret;
> You allocate buffers on the probe path?
> The queues and all the memory will be sitting allocated but unused if
> admin does ip link set dev $eth0 down?
The network port has only one queue and
the TX queue depth is 64, RX queue depth is 127.
so it doesn't take up much memory.
Also, I plan to add the self_test feature in a future patch.
If I don't allocate buffers on the probe path,
I won't be able to do a loopback test if the network port goes down unexpectedly.
So, if there are no other constraints, I prefer to alloc buffer memory in probe path.
Thanks,
Jijie Shao
Powered by blists - more mailing lists