Thread (26 messages) 26 messages, 3 authors, 2024-08-30

Re: [PATCH V5 net-next 06/11] net: hibmcge: Implement .ndo_start_xmit function

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-08-29 03:02:44
Also in: lkml

On Thu, Aug 29, 2024 at 10:32:33AM +0800, Jijie Shao wrote:
on 2024/8/29 9:41, Jakub Kicinski wrote:
quoted
On Tue, 27 Aug 2024 21:14:50 +0800 Jijie Shao wrote:
quoted
@@ -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.
When you come to implement ethtool --set-ring, you will need to
allocate and free the ring buffers outside of probe.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help