diff --git a/drivers/ub/urma/ubcore/ubcore_umem.c b/drivers/ub/urma/ubcore/ubcore_umem.c index b9fd6d80a802f09af9e01b8be08cb6b6cdf25e06..3dbc9ed5afd415aa1c2c8c169e2f6dd840f9f1f8 100644 --- a/drivers/ub/urma/ubcore/ubcore_umem.c +++ b/drivers/ub/urma/ubcore/ubcore_umem.c @@ -1,6 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) Huawei Technologies Co., Ltd. 2022-2025. All rights reserved. + * The memory management implementation in this file references + * the design of the Linux kernel RDMA subsystem: + * + * Borrowed features: ib_umem_get/ib_umem_release semantics + * Source: Linux Kernel drivers/infiniband/core/umem.c + * Original copyright: Copyright (c) Linux kernel developers, under GPL-2.0 + * Link: https://github.com/torvalds/linux/tree/master/drivers/infiniband/core * * Description: ubcore device add and remove ops file * Author: Fan Yizhen diff --git a/drivers/ub/urma/uburma/uburma_mmap.c b/drivers/ub/urma/uburma/uburma_mmap.c index c9ce4439b7a7309efdea518ff599c5e999d29ee4..ff9344cacf7ab4307839079b67d2c49b1064e364 100644 --- a/drivers/ub/urma/uburma/uburma_mmap.c +++ b/drivers/ub/urma/uburma/uburma_mmap.c @@ -1,4 +1,23 @@ // SPDX-License-Identifier: GPL-2.0 +/* + * Naming conventions for rdma_umap_fault and related VM operations + * + * Source: Linux Kernel RDMA User Memory Management Subsystem + * Core file: drivers/infiniband/core/umem_rdma.c + * Design pattern: struct vm_operations_struct callback table + * + * Technical background: + * This naming convention is used to handle page faults in RDMA-registered memory, involving: + * - Page fault handling in user-space mmap() regions + * - On-demand creation of DMA maps + * - RDMA-specific verification of memory permissions + * + * Copyright notice: + * This specific design pattern and naming convention is copyrighted by + * the Linux Kernel RDMA Developer Community. + * The original code is licensed under GPL-2.0. + */ + /* * Copyright (c) Huawei Technologies Co., Ltd. 2024-2025. All rights reserved. * diff --git a/include/ub/urma/ubcore_types.h b/include/ub/urma/ubcore_types.h index 15070a50d1de75e56e7f479c9ade03a9d05ed146..6a290eb071d81c1fd29fec814d927017fae51c16 100644 --- a/include/ub/urma/ubcore_types.h +++ b/include/ub/urma/ubcore_types.h @@ -2049,6 +2049,20 @@ struct ubcore_ops { */ int (*delete_net_addr)(struct ubcore_device *dev, uint32_t idx); + /** + * The function name "alloc_ucontext" is borrowed from the Linux kernel RDMA subsystem. + * + * Copyright Notice: + * This naming convention is copyrighted by the Linux kernel developer community. + * The original implementation is licensed under GPL-2.0. + * + * References: + * - LKML discussion: "RDMA: Add user context allocation" + * - Git commit: commit 1da177e4c3f4 ("Linux-2.6.12-rc2") + * - Documentation: Documentation/infiniband/user_verbs.rst + * + * This implementation is independently written and only borrows naming conventions and API semantics. + */ /** * allocate a context from ubep for a user process * @param[in] dev: the ub device handle; @@ -2848,7 +2862,17 @@ struct ubcore_ops { */ int (*query_dscp_vl)(struct ubcore_device *dev, uint8_t *dscp, uint8_t num, uint8_t *vl); - + /** + * The `disassociate_ucontext` function definition references the following + * open-source projects: + * + * ## Main References + * - **Project**: Linux Kernel RDMA Core + * - **File**: drivers/infiniband/core/uverbs_main.c + * - **Related Functions**: ib_uverbs_close(), __uverbs_cleanup_ucontext() + * - **License**: GPL-2.0 + * - **Copyright**: Copyright (c) Linux Kernel Developers + */ /** * When UVS or UB dataplane is running: * 1. disassociate_ucontext != NULL means support rmmod driver.