network: shorten conf parser names and realign gperf table

This commit is contained in:
Yu Watanabe
2025-08-14 22:34:44 +09:00
parent 9f94034ea8
commit f7dffbf835
25 changed files with 670 additions and 670 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -74,7 +74,7 @@ static int controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_me
return 0;
}
int config_parse_controlled_delay_u32(
int config_parse_codel_u32(
const char *unit,
const char *filename,
unsigned line,
@@ -126,7 +126,7 @@ int config_parse_controlled_delay_u32(
return 0;
}
int config_parse_controlled_delay_usec(
int config_parse_codel_usec(
const char *unit,
const char *filename,
unsigned line,
@@ -191,7 +191,7 @@ int config_parse_controlled_delay_usec(
return 0;
}
int config_parse_controlled_delay_bool(
int config_parse_codel_bool(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -17,6 +17,6 @@ typedef struct ControlledDelay {
DEFINE_QDISC_CAST(CODEL, ControlledDelay);
extern const QDiscVTable codel_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_controlled_delay_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_controlled_delay_usec);
CONFIG_PARSER_PROTOTYPE(config_parse_controlled_delay_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_codel_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_codel_usec);
CONFIG_PARSER_PROTOTYPE(config_parse_codel_bool);

View File

@@ -94,7 +94,7 @@ static int fair_queueing_controlled_delay_fill_message(Link *link, QDisc *qdisc,
return 0;
}
int config_parse_fair_queueing_controlled_delay_u32(
int config_parse_fq_codel_u32(
const char *unit,
const char *filename,
unsigned line,
@@ -154,7 +154,7 @@ int config_parse_fair_queueing_controlled_delay_u32(
return 0;
}
int config_parse_fair_queueing_controlled_delay_usec(
int config_parse_fq_codel_usec(
const char *unit,
const char *filename,
unsigned line,
@@ -219,7 +219,7 @@ int config_parse_fair_queueing_controlled_delay_usec(
return 0;
}
int config_parse_fair_queueing_controlled_delay_bool(
int config_parse_fq_codel_bool(
const char *unit,
const char *filename,
unsigned line,
@@ -264,7 +264,7 @@ int config_parse_fair_queueing_controlled_delay_bool(
return 0;
}
int config_parse_fair_queueing_controlled_delay_size(
int config_parse_fq_codel_size(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -21,7 +21,7 @@ typedef struct FairQueueingControlledDelay {
DEFINE_QDISC_CAST(FQ_CODEL, FairQueueingControlledDelay);
extern const QDiscVTable fq_codel_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_usec);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_size);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_codel_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_codel_usec);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_codel_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_codel_size);

View File

@@ -103,7 +103,7 @@ static int fair_queueing_fill_message(Link *link, QDisc *qdisc, sd_netlink_messa
return 0;
}
int config_parse_fair_queueing_u32(
int config_parse_fq_u32(
const char *unit,
const char *filename,
unsigned line,
@@ -167,7 +167,7 @@ int config_parse_fair_queueing_u32(
return 0;
}
int config_parse_fair_queueing_size(
int config_parse_fq_size(
const char *unit,
const char *filename,
unsigned line,
@@ -235,7 +235,7 @@ int config_parse_fair_queueing_size(
return 0;
}
int config_parse_fair_queueing_bool(
int config_parse_fq_bool(
const char *unit,
const char *filename,
unsigned line,
@@ -281,7 +281,7 @@ int config_parse_fair_queueing_bool(
return 0;
}
int config_parse_fair_queueing_usec(
int config_parse_fq_usec(
const char *unit,
const char *filename,
unsigned line,
@@ -341,7 +341,7 @@ int config_parse_fair_queueing_usec(
return 0;
}
int config_parse_fair_queueing_max_rate(
int config_parse_fq_max_rate(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -22,8 +22,8 @@ typedef struct FairQueueing {
DEFINE_QDISC_CAST(FQ, FairQueueing);
extern const QDiscVTable fq_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_size);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_usec);
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_max_rate);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_size);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_usec);
CONFIG_PARSER_PROTOTYPE(config_parse_fq_max_rate);

View File

@@ -65,7 +65,7 @@ static int generic_random_early_detection_verify(QDisc *qdisc) {
return 0;
}
int config_parse_generic_random_early_detection_u32(
int config_parse_gred_u32(
const char *unit,
const char *filename,
unsigned line,
@@ -131,7 +131,7 @@ int config_parse_generic_random_early_detection_u32(
return 0;
}
int config_parse_generic_random_early_detection_bool(
int config_parse_gred_bool(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -16,5 +16,5 @@ typedef struct GenericRandomEarlyDetection {
DEFINE_QDISC_CAST(GRED, GenericRandomEarlyDetection);
extern const QDiscVTable gred_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_generic_random_early_detection_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_generic_random_early_detection_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_gred_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_gred_bool);

View File

@@ -37,7 +37,7 @@ static int heavy_hitter_filter_fill_message(Link *link, QDisc *qdisc, sd_netlink
return 0;
}
int config_parse_heavy_hitter_filter_packet_limit(
int config_parse_hhf_packet_limit(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -14,4 +14,4 @@ typedef struct HeavyHitterFilter {
DEFINE_QDISC_CAST(HHF, HeavyHitterFilter);
extern const QDiscVTable hhf_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_heavy_hitter_filter_packet_limit);
CONFIG_PARSER_PROTOTYPE(config_parse_hhf_packet_limit);

View File

@@ -45,7 +45,7 @@ static int hierarchy_token_bucket_fill_message(Link *link, QDisc *qdisc, sd_netl
return 0;
}
int config_parse_hierarchy_token_bucket_default_class(
int config_parse_htb_default_class(
const char *unit,
const char *filename,
unsigned line,
@@ -97,7 +97,7 @@ int config_parse_hierarchy_token_bucket_default_class(
return 0;
}
int config_parse_hierarchy_token_bucket_u32(
int config_parse_htb_u32(
const char *unit,
const char *filename,
unsigned line,
@@ -239,7 +239,7 @@ static int hierarchy_token_bucket_class_fill_message(Link *link, TClass *tclass,
return 0;
}
int config_parse_hierarchy_token_bucket_class_u32(
int config_parse_htb_class_u32(
const char *unit,
const char *filename,
unsigned line,
@@ -292,7 +292,7 @@ int config_parse_hierarchy_token_bucket_class_u32(
return 0;
}
int config_parse_hierarchy_token_bucket_class_size(
int config_parse_htb_class_size(
const char *unit,
const char *filename,
unsigned line,
@@ -375,7 +375,7 @@ int config_parse_hierarchy_token_bucket_class_size(
return 0;
}
int config_parse_hierarchy_token_bucket_class_rate(
int config_parse_htb_class_rate(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -15,8 +15,8 @@ typedef struct HierarchyTokenBucket {
DEFINE_QDISC_CAST(HTB, HierarchyTokenBucket);
extern const QDiscVTable htb_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_default_class);
CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_htb_default_class);
CONFIG_PARSER_PROTOTYPE(config_parse_htb_u32);
typedef struct HierarchyTokenBucketClass {
TClass meta;
@@ -34,6 +34,6 @@ typedef struct HierarchyTokenBucketClass {
DEFINE_TCLASS_CAST(HTB, HierarchyTokenBucketClass);
extern const TClassVTable htb_tclass_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_class_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_class_size);
CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_class_rate);
CONFIG_PARSER_PROTOTYPE(config_parse_htb_class_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_htb_class_size);
CONFIG_PARSER_PROTOTYPE(config_parse_htb_class_rate);

View File

@@ -48,7 +48,7 @@ static int network_emulator_fill_message(Link *link, QDisc *qdisc, sd_netlink_me
return 0;
}
int config_parse_network_emulator_delay(
int config_parse_netem_delay(
const char *unit,
const char *filename,
unsigned line,
@@ -109,7 +109,7 @@ int config_parse_network_emulator_delay(
return 0;
}
int config_parse_network_emulator_rate(
int config_parse_netem_rate(
const char *unit,
const char *filename,
unsigned line,
@@ -169,7 +169,7 @@ int config_parse_network_emulator_rate(
return 0;
}
int config_parse_network_emulator_packet_limit(
int config_parse_netem_packet_limit(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -19,6 +19,6 @@ typedef struct NetworkEmulator {
DEFINE_QDISC_CAST(NETEM, NetworkEmulator);
extern const QDiscVTable netem_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_delay);
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_rate);
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_packet_limit);
CONFIG_PARSER_PROTOTYPE(config_parse_netem_delay);
CONFIG_PARSER_PROTOTYPE(config_parse_netem_rate);
CONFIG_PARSER_PROTOTYPE(config_parse_netem_packet_limit);

View File

@@ -52,7 +52,7 @@ static int quick_fair_queueing_class_fill_message(Link *link, TClass *tclass, sd
return 0;
}
int config_parse_quick_fair_queueing_weight(
int config_parse_qfq_weight(
const char *unit,
const char *filename,
unsigned line,
@@ -112,7 +112,7 @@ int config_parse_quick_fair_queueing_weight(
return 0;
}
int config_parse_quick_fair_queueing_max_packet(
int config_parse_qfq_max_packet(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -23,5 +23,5 @@ typedef struct QuickFairQueueingClass {
DEFINE_TCLASS_CAST(QFQ, QuickFairQueueingClass);
extern const TClassVTable qfq_tclass_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_quick_fair_queueing_weight);
CONFIG_PARSER_PROTOTYPE(config_parse_quick_fair_queueing_max_packet);
CONFIG_PARSER_PROTOTYPE(config_parse_qfq_weight);
CONFIG_PARSER_PROTOTYPE(config_parse_qfq_max_packet);

View File

@@ -47,7 +47,7 @@ static int stochastic_fair_blue_fill_message(Link *link, QDisc *qdisc, sd_netlin
return 0;
}
int config_parse_stochastic_fair_blue_u32(
int config_parse_sfb_u32(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -14,4 +14,4 @@ typedef struct StochasticFairBlue {
DEFINE_QDISC_CAST(SFB, StochasticFairBlue);
extern const QDiscVTable sfb_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_stochastic_fair_blue_u32);
CONFIG_PARSER_PROTOTYPE(config_parse_sfb_u32);

View File

@@ -30,7 +30,7 @@ static int stochastic_fairness_queueing_fill_message(Link *link, QDisc *qdisc, s
return 0;
}
int config_parse_stochastic_fairness_queueing_perturb_period(
int config_parse_sfq_perturb_period(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -14,4 +14,4 @@ typedef struct StochasticFairnessQueueing {
DEFINE_QDISC_CAST(SFQ, StochasticFairnessQueueing);
extern const QDiscVTable sfq_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_stochastic_fairness_queueing_perturb_period);
CONFIG_PARSER_PROTOTYPE(config_parse_sfq_perturb_period);

View File

@@ -108,7 +108,7 @@ static int token_bucket_filter_fill_message(Link *link, QDisc *qdisc, sd_netlink
return 0;
}
int config_parse_token_bucket_filter_size(
int config_parse_tbf_size(
const char *unit,
const char *filename,
unsigned line,
@@ -181,7 +181,7 @@ int config_parse_token_bucket_filter_size(
return 0;
}
int config_parse_token_bucket_filter_rate(
int config_parse_tbf_rate(
const char *unit,
const char *filename,
unsigned line,
@@ -242,7 +242,7 @@ int config_parse_token_bucket_filter_rate(
return 0;
}
int config_parse_token_bucket_filter_latency(
int config_parse_tbf_latency(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -20,6 +20,6 @@ typedef struct TokenBucketFilter {
DEFINE_QDISC_CAST(TBF, TokenBucketFilter);
extern const QDiscVTable tbf_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_token_bucket_filter_latency);
CONFIG_PARSER_PROTOTYPE(config_parse_token_bucket_filter_size);
CONFIG_PARSER_PROTOTYPE(config_parse_token_bucket_filter_rate);
CONFIG_PARSER_PROTOTYPE(config_parse_tbf_latency);
CONFIG_PARSER_PROTOTYPE(config_parse_tbf_size);
CONFIG_PARSER_PROTOTYPE(config_parse_tbf_rate);

View File

@@ -41,7 +41,7 @@ const QDiscVTable teql_vtable = {
.is_ready = trivial_link_equalizer_is_ready,
};
int config_parse_trivial_link_equalizer_id(
int config_parse_teql_id(
const char *unit,
const char *filename,
unsigned line,

View File

@@ -13,4 +13,4 @@ typedef struct TrivialLinkEqualizer {
DEFINE_QDISC_CAST(TEQL, TrivialLinkEqualizer);
extern const QDiscVTable teql_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_trivial_link_equalizer_id);
CONFIG_PARSER_PROTOTYPE(config_parse_teql_id);