Skip to content

Commit

Permalink
remove unused includes in dataplane and autotest
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Aitov authored and taitov committed Jan 10, 2024
1 parent 99cad24 commit 76a1c76
Show file tree
Hide file tree
Showing 23 changed files with 17 additions and 29 deletions.
3 changes: 0 additions & 3 deletions autotest/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

#include <stdio.h>

#include "common/define.h"
#include "common/type.h"

#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
Expand Down
1 change: 0 additions & 1 deletion autotest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "common/result.h"

#include "autotest.h"
#include "common.h"

common::log::LogPriority common::log::logPriority = common::log::TLOG_DEBUG;

Expand Down
1 change: 0 additions & 1 deletion common/acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "stream.h"
#include "type.h"
#include "uint128.h"

namespace common::acl
{
Expand Down
2 changes: 1 addition & 1 deletion common/balancer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "type.h"
#include <inttypes.h>

namespace balancer
{
Expand Down
1 change: 0 additions & 1 deletion common/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "define.h"
#include "stream.h"
#include "type.h"

namespace common
{
Expand Down
3 changes: 0 additions & 3 deletions common/icp_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

#include "libprotobuf/controlplane.pb.h"

#include "icp.h"
#include "sendrecv.h"

namespace common::icp_proto
{
constexpr inline char socketPath[] = "/run/yanet/protocontrolplane.sock";
Expand Down
1 change: 0 additions & 1 deletion common/idataplane.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <sys/un.h>

#include "define.h"
#include "idp.h"
#include "result.h"
#include "sendrecv.h"
Expand Down
4 changes: 3 additions & 1 deletion common/refarray.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#include <atomic>
#include <cstdio>
#include <optional>

#include "type.h"
#include "define.h"

namespace common
{
Expand Down
5 changes: 2 additions & 3 deletions common/scheduler.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "type.h"
#include <inttypes.h>

namespace balancer
{
Expand All @@ -19,8 +19,7 @@ class scheduler_params
uint32_t wlc_power;
};

YANET_UNUSED
constexpr const char* to_string(const scheduler& scheduler)
[[maybe_unused]] constexpr const char* to_string(const scheduler& scheduler)
{
switch (scheduler)
{
Expand Down
1 change: 0 additions & 1 deletion common/weight.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <atomic>

#include "refarray.h"
#include "type.h"

namespace common
{
Expand Down
2 changes: 0 additions & 2 deletions dataplane/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#include <rte_tcp.h>
#include <rte_udp.h>

#include "common/result.h"

#include "type.h"

namespace dataplane::base
Expand Down
1 change: 0 additions & 1 deletion dataplane/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "common/idp.h"
#include "common/result.h"
#include "common/type.h"

#include "type.h"

Expand Down
1 change: 1 addition & 0 deletions dataplane/controlplane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <rte_lcore.h>
#include <rte_malloc.h>

#include "common/fallback.h"
#include "common/version.h"

#include "checksum.h"
Expand Down
1 change: 1 addition & 0 deletions dataplane/dataplane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <rte_lcore.h>
#include <rte_malloc.h>
#include <rte_ring.h>
#include <rte_version.h>

#include <numa.h>
#include <numaif.h>
Expand Down
2 changes: 2 additions & 0 deletions dataplane/dregress.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <rte_tcp.h>
#include <rte_udp.h>

#include "common/fallback.h"

#include "checksum.h"
#include "controlplane.h"
#include "dregress.h"
Expand Down
1 change: 0 additions & 1 deletion dataplane/dregress.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "common/btree.h"
#include "common/idp.h"
#include "common/result.h"
#include "common/type.h"

#include "hashtable.h"
Expand Down
1 change: 0 additions & 1 deletion dataplane/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <vector>

#include "common/config.h"
#include "common/define.h"
#include "common/result.h"
#include "common/type.h"
Expand Down
1 change: 0 additions & 1 deletion dataplane/fragmentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include <rte_mbuf.h>

#include "common/result.h"
#include "common/type.h"

#include "type.h"
Expand Down
1 change: 0 additions & 1 deletion dataplane/report.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "common/result.h"
#include "common/type.h"

#include "hashtable.h"
#include "type.h"

class cReport
Expand Down
4 changes: 2 additions & 2 deletions dataplane/sharedmemory.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <rte_mbuf.h>

#include "common/bufferring.h"
#include "common/result.h"
#include "rte_mbuf.h"
#include "type.h"

class cSharedMemory
{
Expand Down
3 changes: 0 additions & 3 deletions dataplane/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@

#include "common/balancer.h"
#include "common/config.h"
#include "common/fallback.h"
#include "common/scheduler.h"
#include "common/type.h"

#include "common.h"

class cDataPlane;
class cControlPlane;
class cWorker;
Expand Down
5 changes: 4 additions & 1 deletion dataplane/worker.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#include <netinet/icmp6.h>
#include <netinet/ip_icmp.h>

#include <string>
#include <thread>

Expand All @@ -13,11 +16,11 @@
#include <rte_udp.h>

#include "common/counters.h"
#include "common/fallback.h"

#include "checksum.h"
#include "common.h"
#include "dataplane.h"
#include "icmp.h"
#include "metadata.h"
#include "prepare.h"
#include "worker.h"
Expand Down
1 change: 1 addition & 0 deletions dataplane/worker_gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <rte_ethdev.h>

#include "common/counters.h"
#include "common/fallback.h"

#include "controlplane.h"
#include "dataplane.h"
Expand Down

0 comments on commit 76a1c76

Please sign in to comment.