public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* Clarification on rdma-core Code Style and Contribution Guidelines
@ 2025-05-07  6:31 周洪锋
  2025-05-12 10:17 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: 周洪锋 @ 2025-05-07  6:31 UTC (permalink / raw)
  To: linux-rdma



Dear Maintainers,


I hope this message finds you well.


I'm Zhou Hongfeng from BitIntelligence, a network company from China, and I’m interested in contributing to rdma-core. While preparing my patches, I want to ensure my code adheres to the project’s style guidelines. However, I noticed a few uncertainties regarding the current practices:


  `.clang-format` Usage: The repository includes a .clang-format file, but it hasn’t been updated in a while. When I ran clang-format-11) on the existing codebase, nearly all files showed formatting differences. This suggests the config might not fully align with the actual code style. Is `clang-format` the recommended tool for enforcing style consistency? If so, is there an updated version of the config file that maintainers endorse?


  Manual Style Rules: If the project prioritizes manual style enforcement over automated tools, could you point me to documented conventions (e.g., indentation, naming, comments)?


  Pre-Submission Handling: Should contributors manually match the existing style, or is it acceptable to submit patches reformatted with an updated .clang-format?


Additionally, if there are other contribution guidelines (e.g., commit message format, testing requirements), I’d appreciate any pointers to avoid unnecessary review overhead.


Thank you for your time and guidance! I’m happy to adjust my workflow to align with the project’s standards. Looking forward to your insights.


Best regards,
Zhou Hongfeng
Github.com/zhf999

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Clarification on rdma-core Code Style and Contribution Guidelines
  2025-05-07  6:31 Clarification on rdma-core Code Style and Contribution Guidelines 周洪锋
@ 2025-05-12 10:17 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2025-05-12 10:17 UTC (permalink / raw)
  To: 周洪锋; +Cc: linux-rdma

On Wed, May 07, 2025 at 02:31:36PM +0800, 周洪锋 wrote:
> 
> 
> Dear Maintainers,
> 
> 
> I hope this message finds you well.
> 
> 
> I'm Zhou Hongfeng from BitIntelligence, a network company from China, and I’m interested in contributing to rdma-core. While preparing my patches, I want to ensure my code adheres to the project’s style guidelines. However, I noticed a few uncertainties regarding the current practices:
> 
> 
>   `.clang-format` Usage: The repository includes a .clang-format file, but it hasn’t been updated in a while. When I ran clang-format-11) on the existing codebase, nearly all files showed formatting differences. This suggests the config might not fully align with the actual code style. Is `clang-format` the recommended tool for enforcing style consistency? If so, is there an updated version of the config file that maintainers endorse?

We follow kernel coding style in rdma-core too, but some code was
written before we adopted this policy. So the guidelines are relatively
simple: use kernel style for new files, and "existing to that file" for
changes in already existing codebase.

> 
> 
>   Manual Style Rules: If the project prioritizes manual style enforcement over automated tools, could you point me to documented conventions (e.g., indentation, naming, comments)?
> 
> 
>   Pre-Submission Handling: Should contributors manually match the existing style, or is it acceptable to submit patches reformatted with an updated .clang-format?

Sure, it is perfectly fine to extend existing .clang-format.

> 
> 
> Additionally, if there are other contribution guidelines (e.g., commit message format, testing requirements), I’d appreciate any pointers to avoid unnecessary review overhead.

Kernel coding style, pyverbs tests coverage and +1 from CI.

Thanks

> 
> 
> Thank you for your time and guidance! I’m happy to adjust my workflow to align with the project’s standards. Looking forward to your insights.
> 
> 
> Best regards,
> Zhou Hongfeng
> Github.com/zhf999

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-12 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07  6:31 Clarification on rdma-core Code Style and Contribution Guidelines 周洪锋
2025-05-12 10:17 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox