Re: [RFC net-next 08/17] net/dibs: Register ism as dibs device

From
Simon Horman <horms@kernel.org>
Date
2025-08-07 18:19:40
Also in
linux-rdma, linux-s390
Reply to
Simon Horman, 2025-08-07
On Thu, Aug 07, 2025 at 05:37:00PM +0100, Simon Horman wrote:
On Wed, Aug 06, 2025 at 05:41:13PM +0200, Alexandra Winter wrote:
quoted
Register ism devices with the dibs layer. Follow-on patches will move
functionality to the dibs layer.

As DIBS is only a shim layer without any dependencies, we can depend ISM
on DIBS without adding indirect dependencies. A follow-on patch will
remove implication of SMC by ISM.

Define struct dibs_dev. Follow-on patches will move more content into
dibs_dev.  The goal of follow-on patches is that ism_dev will only
contain fields that are special for this device driver. The same concept
will apply to other dibs device drivers.

Define dibs_dev_alloc(), dibs_dev_add() and dibs_dev_del() to be called
by dibs device drivers and call them from ism_drv.c
Use ism_dev.dibs for a pointer to dibs_dev.

Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
...
quoted
diff --git a/net/dibs/dibs_main.c b/net/dibs/dibs_main.c
...
quoted
@@ -56,6 +65,33 @@ int dibs_unregister_client(struct dibs_client *client)
 }
 EXPORT_SYMBOL_GPL(dibs_unregister_client);
 
+struct dibs_dev *dibs_dev_alloc(void)
+{
+	struct dibs_dev *dibs;
+
+	dibs = kzalloc(sizeof(*dibs), GFP_KERNEL);
Hi Alexandra,

It is not the case for x86_64, arm64, or s390 (at least).
But for x86_32 and arm (at least) it seems that linux/slab.h should
be included in order for kzalloc to be available for compilation.
Similarly for dibs_loopback.c in the following patch.
Thread (48 messages) 48 messages, 4 authors, last reply 2025-09-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help