lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 Apr 2024 10:41:32 +0200
From: Alexandra Winter <wintera@...ux.ibm.com>
To: Wen Gu <guwen@...ux.alibaba.com>, twinkler@...ux.ibm.com,
        hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, wenjia@...ux.ibm.com, jaka@...ux.ibm.com
Cc: borntraeger@...ux.ibm.com, svens@...ux.ibm.com, alibuda@...ux.alibaba.com,
        tonylu@...ux.alibaba.com, linux-kernel@...r.kernel.org,
        linux-s390@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v6 01/11] net/smc: decouple ism_client from SMC-D
 DMB registration



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@...ux.alibaba.com>
> ---

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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ