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

- From: Alexandra Winter \<wintera@linux.ibm.com\>
- Date: 2025-08-08 18:36:31 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/08/11334145
- Thread: https://ratatoskr.run/netdev/2025/08/11334011/t.md

```text


On 07.08.25 20:19, Simon Horman wrote:
> 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:
>>> 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>
>>
>> ...
>>
>>> diff --git a/net/dibs/dibs_main.c b/net/dibs/dibs_main.c
>>
>> ...
>>
>>> @@ -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.


Thank you Simon. It will be included in next version.
(I also got notified by kernel test robot [ref] about this).
```
