Skip to content

Commit ca44c3f

Browse files
committed
Rename C++ headers to .hpp and make checkpatch only check C code.
1 parent 4395739 commit ca44c3f

File tree

12 files changed

+14
-13
lines changed

12 files changed

+14
-13
lines changed

code_check/check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SCRIPT_DIR="$(dirname ${BASH_SOURCE})"
2424
CHECKPATCH="${SCRIPT_DIR}/_checkpatch.pl"
2525

2626
function check_diff () {
27-
git -C "${SCRIPT_DIR}/.." diff "${DIFF}" | "${CHECKPATCH}" ${CHECKPATCH_OPTS}
27+
git -C "${SCRIPT_DIR}/.." diff "${DIFF}" -- '*.c' '*.h' | "${CHECKPATCH}" ${CHECKPATCH_OPTS}
2828
}
2929

3030
function check_file() {

include/dp_nat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct nat_entry {
3333
uint16_t port_range[2];
3434
uint32_t vni;
3535
union dp_ipv6 dst_ipv6;
36+
// checkpatch silencing comment
3637
TAILQ_ENTRY(nat_entry) entries;
3738
};
3839

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <grpcpp/server_context.h>
1414
#include "dp_error.h"
1515
#include "dp_grpc_api.h"
16-
#include "dp_grpc_conv.h"
16+
#include "dp_grpc_conv.hpp"
1717
#include "dp_firewall.h"
1818

1919
// unfortunately, templates are not usable due to the fact that the RequestXxx() is always different
@@ -52,7 +52,7 @@ using grpc::ServerCompletionQueue;
5252

5353
using namespace dpdkironcore::v1;
5454

55-
#include "dp_grpc_service.h"
55+
#include "dp_grpc_service.hpp"
5656

5757
enum CallState { REQUEST, AWAIT_MSG, FINISH };
5858

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <grpcpp/server_context.h>
1616
#include <uuid/uuid.h>
1717

18-
#include "grpc/dp_grpc_health.h"
18+
#include "grpc/dp_grpc_health.hpp"
1919

2020
#define DP_UUID_SIZE 37
2121

src/dpdk_layer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "dp_mbuf_dyn.h"
1212
#include "dp_timers.h"
1313
#include "dp_util.h"
14-
#include "grpc/dp_grpc_service.h"
14+
#include "grpc/dp_grpc_service.hpp"
1515
#include "grpc/dp_grpc_thread.h"
1616
#include "nodes/rx_node.h"
1717

src/grpc/dp_async_grpc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
#include "grpc/dp_async_grpc.h"
4+
#include "grpc/dp_async_grpc.hpp"
55
#include <arpa/inet.h>
66
#include <rte_ether.h>
77
#include <rte_mbuf.h>
88
#include "dp_log.h"
99
#include "dp_lpm.h"
1010
#include "dp_util.h"
11-
#include "grpc/dp_grpc_conv.h"
12-
#include "grpc/dp_grpc_service.h"
11+
#include "grpc/dp_grpc_conv.hpp"
12+
#include "grpc/dp_grpc_service.hpp"
1313

1414
// this is arbitrary, just not error or DP_OK
1515
#define DP_GRPC_REPLY_NOT_READY 1

src/grpc/dp_grpc_conv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
#include "grpc/dp_grpc_conv.h"
4+
#include "grpc/dp_grpc_conv.hpp"
55
#include "dp_error.h"
66
#include "dp_log.h"
77

src/grpc/dp_grpc_health.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
#include "grpc/dp_grpc_health.h"
4+
#include "grpc/dp_grpc_health.hpp"
55
#include "../proto/dpdk.grpc.pb.h"
66

77
void HealthService::SetServingStatus(grpc::health::v1::HealthCheckResponse::ServingStatus newStatus)

0 commit comments

Comments
 (0)