Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
commit
ee5d4b24e3
|
|
@ -117,7 +117,7 @@ main(int argc, char **argv)
|
||||||
if (matches(opt, "-help") == 0) {
|
if (matches(opt, "-help") == 0) {
|
||||||
usage();
|
usage();
|
||||||
} else if (matches(opt, "-Version") == 0) {
|
} else if (matches(opt, "-Version") == 0) {
|
||||||
printf("bridge utility, 0.0\n");
|
printf("bridge utility, %s\n", version);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (matches(opt, "-stats") == 0 ||
|
} else if (matches(opt, "-stats") == 0 ||
|
||||||
matches(opt, "-statistics") == 0) {
|
matches(opt, "-statistics") == 0) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@
|
||||||
#include "libnetlink.h"
|
#include "libnetlink.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
#ifndef __aligned
|
||||||
#define __aligned(x) __attribute__((aligned(x)))
|
#define __aligned(x) __attribute__((aligned(x)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SOL_NETLINK
|
#ifndef SOL_NETLINK
|
||||||
#define SOL_NETLINK 270
|
#define SOL_NETLINK 270
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ the following additional arguments are supported:
|
||||||
- either 802.1Q or 802.1ad.
|
- either 802.1Q or 802.1ad.
|
||||||
|
|
||||||
.BI id " VLANID "
|
.BI id " VLANID "
|
||||||
- specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
|
- specifies the VLAN Identifier to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadecimal, respectively.
|
||||||
|
|
||||||
.BR reorder_hdr " { " on " | " off " } "
|
.BR reorder_hdr " { " on " | " off " } "
|
||||||
- specifies whether ethernet headers are reordered or not (default is
|
- specifies whether ethernet headers are reordered or not (default is
|
||||||
|
|
@ -575,7 +575,7 @@ the following additional arguments are supported:
|
||||||
.in +8
|
.in +8
|
||||||
.sp
|
.sp
|
||||||
.BI id " VNI "
|
.BI id " VNI "
|
||||||
- specifies the VXLAN Network Identifer (or VXLAN Segment
|
- specifies the VXLAN Network Identifier (or VXLAN Segment
|
||||||
Identifier) to use.
|
Identifier) to use.
|
||||||
|
|
||||||
.BI dev " PHYS_DEV"
|
.BI dev " PHYS_DEV"
|
||||||
|
|
@ -1240,7 +1240,7 @@ the following additional arguments are supported:
|
||||||
.in +8
|
.in +8
|
||||||
.sp
|
.sp
|
||||||
.BI id " VNI "
|
.BI id " VNI "
|
||||||
- specifies the Virtual Network Identifer to use.
|
- specifies the Virtual Network Identifier to use.
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
.BI remote " IPADDR"
|
.BI remote " IPADDR"
|
||||||
|
|
@ -2507,7 +2507,7 @@ specifies the device to display address-family statistics for.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.I "TYPE"
|
.I "TYPE"
|
||||||
specifies which help of link type to dislpay.
|
specifies which help of link type to display.
|
||||||
|
|
||||||
.SS
|
.SS
|
||||||
.I GROUP
|
.I GROUP
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ type.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
This tool can be used to configure the 802.1AE keys of the interface. Note that 802.1AE uses GCM-AES
|
This tool can be used to configure the 802.1AE keys of the interface. Note that 802.1AE uses GCM-AES
|
||||||
with a initialization vector (IV) derived from the packet number. The same key must not be used
|
with a initialization vector (IV) derived from the packet number. The same key must not be used
|
||||||
with the same IV more than once. Instead, keys must be frequently regenerated and distibuted.
|
with the same IV more than once. Instead, keys must be frequently regenerated and distributed.
|
||||||
This tool is thus mostly for debugging and testing, or in combination with a user-space application
|
This tool is thus mostly for debugging and testing, or in combination with a user-space application
|
||||||
that reconfigures the keys. It is wrong to just configure the keys statically and assume them to work
|
that reconfigures the keys. It is wrong to just configure the keys statically and assume them to work
|
||||||
indefinitely. The suggested and standardized way for key management is 802.1X-2010, which is implemented
|
indefinitely. The suggested and standardized way for key management is 802.1X-2010, which is implemented
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,11 @@ the interface to which this neighbour is attached.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI proxy
|
.BI proxy
|
||||||
indicates whether we are proxying for this neigbour entry
|
indicates whether we are proxying for this neighbour entry
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI router
|
.BI router
|
||||||
indicates whether neigbour is a router
|
indicates whether neighbour is a router
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI extern_learn
|
.BI extern_learn
|
||||||
|
|
@ -244,7 +244,7 @@ lookup a neighbour entry to a destination given a device
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI proxy
|
.BI proxy
|
||||||
indicates whether we should lookup a proxy neigbour entry
|
indicates whether we should lookup a proxy neighbour entry
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI to " ADDRESS " (default)
|
.BI to " ADDRESS " (default)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ how long time the timer will expire
|
||||||
.P
|
.P
|
||||||
.TP
|
.TP
|
||||||
.B <retrans>
|
.B <retrans>
|
||||||
how many times the retransmission occured
|
how many times the retransmission occurred
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B \-e, \-\-extended
|
.B \-e, \-\-extended
|
||||||
|
|
|
||||||
|
|
@ -413,9 +413,9 @@ suffered by Australasian residents. Equivalent to
|
||||||
.SH FLOW ISOLATION PARAMETERS
|
.SH FLOW ISOLATION PARAMETERS
|
||||||
With flow isolation enabled, CAKE places packets from different flows into
|
With flow isolation enabled, CAKE places packets from different flows into
|
||||||
different queues, each of which carries its own AQM state. Packets from each
|
different queues, each of which carries its own AQM state. Packets from each
|
||||||
queue are then delivered fairly, according to a DRR++ algorithm which minimises
|
queue are then delivered fairly, according to a DRR++ algorithm which minimizes
|
||||||
latency for "sparse" flows. CAKE uses a set-associative hashing algorithm to
|
latency for "sparse" flows. CAKE uses a set-associative hashing algorithm to
|
||||||
minimise flow collisions.
|
minimize flow collisions.
|
||||||
|
|
||||||
These keywords specify whether fairness based on source address, destination
|
These keywords specify whether fairness based on source address, destination
|
||||||
address, individual flows, or any combination of those is desired.
|
address, individual flows, or any combination of those is desired.
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ Restore any previous configured nat.
|
||||||
Remove any conntrack state and metadata (mark/label) from the packet (must only option specified).
|
Remove any conntrack state and metadata (mark/label) from the packet (must only option specified).
|
||||||
.TP
|
.TP
|
||||||
.BI force
|
.BI force
|
||||||
Forces conntrack direction for a previously commited connections, so that current direction will become the original direction (only valid with commit).
|
Forces conntrack direction for a previously committed connections, so that current direction will become the original direction (only valid with commit).
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
Example showing natted firewall in conntrack zone 2, and conntrack mark usage:
|
Example showing natted firewall in conntrack zone 2, and conntrack mark usage:
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ If the prefix is missing, \fBtc\fR assumes a full-length host match.
|
||||||
.TQ
|
.TQ
|
||||||
.IR \fBsrc_port " { " MASKED_NUMBER " | " " MIN_VALUE-MAX_VALUE " }
|
.IR \fBsrc_port " { " MASKED_NUMBER " | " " MIN_VALUE-MAX_VALUE " }
|
||||||
Match on layer 4 protocol source or destination port number, with an
|
Match on layer 4 protocol source or destination port number, with an
|
||||||
optional mask. Alternatively, the mininum and maximum values can be
|
optional mask. Alternatively, the minimum and maximum values can be
|
||||||
specified to match on a range of layer 4 protocol source or destination
|
specified to match on a range of layer 4 protocol source or destination
|
||||||
port numbers. Only available for
|
port numbers. Only available for
|
||||||
.BR ip_proto " values " udp ", " tcp " and " sctp
|
.BR ip_proto " values " udp ", " tcp " and " sctp
|
||||||
|
|
@ -384,7 +384,7 @@ Matches on connection tracking info
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
.I CT_STATE
|
.I CT_STATE
|
||||||
Match the connection state, and can ne combination of [{+|-}flag] flags, where flag can be one of
|
Match the connection state, and can be combination of [{+|-}flag] flags, where flag can be one of
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
trk - Tracked connection.
|
trk - Tracked connection.
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ tc filter add dev eth1 parent ffff: \\
|
||||||
.EE
|
.EE
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
The first command creats an ingress qdisc with handle
|
The first command creates an ingress qdisc with handle
|
||||||
.BR ffff:
|
.BR ffff:
|
||||||
on device
|
on device
|
||||||
.BR eth1
|
.BR eth1
|
||||||
|
|
@ -64,7 +64,7 @@ tc filter add dev eth1 parent 1: \\
|
||||||
.EE
|
.EE
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
The first command creats an egress qdisc with handle
|
The first command creates an egress qdisc with handle
|
||||||
.BR 1:
|
.BR 1:
|
||||||
that replaces the root qdisc on device
|
that replaces the root qdisc on device
|
||||||
.BR eth1
|
.BR eth1
|
||||||
|
|
|
||||||
|
|
@ -147,15 +147,15 @@ a label 123 and sends them out eth1:
|
||||||
.EE
|
.EE
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
In this example, incoming MPLS unicast packets on eth0 are decapsulated and to
|
In this example, incoming MPLS unicast packets on eth0 are decapsulated
|
||||||
ip packets and output to eth1:
|
and redirected to eth1:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.EX
|
.EX
|
||||||
#tc qdisc add dev eth0 handle ffff: ingress
|
#tc qdisc add dev eth0 handle ffff: ingress
|
||||||
#tc filter add dev eth0 protocol mpls_uc parent ffff: flower \\
|
#tc filter add dev eth0 protocol mpls_uc parent ffff: flower \\
|
||||||
action mpls pop protocol ipv4 \\
|
action mpls pop protocol ipv4 \\
|
||||||
action mirred egress redirect dev eth0
|
action mirred egress redirect dev eth1
|
||||||
.EE
|
.EE
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ aims to control delay. The main design goals are
|
||||||
PIE is designed to control delay effectively. First, an average dequeue rate is
|
PIE is designed to control delay effectively. First, an average dequeue rate is
|
||||||
estimated based on the standing queue. The rate is used to calculate the current
|
estimated based on the standing queue. The rate is used to calculate the current
|
||||||
delay. Then, on a periodic basis, the delay is used to calculate the dropping
|
delay. Then, on a periodic basis, the delay is used to calculate the dropping
|
||||||
probabilty. Finally, on arrival, a packet is dropped (or marked) based on this
|
probability. Finally, on arrival, a packet is dropped (or marked) based on this
|
||||||
probability.
|
probability.
|
||||||
|
|
||||||
PIE makes adjustments to the probability based on the trend of the delay i.e.
|
PIE makes adjustments to the probability based on the trend of the delay i.e.
|
||||||
|
|
@ -52,7 +52,7 @@ growth and are determined through control theoretic approaches. alpha determines
|
||||||
the deviation between the current and target latency changes probability. beta exerts
|
the deviation between the current and target latency changes probability. beta exerts
|
||||||
additional adjustments depending on the latency trend.
|
additional adjustments depending on the latency trend.
|
||||||
|
|
||||||
The drop probabilty is used to mark packets in ecn mode. However, as in RED,
|
The drop probability is used to mark packets in ecn mode. However, as in RED,
|
||||||
beyond 10% packets are dropped based on this probability. The bytemode is used
|
beyond 10% packets are dropped based on this probability. The bytemode is used
|
||||||
to drop packets proportional to the packet size.
|
to drop packets proportional to the packet size.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ device the qdisc is attached to.
|
||||||
.TP
|
.TP
|
||||||
max
|
max
|
||||||
Maximum length of a buckets queue, in packets, before packets start being
|
Maximum length of a buckets queue, in packets, before packets start being
|
||||||
dropped. Should be sightly larger than
|
dropped. Should be slightly larger than
|
||||||
.B target
|
.B target
|
||||||
, but should not be set to values exceeding 1.5 times that of
|
, but should not be set to values exceeding 1.5 times that of
|
||||||
.B target .
|
.B target .
|
||||||
|
|
|
||||||
|
|
@ -96,13 +96,13 @@ variable length hexadecimal value. Additionally multiple options may be
|
||||||
listed using a comma delimiter.
|
listed using a comma delimiter.
|
||||||
.TP
|
.TP
|
||||||
.B vxlan_opts
|
.B vxlan_opts
|
||||||
Vxlan metatdata options.
|
Vxlan metadata options.
|
||||||
.B vxlan_opts
|
.B vxlan_opts
|
||||||
is specified in the form GBP, as a 32bit number. Multiple options is not
|
is specified in the form GBP, as a 32bit number. Multiple options is not
|
||||||
supported.
|
supported.
|
||||||
.TP
|
.TP
|
||||||
.B erspan_opts
|
.B erspan_opts
|
||||||
Erspan metatdata options.
|
Erspan metadata options.
|
||||||
.B erspan_opts
|
.B erspan_opts
|
||||||
is specified in the form VERSION:INDEX:DIR:HWID, where VERSION is represented
|
is specified in the form VERSION:INDEX:DIR:HWID, where VERSION is represented
|
||||||
as a 8bit number, INDEX as an 32bit number, DIR and HWID as a 8bit number.
|
as a 8bit number, INDEX as an 32bit number, DIR and HWID as a 8bit number.
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ struct filter_entry {
|
||||||
char *key;
|
char *key;
|
||||||
char *value;
|
char *value;
|
||||||
/*
|
/*
|
||||||
* This field menas that we can try to issue .doit calback
|
* This field means that we can try to issue .doit calback
|
||||||
* on value above. This value can be converted to integer
|
* on value above. This value can be converted to integer
|
||||||
* with simple atoi(). Otherwise "is_doit" will be false.
|
* with simple atoi(). Otherwise "is_doit" will be false.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ static int parse_gate(struct action_util *a, int *argc_p, char ***argv_p,
|
||||||
|
|
||||||
if (!NEXT_ARG_OK()) {
|
if (!NEXT_ARG_OK()) {
|
||||||
explain_entry_format();
|
explain_entry_format();
|
||||||
fprintf(stderr, "\"sched-entry\" is imcomplete\n");
|
fprintf(stderr, "\"sched-entry\" is incomplete\n");
|
||||||
free_entries(&gate_entries);
|
free_entries(&gate_entries);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -270,14 +270,14 @@ static int parse_gate(struct action_util *a, int *argc_p, char ***argv_p,
|
||||||
|
|
||||||
if (get_gate_state(&gate_state, *argv)) {
|
if (get_gate_state(&gate_state, *argv)) {
|
||||||
explain_entry_format();
|
explain_entry_format();
|
||||||
fprintf(stderr, "\"sched-entry\" is imcomplete\n");
|
fprintf(stderr, "\"sched-entry\" is incomplete\n");
|
||||||
free_entries(&gate_entries);
|
free_entries(&gate_entries);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NEXT_ARG_OK()) {
|
if (!NEXT_ARG_OK()) {
|
||||||
explain_entry_format();
|
explain_entry_format();
|
||||||
fprintf(stderr, "\"sched-entry\" is imcomplete\n");
|
fprintf(stderr, "\"sched-entry\" is incomplete\n");
|
||||||
free_entries(&gate_entries);
|
free_entries(&gate_entries);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -287,7 +287,7 @@ static int parse_gate(struct action_util *a, int *argc_p, char ***argv_p,
|
||||||
if (get_u32(&interval, *argv, 0) &&
|
if (get_u32(&interval, *argv, 0) &&
|
||||||
get_time64(&interval_s64, *argv)) {
|
get_time64(&interval_s64, *argv)) {
|
||||||
explain_entry_format();
|
explain_entry_format();
|
||||||
fprintf(stderr, "\"sched-entry\" is imcomplete\n");
|
fprintf(stderr, "\"sched-entry\" is incomplete\n");
|
||||||
free_entries(&gate_entries);
|
free_entries(&gate_entries);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,13 @@ static const char * const action_names[] = {
|
||||||
static void explain(void)
|
static void explain(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: mpls pop [ protocol MPLS_PROTO ]\n"
|
"Usage: mpls pop [ protocol MPLS_PROTO ] [CONTROL]\n"
|
||||||
" mpls push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
|
" mpls push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
|
||||||
" [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
|
" [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
|
||||||
" mpls mac_push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
|
" mpls mac_push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
|
||||||
" [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
|
" [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
|
||||||
" mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ] [CONTROL]\n"
|
" mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ]\n"
|
||||||
|
" [ bos MPLS_BOS ] [CONTROL]\n"
|
||||||
" for pop, MPLS_PROTO is next header of packet - e.g. ip or mpls_uc\n"
|
" for pop, MPLS_PROTO is next header of packet - e.g. ip or mpls_uc\n"
|
||||||
" for push and mac_push, MPLS_PROTO is one of mpls_uc or mpls_mc\n"
|
" for push and mac_push, MPLS_PROTO is one of mpls_uc or mpls_mc\n"
|
||||||
" with default: mpls_uc\n"
|
" with default: mpls_uc\n"
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ static const char * const action_names[] = {
|
||||||
static void explain(void)
|
static void explain(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: vlan pop\n"
|
"Usage: vlan pop [CONTROL]\n"
|
||||||
" vlan push [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL]\n"
|
" vlan push [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL]\n"
|
||||||
" vlan modify [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL]\n"
|
" vlan modify [ protocol VLANPROTO ] id VLANID [ priority VLANPRIO ] [CONTROL]\n"
|
||||||
" vlan pop_eth [CONTROL]\n"
|
" vlan pop_eth [CONTROL]\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue