Merge branch 'iproute2-master' into iproute2-next
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
commit
6e221408e6
|
|
@ -47,7 +47,7 @@ papers.
|
|||
|
||||
Pairs X:Y are class handles, X:0 are qdisc handles.
|
||||
weight should be proportional to rate for leaf classes
|
||||
(I choosed it ten times less, but it is not necessary)
|
||||
(I repeated it ten times less, but it is not necessary)
|
||||
|
||||
defmap is bitmap of logical priorities served by this class.
|
||||
|
||||
|
|
|
|||
|
|
@ -90,13 +90,13 @@ EOF
|
|||
|
||||
check_xt_old()
|
||||
{
|
||||
# bail if previous XT checks has already succeded.
|
||||
# bail if previous XT checks has already succeeded.
|
||||
if grep -q TC_CONFIG_XT $CONFIG
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
#check if we dont need our internal header ..
|
||||
#check if we don't need our internal header ..
|
||||
cat >$TMPDIR/ipttest.c <<EOF
|
||||
#include <xtables.h>
|
||||
char *lib_dir;
|
||||
|
|
@ -129,7 +129,7 @@ EOF
|
|||
|
||||
check_xt_old_internal_h()
|
||||
{
|
||||
# bail if previous XT checks has already succeded.
|
||||
# bail if previous XT checks has already succeeded.
|
||||
if grep -q TC_CONFIG_XT $CONFIG
|
||||
then
|
||||
return
|
||||
|
|
|
|||
|
|
@ -5127,7 +5127,7 @@ static int cmd_resource_set(struct dl *dl)
|
|||
&dl->opts.resource_id,
|
||||
&dl->opts.resource_id_valid);
|
||||
if (err) {
|
||||
pr_err("error parsing resource path %s\n", strerror(err));
|
||||
pr_err("error parsing resource path %s\n", strerror(-err));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ we execute a policing action which rate limits its bandwidth utilization
|
|||
to 1.5Mbps".
|
||||
|
||||
The new extensions allow for more than just policing actions to be added.
|
||||
They are also fully backward compatible. If you have a kernel that doesnt
|
||||
They are also fully backward compatible. If you have a kernel that doesn't
|
||||
understand them, then the effect is null i.e if you have a newer tc
|
||||
but older kernel, the actions are not installed. Likewise if you
|
||||
have a newer kernel but older tc, obviously the tc will use current
|
||||
|
|
@ -31,7 +31,7 @@ right tc ;->
|
|||
|
||||
A side effect is that we can now get stateless firewalling to work with tc.
|
||||
Essentially this is now an alternative to iptables.
|
||||
I wont go into details of my dislike for iptables at times, but
|
||||
I won't go into details of my dislike for iptables at times, but
|
||||
scalability is one of the main issues; however, if you need stateful
|
||||
classification - use netfilter (for now).
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ iptable target. I have only tested with mangler targets up to now.
|
|||
In terms of hooks:
|
||||
*ingress is mapped to pre-routing hook
|
||||
*egress is mapped to post-routing hook
|
||||
I dont see much value in the other hooks, if you see it and email me good
|
||||
I don't see much value in the other hooks, if you see it and email me good
|
||||
reasons, the addition is trivial.
|
||||
|
||||
Example syntax for iptables targets usage becomes:
|
||||
|
|
@ -111,12 +111,12 @@ The script below does the following:
|
|||
- an incoming packet from 10.0.0.21 is first given a firewall mark of 1.
|
||||
|
||||
- It is then metered to make sure it does not exceed its allocated rate of
|
||||
1Kbps. If it doesnt exceed rate, this is where we terminate action execution.
|
||||
1Kbps. If it doesn't exceed rate, this is where we terminate action execution.
|
||||
|
||||
- If it does exceed its rate, its "color" changes to a mark of 2 and it is
|
||||
then passed through a second meter.
|
||||
|
||||
-The second meter is shared across all flows on that device [i am suprised
|
||||
-The second meter is shared across all flows on that device [i am surpised
|
||||
that this seems to be not a well know feature of the policer; Bert was telling
|
||||
me that someone was writing a qdisc just to do sharing across multiple devices;
|
||||
it must be the summer heat again; weve had someone doing that every year around
|
||||
|
|
@ -145,7 +145,7 @@ u32 match ip src 10.0.0.21/32 flowid 1:15 \
|
|||
action ipt -j mark --set-mark 1 index 2 \
|
||||
#
|
||||
# then pass it through a policer which allows 1kbps; if the flow
|
||||
# doesnt exceed that rate, this is where we stop, if it exceeds we
|
||||
# doesn't exceed that rate, this is where we stop, if it exceeds we
|
||||
# pipe the packet to the next action
|
||||
action police rate 1kbit burst 9k pipe \
|
||||
#
|
||||
|
|
@ -241,7 +241,7 @@ filter protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
|||
Neat, eh?
|
||||
|
||||
|
||||
Wanna write an action module?
|
||||
Want to write an action module?
|
||||
------------------------------
|
||||
Its easy. Either look at the code or send me email. I will document at
|
||||
some point; will also accept documentation.
|
||||
|
|
|
|||
|
|
@ -17,26 +17,26 @@ dropping. I am not aware of any study that shows policing is
|
|||
worse than shaping in achieving the end goal of rate control.
|
||||
I would be interested if anyone is experimenting.
|
||||
|
||||
3) Very interesting use: if you are serving p2p you may wanna give
|
||||
preference to your own localy originated traffic (when responses come back)
|
||||
3) Very interesting use: if you are serving p2p you may want to give
|
||||
preference to your own locally originated traffic (when responses come back)
|
||||
vs someone using your system to do bittorent. So QoSing based on state
|
||||
comes in as the solution. What people did to achive this was stick
|
||||
comes in as the solution. What people did to achieve this was stick
|
||||
the IMQ somewhere prelocal hook.
|
||||
I think this is a pretty neat feature to have in Linux in general.
|
||||
(i.e not just for IMQ).
|
||||
But i wont go back to putting netfilter hooks in the device to satisfy
|
||||
this. I also dont think its worth it hacking ifb some more to be
|
||||
But i won't go back to putting netfilter hooks in the device to satisfy
|
||||
this. I also don't think its worth it hacking ifb some more to be
|
||||
aware of say L3 info and play ip rule tricks to achieve this.
|
||||
--> Instead the plan is to have a contrack related action. This action will
|
||||
selectively either query/create contrack state on incoming packets.
|
||||
--> Instead the plan is to have a conntrack related action. This action will
|
||||
selectively either query/create conntrack state on incoming packets.
|
||||
Packets could then be redirected to ifb based on what happens -> eg
|
||||
on incoming packets; if we find they are of known state we could send to
|
||||
a different queue than one which didnt have existing state. This
|
||||
a different queue than one which didn't have existing state. This
|
||||
all however is dependent on whatever rules the admin enters.
|
||||
|
||||
At the moment this 3rd function does not exist yet. I have decided that
|
||||
instead of sitting on the patch for another year, to release it and then
|
||||
if theres pressure i will add this feature.
|
||||
if there is pressure i will add this feature.
|
||||
|
||||
An example, to provide functionality that most people use IMQ for below:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ dev ("port" in ethernet switch/bridging terminology)
|
|||
- redirect
|
||||
steals the packet and redirects to specified destination dev.
|
||||
|
||||
What NOT to do if you dont want your machine to crash:
|
||||
What NOT to do if you don't want your machine to crash:
|
||||
------------------------------------------------------
|
||||
|
||||
Do not create loops!
|
||||
Loops are not hard to create in the egress qdiscs.
|
||||
|
||||
Here are simple rules to follow if you dont want to get
|
||||
Here are simple rules to follow if you don't want to get
|
||||
hurt:
|
||||
A) Do not have the same packet go to same netdevice twice
|
||||
in a single graph of policies. Your machine will just hang!
|
||||
|
|
@ -129,7 +129,7 @@ so you could tcpdump them (dummy by defaults drops all packets it sees).
|
|||
This is a very useful debug feature.
|
||||
|
||||
Lets say you are policing packets from alias 192.168.200.200/32
|
||||
you dont want those to exceed 100kbps going out.
|
||||
you don't want those to exceed 100kbps going out.
|
||||
|
||||
---
|
||||
tc qdisc add dev eth0 handle 1:0 root prio
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@
|
|||
# class. By default, TBF is used. Note that attaching TBF to CBQ class
|
||||
# shapes the traffic to conform to TBF parameters and prevents the class
|
||||
# from borrowing bandwidth from its parent even if you have BOUNDED set
|
||||
# to "no". To allow the class to borrow bandwith (provided it is not
|
||||
# to "no". To allow the class to borrow bandwidth (provided it is not
|
||||
# bounded), you must set LEAF to "none" or "sfq".
|
||||
#
|
||||
# If you want to ensure (approximately) fair sharing of bandwidth among
|
||||
|
|
@ -271,7 +271,7 @@
|
|||
#
|
||||
# Note: Don't forget to set LEAF to "none" or "sfq", otherwise the class will
|
||||
# have TBF attached to itself and will not be able to borrow unused
|
||||
# bandwith from its parent.
|
||||
# bandwidth from its parent.
|
||||
#
|
||||
# ISOLATED=yes|no optional, default "no"
|
||||
#
|
||||
|
|
@ -392,7 +392,7 @@
|
|||
# MARK=<mark>
|
||||
#
|
||||
# These parameters make up "fw" filter rules that select traffic for
|
||||
# each of the classes accoring to firewall "mark". Mark is a decimal
|
||||
# each of the classes according to firewall "mark". Mark is a decimal
|
||||
# number packets are tagged with if firewall rules say so. You can
|
||||
# use multiple MARK fields per config.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ $TC qdisc add dev $INDEV handle ffff: ingress
|
|||
# by ipchains to tag value 3 (The rest of the subnet packets -- not
|
||||
# tag 1 or 2) to not go beyond 1.5Mbps
|
||||
# Allow up to at least 60 packets to burst (assuming maximum packet
|
||||
# size of # 1.5 KB) in the long run and upto about 6 packets in the
|
||||
# size of # 1.5 KB) in the long run and up to about 6 packets in the
|
||||
# shot run
|
||||
|
||||
############################################################
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ meter5=" police index 5 rate $CIR1 burst $CBS2 "
|
|||
|
||||
# *********************** AF41 ***************************
|
||||
#AF41 (DSCP 0x22) is passed on with a tcindex value 1
|
||||
#if it doesnt exceed its CIR/CBS
|
||||
#if it doesn't exceed its CIR/CBS
|
||||
#policer 1 is used.
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 4 u32 \
|
||||
|
|
@ -75,7 +75,7 @@ drop flowid :3
|
|||
|
||||
# *********************** AF42 ***************************
|
||||
#AF42 (DSCP 0x24) from is passed on with a tcindex value 2
|
||||
#if it doesnt exceed its CIR/CBS
|
||||
#if it doesn't exceed its CIR/CBS
|
||||
#policer 2 is used. Note that this is shared with the AF41
|
||||
#
|
||||
#
|
||||
|
|
@ -95,7 +95,7 @@ drop flowid :3
|
|||
# *********************** AF43 ***************************
|
||||
#
|
||||
#AF43 (DSCP 0x26) from is passed on with a tcindex value 3
|
||||
#if it doesnt exceed its CIR/CBS
|
||||
#if it doesn't exceed its CIR/CBS
|
||||
#policer 3 is used. Note that this is shared with the AF41 and AF42
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 6 u32 \
|
||||
|
|
@ -106,7 +106,7 @@ drop flowid :3
|
|||
# *********************** BE ***************************
|
||||
#
|
||||
# Anything else (not from the AF4*) gets discarded if it
|
||||
# exceeds 1Mbps and by default goes to BE if it doesnt
|
||||
# exceeds 1Mbps and by default goes to BE if it doesn't
|
||||
# Note that the BE class is also used by the AF4* in the worst
|
||||
# case
|
||||
#
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $TC qdisc add dev $INDEV handle ffff: ingress
|
|||
############################################################
|
||||
#
|
||||
# anything with fw tag of 1 is passed on with a tcindex value 1
|
||||
#if it doesnt exceed its allocated rate (CIR/CBS)
|
||||
#if it doesn't exceed its allocated rate (CIR/CBS)
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 4 handle 1 fw \
|
||||
$meter1 \
|
||||
|
|
@ -68,7 +68,7 @@ $meter3 \
|
|||
drop flowid 4:3
|
||||
#
|
||||
# Anything else (not from the subnet 10.2.0.24/24) gets discarded if it
|
||||
# exceeds 1Mbps and by default goes to BE if it doesnt
|
||||
# exceeds 1Mbps and by default goes to BE if it doesn't
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 6 handle 2 fw \
|
||||
$meter5 \
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ $TC qdisc add dev $INDEV handle ffff: ingress
|
|||
#
|
||||
# *********************** AF41 ***************************
|
||||
#AF41 (DSCP 0x22) from is passed on with a tcindex value 1
|
||||
#if it doesnt exceed its CIR/CBS + PIR/EBS
|
||||
#if it doesn't exceed its CIR/CBS + PIR/EBS
|
||||
#policer 1 is used.
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 1 u32 \
|
||||
|
|
@ -90,7 +90,7 @@ drop flowid :3
|
|||
#
|
||||
# *********************** AF42 ***************************
|
||||
#AF42 (DSCP 0x24) from is passed on with a tcindex value 2
|
||||
#if it doesnt exceed its CIR/CBS + PIR/EBS
|
||||
#if it doesn't exceed its CIR/CBS + PIR/EBS
|
||||
#policer 2 is used. Note that this is shared with the AF41
|
||||
#
|
||||
#
|
||||
|
|
@ -119,7 +119,7 @@ drop flowid :3
|
|||
# *********************** AF43 ***************************
|
||||
#
|
||||
#AF43 (DSCP 0x26) from is passed on with a tcindex value 3
|
||||
#if it doesnt exceed its CIR/CBS + PIR/EBS
|
||||
#if it doesn't exceed its CIR/CBS + PIR/EBS
|
||||
#policer 3 is used. Note that this is shared with the AF41 and AF42
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 13 u32 \
|
||||
|
|
@ -134,7 +134,7 @@ drop flowid :3
|
|||
## *********************** BE ***************************
|
||||
##
|
||||
## Anything else (not from the AF4*) gets discarded if it
|
||||
## exceeds 1Mbps and by default goes to BE if it doesnt
|
||||
## exceeds 1Mbps and by default goes to BE if it doesn't
|
||||
## Note that the BE class is also used by the AF4* in the worst
|
||||
## case
|
||||
##
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $TC qdisc add dev $INDEV handle ffff: ingress
|
|||
############################################################
|
||||
#
|
||||
# anything with fw tag of 1 is passed on with a tcindex value 1
|
||||
#if it doesnt exceed its allocated rate (CIR/CBS)
|
||||
#if it doesn't exceed its allocated rate (CIR/CBS)
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 1 handle 1 fw \
|
||||
$meter1 \
|
||||
|
|
@ -80,7 +80,7 @@ $meter3a \
|
|||
drop flowid 4:3
|
||||
#
|
||||
# Anything else (not from the subnet 10.2.0.24/24) gets discarded if it
|
||||
# exceeds 1Mbps and by default goes to BE if it doesnt
|
||||
# exceeds 1Mbps and by default goes to BE if it doesn't
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 7 handle 2 fw \
|
||||
$meter5 \
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $TC qdisc add dev $INDEV handle ffff: ingress
|
|||
# NOTE: tcindex 1 maps to AF41, 2->AF42, 3->AF43, 4->BE
|
||||
#
|
||||
#anything from subnet 10.2.0.2/24 is passed on with a tcindex value 1
|
||||
#if it doesnt exceed its CIR/CBS + PIR/EBS
|
||||
#if it doesn't exceed its CIR/CBS + PIR/EBS
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 1 u32 \
|
||||
match ip src 10.2.0.0/24 $meter1 \
|
||||
|
|
@ -82,7 +82,7 @@ drop flowid :3
|
|||
#
|
||||
#
|
||||
# Anything else (not from the subnet 10.2.0.24/24) gets discarded if it
|
||||
# exceeds 1Mbps and by default goes to BE if it doesnt
|
||||
# exceeds 1Mbps and by default goes to BE if it doesn't
|
||||
#
|
||||
$TC filter add dev $INDEV parent ffff: protocol ip prio 7 u32 \
|
||||
match ip src 0/0 $meter5 \
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
These were the tests done to validate the Diffserv scripts.
|
||||
This document will be updated continously. If you do more
|
||||
This document will be updated continuously. If you do more
|
||||
thorough validation testing please post the details to the
|
||||
diffserv mailing list.
|
||||
Nevertheless, these tests should serve for basic validation.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
static const char SNAPSHOT[] = "180813";
|
||||
static const char SNAPSHOT[] = "181023";
|
||||
|
|
|
|||
|
|
@ -923,15 +923,15 @@ int print_route(struct nlmsghdr *n, void *arg)
|
|||
print_rt_pref(fp, rta_getattr_u8(tb[RTA_PREF]));
|
||||
|
||||
if (tb[RTA_TTL_PROPAGATE]) {
|
||||
bool propogate = rta_getattr_u8(tb[RTA_TTL_PROPAGATE]);
|
||||
bool propagate = rta_getattr_u8(tb[RTA_TTL_PROPAGATE]);
|
||||
|
||||
if (is_json_context())
|
||||
print_bool(PRINT_JSON, "ttl-propogate", NULL,
|
||||
propogate);
|
||||
propagate);
|
||||
else
|
||||
print_string(PRINT_FP, NULL,
|
||||
"ttl-propogate %s",
|
||||
propogate ? "enabled" : "disabled");
|
||||
propagate ? "enabled" : "disabled");
|
||||
}
|
||||
|
||||
print_string(PRINT_FP, NULL, "\n", NULL);
|
||||
|
|
|
|||
|
|
@ -494,10 +494,11 @@ static int parse_encap_seg6(struct rtattr *rta, size_t len, int *argcp,
|
|||
struct seg6_iptunnel_encap *tuninfo;
|
||||
struct ipv6_sr_hdr *srh;
|
||||
char **argv = *argvp;
|
||||
char segbuf[1024];
|
||||
char segbuf[1024] = "";
|
||||
int argc = *argcp;
|
||||
int encap = -1;
|
||||
__u32 hmac = 0;
|
||||
int ret = 0;
|
||||
int srhlen;
|
||||
|
||||
while (argc > 0) {
|
||||
|
|
@ -539,16 +540,19 @@ static int parse_encap_seg6(struct rtattr *rta, size_t len, int *argcp,
|
|||
memcpy(tuninfo->srh, srh, srhlen);
|
||||
|
||||
if (rta_addattr_l(rta, len, SEG6_IPTUNNEL_SRH, tuninfo,
|
||||
sizeof(*tuninfo) + srhlen))
|
||||
return -1;
|
||||
|
||||
free(tuninfo);
|
||||
free(srh);
|
||||
sizeof(*tuninfo) + srhlen)) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
*argcp = argc + 1;
|
||||
*argvp = argv - 1;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
free(tuninfo);
|
||||
free(srh);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct lwt_x {
|
||||
|
|
|
|||
|
|
@ -928,7 +928,7 @@ int xfrm_state_print(struct nlmsghdr *n, void *arg)
|
|||
}
|
||||
|
||||
if (n->nlmsg_type == XFRM_MSG_DELSA) {
|
||||
/* Dont blame me for this .. Herbert made me do it */
|
||||
/* Don't blame me for this .. Herbert made me do it */
|
||||
xsid = NLMSG_DATA(n);
|
||||
len -= NLMSG_SPACE(sizeof(*xsid));
|
||||
} else if (n->nlmsg_type == XFRM_MSG_EXPIRE) {
|
||||
|
|
|
|||
|
|
@ -1457,7 +1457,7 @@ int makeargs(char *line, char *argv[], int maxargs)
|
|||
break;
|
||||
}
|
||||
|
||||
/* seperate words */
|
||||
/* separate words */
|
||||
*cp++ = 0;
|
||||
}
|
||||
argv[argc] = NULL;
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ or the internal FDB should be used.
|
|||
Allows to transport group policy context across VXLAN network peers.
|
||||
If enabled, includes the mark of a packet in the VXLAN header for outgoing
|
||||
packets and fills the packet mark based on the information found in the
|
||||
VXLAN header for incomming packets.
|
||||
VXLAN header for incoming packets.
|
||||
|
||||
Format of upper 16 bits of packet mark (flags);
|
||||
|
||||
|
|
@ -884,7 +884,7 @@ discovery.
|
|||
- enables/disables IPv4 DF suppression on this tunnel.
|
||||
Normally datagrams that exceed the MTU will be fragmented; the presence
|
||||
of the DF flag inhibits this, resulting instead in an ICMP Unreachable
|
||||
(Fragmentation Required) message. Enabling this attribute casues the
|
||||
(Fragmentation Required) message. Enabling this attribute causes the
|
||||
DF flag to be ignored.
|
||||
|
||||
.sp
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ discovery.
|
|||
enable IPv4 DF suppression on this tunnel.
|
||||
Normally datagrams that exceed the MTU will be fragmented; the presence
|
||||
of the DF flag inhibits this, resulting instead in an ICMP Unreachable
|
||||
(Fragmentation Required) message. Enabling this attribute casues the
|
||||
(Fragmentation Required) message. Enabling this attribute causes the
|
||||
DF flag to be ignored.
|
||||
|
||||
.TP
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ Outer header TOS
|
|||
Outer header TTL
|
||||
.TP
|
||||
.RB [ no ] csum
|
||||
Controlls outer UDP checksum. When set to
|
||||
Controls outer UDP checksum. When set to
|
||||
.B csum
|
||||
(which is default), the outer UDP checksum is calculated and included in the
|
||||
packets. When set to
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#define MAX_NUMBER_OF_FILTERS 64
|
||||
struct filters {
|
||||
char name[32];
|
||||
const char *name;
|
||||
bool is_number;
|
||||
};
|
||||
|
||||
|
|
|
|||
10
rdma/res.c
10
rdma/res.c
|
|
@ -621,6 +621,8 @@ static int res_cm_id_parse_cb(const struct nlmsghdr *nlh, void *data)
|
|||
if (rd_check_is_string_filtered(rd, "src-addr",
|
||||
src_addr_str))
|
||||
continue;
|
||||
if (rd_check_is_filtered(rd, "src-port", src_port))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nla_line[RDMA_NLDEV_ATTR_RES_DST_ADDR]) {
|
||||
|
|
@ -630,14 +632,10 @@ static int res_cm_id_parse_cb(const struct nlmsghdr *nlh, void *data)
|
|||
if (rd_check_is_string_filtered(rd, "dst-addr",
|
||||
dst_addr_str))
|
||||
continue;
|
||||
if (rd_check_is_filtered(rd, "dst-port", dst_port))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rd_check_is_filtered(rd, "src-port", src_port))
|
||||
continue;
|
||||
|
||||
if (rd_check_is_filtered(rd, "dst-port", dst_port))
|
||||
continue;
|
||||
|
||||
if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) {
|
||||
pid = mnl_attr_get_u32(
|
||||
nla_line[RDMA_NLDEV_ATTR_RES_PID]);
|
||||
|
|
|
|||
|
|
@ -1165,7 +1165,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
|
|||
argc--; argv++;
|
||||
}
|
||||
|
||||
/* We dont necessarily need class/flowids */
|
||||
/* We don't necessarily need class/flowids */
|
||||
if (terminal_ok)
|
||||
sel.sel.flags |= TC_U32_TERMINAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ parse_ip(int *argc_p, char ***argv_p,
|
|||
}
|
||||
/* jamal - look at these and make them either old or new
|
||||
** scheme given diffserv
|
||||
** dont forget the CE bit
|
||||
** don't forget the CE bit
|
||||
*/
|
||||
if (strcmp(*argv, "tos") == 0 || matches(*argv, "dsfield") == 0) {
|
||||
NEXT_ARG();
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
|
|||
if (RTA_PAYLOAD(tb[TCA_HTB_INIT]) < sizeof(*gopt)) return -1;
|
||||
|
||||
print_int(PRINT_ANY, "r2q", "r2q %d", gopt->rate2quantum);
|
||||
print_uint(PRINT_ANY, "default", " default %u", gopt->defcls);
|
||||
print_0xhex(PRINT_ANY, "default", " default %x", gopt->defcls);
|
||||
print_uint(PRINT_ANY, "direct_packets_stat",
|
||||
" direct_packets_stat %u", gopt->direct_pkts);
|
||||
if (show_details) {
|
||||
|
|
|
|||
4
tc/tc.c
4
tc/tc.c
|
|
@ -325,11 +325,11 @@ static int batch(const char *name)
|
|||
struct batch_buf *head = NULL, *tail = NULL, *buf_pool = NULL;
|
||||
char *largv[100], *largv_next[100];
|
||||
char *line, *line_next = NULL;
|
||||
bool bs_enabled_next = false;
|
||||
bool bs_enabled = false;
|
||||
bool lastline = false;
|
||||
int largc, largc_next;
|
||||
bool bs_enabled_saved;
|
||||
bool bs_enabled_next;
|
||||
int batchsize = 0;
|
||||
size_t len = 0;
|
||||
int ret = 0;
|
||||
|
|
@ -358,7 +358,6 @@ static int batch(const char *name)
|
|||
goto Exit;
|
||||
largc = makeargs(line, largv, 100);
|
||||
bs_enabled = batchsize_enabled(largc, largv);
|
||||
bs_enabled_saved = bs_enabled;
|
||||
do {
|
||||
if (getcmdline(&line_next, &len, stdin) == -1)
|
||||
lastline = true;
|
||||
|
|
@ -394,7 +393,6 @@ static int batch(const char *name)
|
|||
len = 0;
|
||||
bs_enabled_saved = bs_enabled;
|
||||
bs_enabled = bs_enabled_next;
|
||||
bs_enabled_next = false;
|
||||
|
||||
if (largc == 0) {
|
||||
largc = largc_next;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
CFLAGS=
|
||||
include ../../config.mk
|
||||
|
||||
generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDLIBS) $(EXTRA_CFLAGS) -I../../include -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl
|
||||
|
||||
clean:
|
||||
rm -f generate_nlmsg
|
||||
|
|
|
|||
|
|
@ -709,7 +709,7 @@ static void link_mon_print_applied(uint16_t applied, uint64_t up_map)
|
|||
close_json_array(PRINT_JSON, "applied_node_status");
|
||||
}
|
||||
|
||||
/* print the non applied members, since we dont know
|
||||
/* print the non applied members, since we don't know
|
||||
* the members, we print them along with the state
|
||||
*/
|
||||
static void link_mon_print_non_applied(uint16_t applied, uint16_t member_cnt,
|
||||
|
|
|
|||
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
static int node_list_cb(const struct nlmsghdr *nlh, void *data)
|
||||
{
|
||||
struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
|
||||
struct nlattr *info[TIPC_NLA_MAX + 1] = {};
|
||||
struct nlattr *attrs[TIPC_NLA_NODE_MAX + 1] = {};
|
||||
char str[33] = {};
|
||||
uint32_t addr;
|
||||
|
||||
mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
|
||||
mnl_attr_parse(nlh, sizeof(struct genlmsghdr), parse_attrs, info);
|
||||
if (!info[TIPC_NLA_NODE])
|
||||
return MNL_CB_ERROR;
|
||||
|
||||
|
|
@ -160,7 +159,6 @@ static int cmd_node_set_nodeid(struct nlmsghdr *nlh, const struct cmd *cmd,
|
|||
|
||||
static int nodeid_get_cb(const struct nlmsghdr *nlh, void *data)
|
||||
{
|
||||
struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
|
||||
struct nlattr *info[TIPC_NLA_MAX + 1] = {};
|
||||
struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {};
|
||||
char str[33] = {0,};
|
||||
|
|
@ -168,7 +166,7 @@ static int nodeid_get_cb(const struct nlmsghdr *nlh, void *data)
|
|||
uint64_t *w0 = (uint64_t *) &id[0];
|
||||
uint64_t *w1 = (uint64_t *) &id[8];
|
||||
|
||||
mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
|
||||
mnl_attr_parse(nlh, sizeof(struct genlmsghdr), parse_attrs, info);
|
||||
if (!info[TIPC_NLA_NET])
|
||||
return MNL_CB_ERROR;
|
||||
|
||||
|
|
@ -207,11 +205,10 @@ static int cmd_node_get_nodeid(struct nlmsghdr *nlh, const struct cmd *cmd,
|
|||
|
||||
static int netid_get_cb(const struct nlmsghdr *nlh, void *data)
|
||||
{
|
||||
struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
|
||||
struct nlattr *info[TIPC_NLA_MAX + 1] = {};
|
||||
struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {};
|
||||
|
||||
mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
|
||||
mnl_attr_parse(nlh, sizeof(struct genlmsghdr), parse_attrs, info);
|
||||
if (!info[TIPC_NLA_NET])
|
||||
return MNL_CB_ERROR;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue