summaryrefslogtreecommitdiffstats
path: root/userspace
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 12:02:40 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 12:02:40 -0400
commitb232f7d82c699c4a1e922a0d045337d29dab824b (patch)
treeee8686f5014cf9724405184e813438c9882961b8 /userspace
parentb7d833672f95d00a0fe86cbaa1370e9a062cd363 (diff)
parentd380e5a46850000120b8745d50b5c167a4404fb1 (diff)
downloadopen-iov-b232f7d82c699c4a1e922a0d045337d29dab824b.tar.gz
open-iov-b232f7d82c699c4a1e922a0d045337d29dab824b.zip
merge ws/code-standards: editorconfig/clang-format, userspace style doc, SPDX sweep, conventions (handoff-code-standards.txt)
Diffstat (limited to 'userspace')
-rw-r--r--userspace/.clang-format18
-rw-r--r--userspace/examples/example_vgpu.c2
-rw-r--r--userspace/include/libvgpu.h2
-rw-r--r--userspace/lib/libvgpu.c2
-rw-r--r--userspace/lib/rpc_emulator.c2
-rw-r--r--userspace/lib/rpc_emulator.h2
-rw-r--r--userspace/tests/test_guest_init.c2
-rw-r--r--userspace/tests/test_host_init.c2
-rw-r--r--userspace/tests/test_vgpu_userspace.c2
9 files changed, 34 insertions, 0 deletions
diff --git a/userspace/.clang-format b/userspace/.clang-format
new file mode 100644
index 0000000..e331ac6
--- /dev/null
+++ b/userspace/.clang-format
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Userspace library style: LLVM base, 4-space indent, ~100 columns
+# (see docs/07-developers/onboarding-and-standards.md 3.2).
+# Existing files are NOT to be mass-reformatted; this config governs new
+# code and hunks that are already being edited.
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AllowShortFunctionsOnASingleLine: Empty
+BreakBeforeBraces: Attach
+ColumnLimit: 100
+DerivePointerAlignment: false
+IndentWidth: 4
+PointerAlignment: Right
+SortIncludes: Never
+TabWidth: 4
+UseTab: Never
diff --git a/userspace/examples/example_vgpu.c b/userspace/examples/example_vgpu.c
index ede6873..735f0b3 100644
--- a/userspace/examples/example_vgpu.c
+++ b/userspace/examples/example_vgpu.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* GSP vGPU-IO Example Application
* Demonstrates basic VF creation, memory allocation, and BAR configuration
diff --git a/userspace/include/libvgpu.h b/userspace/include/libvgpu.h
index 7f6505b..33fbfb5 100644
--- a/userspace/include/libvgpu.h
+++ b/userspace/include/libvgpu.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* GSP vGPU-IO Userspace Library (libvgpu)
* Simple C API for VF management and GPU operations
diff --git a/userspace/lib/libvgpu.c b/userspace/lib/libvgpu.c
index a25a228..bd27610 100644
--- a/userspace/lib/libvgpu.c
+++ b/userspace/lib/libvgpu.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* GSP vGPU-IO Userspace Library Implementation
*/
diff --git a/userspace/lib/rpc_emulator.c b/userspace/lib/rpc_emulator.c
index 9f7f2c7..3a74b9c 100644
--- a/userspace/lib/rpc_emulator.c
+++ b/userspace/lib/rpc_emulator.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* GSP vGPU-IO Userspace RPC Emulator
*
diff --git a/userspace/lib/rpc_emulator.h b/userspace/lib/rpc_emulator.h
index 1b641bf..35cb76e 100644
--- a/userspace/lib/rpc_emulator.h
+++ b/userspace/lib/rpc_emulator.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* GSP vGPU-IO Userspace RPC Emulator - Header
*/
diff --git a/userspace/tests/test_guest_init.c b/userspace/tests/test_guest_init.c
index 135c16f..4148da6 100644
--- a/userspace/tests/test_guest_init.c
+++ b/userspace/tests/test_guest_init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* Test for guest vGPU driver initialization
* This test verifies that the guest vGPU driver can initialize properly
diff --git a/userspace/tests/test_host_init.c b/userspace/tests/test_host_init.c
index a08fe33..aa3ddbb 100644
--- a/userspace/tests/test_host_init.c
+++ b/userspace/tests/test_host_init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* Test for host vGPU initialization
*/
diff --git a/userspace/tests/test_vgpu_userspace.c b/userspace/tests/test_vgpu_userspace.c
index cd22111..5858dbe 100644
--- a/userspace/tests/test_vgpu_userspace.c
+++ b/userspace/tests/test_vgpu_userspace.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* GSP vGPU-IO Userspace Test
* Tests VFIO interface and driver functionality from userspace