Re: [PATCH net-next v8 03/10] net/smc: unify the structs of accept or confirm message for v1 and v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 19.12.23 15:26, Wen Gu wrote:
> The structs of CLC accept and confirm messages for SMCv1 and SMCv2 are
> separately defined and often casted to each other in the code, which may
> increase the risk of errors caused by future divergence of them. So
> unify them into one struct for better maintainability.
> 
> Suggested-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>
> Signed-off-by: Wen Gu <guwen@xxxxxxxxxxxxxxxxx>
> ---
>  net/smc/af_smc.c  | 52 +++++++++++++------------------------
>  net/smc/smc_clc.c | 65 ++++++++++++++++++++---------------------------
>  net/smc/smc_clc.h | 42 +++++++++++++-----------------
>  3 files changed, 62 insertions(+), 97 deletions(-)

Thanks a lot Wen Gu, I really love this.
Using an unnamed union is a great solution here. Now the code is so much more
readable and maintainable

Reviewed-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux