On 15.04.24 10:41, Alexandra Winter wrote:
On 14.04.24 06:02, Wen Gu wrote:
The struct 'ism_client' is specialized for s390 platform firmware ISM.
So replace it with 'void' to make SMCD DMB registration helper generic
for both Emulated-ISM and existing ISM.
Signed-off-by: Wen Gu <guwen@xxxxxxxxxxxxxxxxx>
---
Just a thought:
The client concept is really specific to s390 platform firmware ISM.
So wouldn't it be nice to do something like:
diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
index 78cca4839a31..37dcdf2bc044 100644
--- a/drivers/s390/net/ism_drv.c
+++ b/drivers/s390/net/ism_drv.c
@@ -747,10 +747,9 @@ static int smcd_query_rgid(struct smcd_dev *smcd, struct smcd_gid *rgid,
return ism_query_rgid(smcd->priv, rgid->gid, vid_valid, vid);
}
-static int smcd_register_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb,
- struct ism_client *client)
+static int smcd_register_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb)
{
- return ism_register_dmb(smcd->priv, (struct ism_dmb *)dmb, client);
+ return ism_register_dmb(smcd->priv, (struct ism_dmb *)dmb, &smc_ism_client);
}
static int smcd_unregister_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb)
--------------
This is not a real patch, just a sketch, but I hope you
get the idea.
This may be a step in the direction of moving the ism_client concept from
net/smc/smc_ism.c to drivers/s390/net/ism*
I know that there are several dependencies to consider.
And I haven't looked at the other patches in this series yet in detail, to see how you solve
things like smcd_register_dev. Seems like smcd_register_dmb() is the only one of the smcd_ops
that you need for loopback and uses ism_client.
Wenjia, Gerd, and others what do you think?
IMO, the idea is not bad, but it should not belong to this patch series.