From 46fc50aaae7838248b368e1fa5690a4d52e9d488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarom=C3=ADr=20Smr=C4=8Dek?= <4plague@gmail.com> Date: Wed, 6 Dec 2023 13:20:21 +0100 Subject: [PATCH] Add SPDX to generated source/header files --- .reuse/dep5 | 4 ---- docs/deployment/help_dpservice-dump.md | 1 - hack/dp_conf_generate.py | 7 +++++++ include/dp_conf_opts.h | 3 +++ src/dp_conf_opts.c | 3 +++ tools/dump/opts.c | 4 +++- tools/dump/opts.h | 4 +++- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.reuse/dep5 b/.reuse/dep5 index b61a576de..da9941af4 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -18,11 +18,7 @@ Files: *meson.build proto/dpdk.proto meson_options.txt - include/dp_conf_opts.h include/dp_version.h.in - src/dp_conf_opts.c - tools/dump/opts.c - tools/dump/opts.h Copyright: 2023 SAP SE or an SAP affiliate company and IronCore contributors License: Apache-2.0 diff --git a/docs/deployment/help_dpservice-dump.md b/docs/deployment/help_dpservice-dump.md index e2d8639c7..0a2767c93 100644 --- a/docs/deployment/help_dpservice-dump.md +++ b/docs/deployment/help_dpservice-dump.md @@ -7,7 +7,6 @@ | --drops | None | show dropped packets | | | --nodes | REGEX | show graph node traversal, limit to REGEX-matched nodes (empty string for all) | | | --filter | FILTER | show only packets matching a pcap-style FILTER | | -| --hw | None | capture offloaded packets (only outgoing VF->PF packets supported) | | | --pcap | FILE | write packets into a PCAP file | | | --stop | None | do nothing, only make sure tracing is disabled in dp-service | | diff --git a/hack/dp_conf_generate.py b/hack/dp_conf_generate.py index 137ddc8be..998994cfc 100755 --- a/hack/dp_conf_generate.py +++ b/hack/dp_conf_generate.py @@ -327,6 +327,11 @@ def generate_md(options): print("") +def print_license(): + print("// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors") + print("// SPDX-License-Identifier: Apache-2.0") + print("") + def print_warning(): print("/***********************************************************************/") print("/* DO NOT EDIT THIS FILE */") @@ -360,11 +365,13 @@ def print_warning(): with open(source, "w") as outfile: sys.stdout = outfile + print_license() print_warning() generate_c(options) with open(header, "w") as outfile: sys.stdout = outfile + print_license() print_warning() generate_h(options) diff --git a/include/dp_conf_opts.h b/include/dp_conf_opts.h index 6d39d7193..786762a90 100644 --- a/include/dp_conf_opts.h +++ b/include/dp_conf_opts.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + /***********************************************************************/ /* DO NOT EDIT THIS FILE */ /* */ diff --git a/src/dp_conf_opts.c b/src/dp_conf_opts.c index 4f839583c..fc3e73e46 100644 --- a/src/dp_conf_opts.c +++ b/src/dp_conf_opts.c @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + /***********************************************************************/ /* DO NOT EDIT THIS FILE */ /* */ diff --git a/tools/dump/opts.c b/tools/dump/opts.c index 9ba604e27..c2e166b54 100644 --- a/tools/dump/opts.c +++ b/tools/dump/opts.c @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + /***********************************************************************/ /* DO NOT EDIT THIS FILE */ /* */ @@ -65,7 +68,6 @@ static inline void dp_argparse_help(const char *progname, FILE *outfile) " --drops show dropped packets\n" " --nodes=REGEX show graph node traversal, limit to REGEX-matched nodes (empty string for all)\n" " --filter=FILTER show only packets matching a pcap-style FILTER\n" - " --hw capture offloaded packets (only outgoing VF->PF packets supported)\n" " --pcap=FILE write packets into a PCAP file\n" " --stop do nothing, only make sure tracing is disabled in dp-service\n" , progname); diff --git a/tools/dump/opts.h b/tools/dump/opts.h index 6c8830f27..703208ca3 100644 --- a/tools/dump/opts.h +++ b/tools/dump/opts.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + /***********************************************************************/ /* DO NOT EDIT THIS FILE */ /* */ @@ -6,7 +9,6 @@ /***********************************************************************/ bool dp_conf_is_showing_drops(void); -bool dp_conf_is_offload_enabled(void); bool dp_conf_is_stop_mode(void); enum dp_conf_runmode {