summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-12-11 11:25:09 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-12-11 12:12:22 +0100
commit042fc950eafe311eb6433311b66a1703d7c86069 (patch)
tree5911f7f0db325017a6552a39847b3e021a388fd2
parentMerge pull request #14303 from yuwata/tc-use-typesafe-functions (diff)
downloadsystemd-042fc950eafe311eb6433311b66a1703d7c86069.tar.xz
systemd-042fc950eafe311eb6433311b66a1703d7c86069.zip
network: tc: drop unused functions
-rw-r--r--src/network/tc/fq-codel.c12
-rw-r--r--src/network/tc/fq-codel.h1
-rw-r--r--src/network/tc/netem.c17
-rw-r--r--src/network/tc/netem.h1
-rw-r--r--src/network/tc/sfq.c12
-rw-r--r--src/network/tc/sfq.h1
-rw-r--r--src/network/tc/tbf.c12
-rw-r--r--src/network/tc/tbf.h1
8 files changed, 0 insertions, 57 deletions
diff --git a/src/network/tc/fq-codel.c b/src/network/tc/fq-codel.c
index ae872c686f..6a0cc21cd6 100644
--- a/src/network/tc/fq-codel.c
+++ b/src/network/tc/fq-codel.c
@@ -10,18 +10,6 @@
#include "qdisc.h"
#include "string-util.h"
-int fair_queuing_controlled_delay_new(FairQueuingControlledDelay **ret) {
- FairQueuingControlledDelay *fqcd = NULL;
-
- fqcd = new0(FairQueuingControlledDelay, 1);
- if (!fqcd)
- return -ENOMEM;
-
- *ret = TAKE_PTR(fqcd);
-
- return 0;
-}
-
int fair_queuing_controlled_delay_fill_message(Link *link, const FairQueuingControlledDelay *fqcd, sd_netlink_message *req) {
int r;
diff --git a/src/network/tc/fq-codel.h b/src/network/tc/fq-codel.h
index 0ddb5099a8..c83a835653 100644
--- a/src/network/tc/fq-codel.h
+++ b/src/network/tc/fq-codel.h
@@ -11,7 +11,6 @@ typedef struct FairQueuingControlledDelay {
uint32_t limit;
} FairQueuingControlledDelay;
-int fair_queuing_controlled_delay_new(FairQueuingControlledDelay **ret);
int fair_queuing_controlled_delay_fill_message(Link *link, const FairQueuingControlledDelay *sfq, sd_netlink_message *req);
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queuing_controlled_delay_limit);
diff --git a/src/network/tc/netem.c b/src/network/tc/netem.c
index 25a53150b0..4e094b6d10 100644
--- a/src/network/tc/netem.c
+++ b/src/network/tc/netem.c
@@ -13,23 +13,6 @@
#include "string-util.h"
#include "tc-util.h"
-int network_emulator_new(NetworkEmulator **ret) {
- NetworkEmulator *ne = NULL;
-
- ne = new(NetworkEmulator, 1);
- if (!ne)
- return -ENOMEM;
-
- *ne = (NetworkEmulator) {
- .delay = USEC_INFINITY,
- .jitter = USEC_INFINITY,
- };
-
- *ret = TAKE_PTR(ne);
-
- return 0;
-}
-
int network_emulator_fill_message(Link *link, const NetworkEmulator *ne, sd_netlink_message *req) {
struct tc_netem_qopt opt = {
.limit = 1000,
diff --git a/src/network/tc/netem.h b/src/network/tc/netem.h
index 66c3476a6b..94da2670e6 100644
--- a/src/network/tc/netem.h
+++ b/src/network/tc/netem.h
@@ -17,7 +17,6 @@ typedef struct NetworkEmulator {
uint32_t duplicate;
} NetworkEmulator;
-int network_emulator_new(NetworkEmulator **ret);
int network_emulator_fill_message(Link *link, const NetworkEmulator *ne, sd_netlink_message *req);
CONFIG_PARSER_PROTOTYPE(config_parse_tc_network_emulator_delay);
diff --git a/src/network/tc/sfq.c b/src/network/tc/sfq.c
index 393b0e12e1..607b9a83a8 100644
--- a/src/network/tc/sfq.c
+++ b/src/network/tc/sfq.c
@@ -11,18 +11,6 @@
#include "sfq.h"
#include "string-util.h"
-int stochastic_fairness_queueing_new(StochasticFairnessQueueing **ret) {
- StochasticFairnessQueueing *sfq = NULL;
-
- sfq = new0(StochasticFairnessQueueing, 1);
- if (!sfq)
- return -ENOMEM;
-
- *ret = TAKE_PTR(sfq);
-
- return 0;
-}
-
int stochastic_fairness_queueing_fill_message(Link *link, const StochasticFairnessQueueing *sfq, sd_netlink_message *req) {
struct tc_sfq_qopt_v1 opt = {};
int r;
diff --git a/src/network/tc/sfq.h b/src/network/tc/sfq.h
index 8c00e0e713..529d9e9680 100644
--- a/src/network/tc/sfq.h
+++ b/src/network/tc/sfq.h
@@ -11,7 +11,6 @@ typedef struct StochasticFairnessQueueing {
usec_t perturb_period;
} StochasticFairnessQueueing;
-int stochastic_fairness_queueing_new(StochasticFairnessQueueing **ret);
int stochastic_fairness_queueing_fill_message(Link *link, const StochasticFairnessQueueing *sfq, sd_netlink_message *req);
CONFIG_PARSER_PROTOTYPE(config_parse_tc_stochastic_fairness_queueing_perturb_period);
diff --git a/src/network/tc/tbf.c b/src/network/tc/tbf.c
index eff5c1db7c..a2d234be9a 100644
--- a/src/network/tc/tbf.c
+++ b/src/network/tc/tbf.c
@@ -15,18 +15,6 @@
#include "tc-util.h"
#include "util.h"
-int token_buffer_filter_new(TokenBufferFilter **ret) {
- TokenBufferFilter *ne = NULL;
-
- ne = new0(TokenBufferFilter, 1);
- if (!ne)
- return -ENOMEM;
-
- *ret = TAKE_PTR(ne);
-
- return 0;
-}
-
int token_buffer_filter_fill_message(Link *link, const TokenBufferFilter *tbf, sd_netlink_message *req) {
uint32_t rtab[256], ptab[256];
struct tc_tbf_qopt opt = {};
diff --git a/src/network/tc/tbf.h b/src/network/tc/tbf.h
index e0bdc3b85f..166350a133 100644
--- a/src/network/tc/tbf.h
+++ b/src/network/tc/tbf.h
@@ -19,7 +19,6 @@ typedef struct TokenBufferFilter {
size_t mpu;
} TokenBufferFilter;
-int token_buffer_filter_new(TokenBufferFilter **ret);
int token_buffer_filter_fill_message(Link *link, const TokenBufferFilter *tbf, sd_netlink_message *req);
int token_buffer_filter_section_verify(const TokenBufferFilter *tbf, const NetworkConfigSection *section);