mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 09:56:55 +07:00
a51c328df3
Introduce a ingress frame gate control flow action. Tc gate action does the work like this: Assume there is a gate allow specified ingress frames can be passed at specific time slot, and be dropped at specific time slot. Tc filter chooses the ingress frames, and tc gate action would specify what slot does these frames can be passed to device and what time slot would be dropped. Tc gate action would provide an entry list to tell how much time gate keep open and how much time gate keep state close. Gate action also assign a start time to tell when the entry list start. Then driver would repeat the gate entry list cyclically. For the software simulation, gate action requires the user assign a time clock type. Below is the setting example in user space. Tc filter a stream source ip address is 192.168.0.20 and gate action own two time slots. One is last 200ms gate open let frame pass another is last 100ms gate close let frames dropped. When the ingress frames have reach total frames over 8000000 bytes, the excessive frames will be dropped in that 200000000ns time slot. > tc qdisc add dev eth0 ingress > tc filter add dev eth0 parent ffff: protocol ip \ flower src_ip 192.168.0.20 \ action gate index 2 clockid CLOCK_TAI \ sched-entry open 200000000 -1 8000000 \ sched-entry close 100000000 -1 -1 > tc chain del dev eth0 ingress chain 0 "sched-entry" follow the name taprio style. Gate state is "open"/"close". Follow with period nanosecond. Then next item is internal priority value means which ingress queue should put. "-1" means wildcard. The last value optional specifies the maximum number of MSDU octets that are permitted to pass the gate during the specified time interval. Base-time is not set will be 0 as default, as result start time would be ((N + 1) * cycletime) which is the minimal of future time. Below example shows filtering a stream with destination mac address is 10:00:80:00:00:00 and ip type is ICMP, follow the action gate. The gate action would run with one close time slot which means always keep close. The time cycle is total 200000000ns. The base-time would calculate by: 1357000000000 + (N + 1) * cycletime When the total value is the future time, it will be the start time. The cycletime here would be 200000000ns for this case. > tc filter add dev eth0 parent ffff: protocol ip \ flower skip_hw ip_proto icmp dst_mac 10:00:80:00:00:00 \ action gate index 12 base-time 1357000000000 \ sched-entry close 200000000 -1 -1 \ clockid CLOCK_TAI Signed-off-by: Po Liu <Po.Liu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
89 lines
3.4 KiB
Makefile
89 lines
3.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the Linux Traffic Control Unit.
|
|
#
|
|
|
|
obj-y := sch_generic.o sch_mq.o
|
|
|
|
obj-$(CONFIG_NET_SCHED) += sch_api.o sch_blackhole.o
|
|
obj-$(CONFIG_NET_CLS) += cls_api.o
|
|
obj-$(CONFIG_NET_CLS_ACT) += act_api.o
|
|
obj-$(CONFIG_NET_ACT_POLICE) += act_police.o
|
|
obj-$(CONFIG_NET_ACT_GACT) += act_gact.o
|
|
obj-$(CONFIG_NET_ACT_MIRRED) += act_mirred.o
|
|
obj-$(CONFIG_NET_ACT_SAMPLE) += act_sample.o
|
|
obj-$(CONFIG_NET_ACT_IPT) += act_ipt.o
|
|
obj-$(CONFIG_NET_ACT_NAT) += act_nat.o
|
|
obj-$(CONFIG_NET_ACT_PEDIT) += act_pedit.o
|
|
obj-$(CONFIG_NET_ACT_SIMP) += act_simple.o
|
|
obj-$(CONFIG_NET_ACT_SKBEDIT) += act_skbedit.o
|
|
obj-$(CONFIG_NET_ACT_CSUM) += act_csum.o
|
|
obj-$(CONFIG_NET_ACT_MPLS) += act_mpls.o
|
|
obj-$(CONFIG_NET_ACT_VLAN) += act_vlan.o
|
|
obj-$(CONFIG_NET_ACT_BPF) += act_bpf.o
|
|
obj-$(CONFIG_NET_ACT_CONNMARK) += act_connmark.o
|
|
obj-$(CONFIG_NET_ACT_CTINFO) += act_ctinfo.o
|
|
obj-$(CONFIG_NET_ACT_SKBMOD) += act_skbmod.o
|
|
obj-$(CONFIG_NET_ACT_IFE) += act_ife.o
|
|
obj-$(CONFIG_NET_IFE_SKBMARK) += act_meta_mark.o
|
|
obj-$(CONFIG_NET_IFE_SKBPRIO) += act_meta_skbprio.o
|
|
obj-$(CONFIG_NET_IFE_SKBTCINDEX) += act_meta_skbtcindex.o
|
|
obj-$(CONFIG_NET_ACT_TUNNEL_KEY)+= act_tunnel_key.o
|
|
obj-$(CONFIG_NET_ACT_CT) += act_ct.o
|
|
obj-$(CONFIG_NET_ACT_GATE) += act_gate.o
|
|
obj-$(CONFIG_NET_SCH_FIFO) += sch_fifo.o
|
|
obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o
|
|
obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o
|
|
obj-$(CONFIG_NET_SCH_HFSC) += sch_hfsc.o
|
|
obj-$(CONFIG_NET_SCH_RED) += sch_red.o
|
|
obj-$(CONFIG_NET_SCH_GRED) += sch_gred.o
|
|
obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o
|
|
obj-$(CONFIG_NET_SCH_DSMARK) += sch_dsmark.o
|
|
obj-$(CONFIG_NET_SCH_SFB) += sch_sfb.o
|
|
obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o
|
|
obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o
|
|
obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o
|
|
obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o
|
|
obj-$(CONFIG_NET_SCH_MULTIQ) += sch_multiq.o
|
|
obj-$(CONFIG_NET_SCH_ATM) += sch_atm.o
|
|
obj-$(CONFIG_NET_SCH_NETEM) += sch_netem.o
|
|
obj-$(CONFIG_NET_SCH_DRR) += sch_drr.o
|
|
obj-$(CONFIG_NET_SCH_PLUG) += sch_plug.o
|
|
obj-$(CONFIG_NET_SCH_ETS) += sch_ets.o
|
|
obj-$(CONFIG_NET_SCH_MQPRIO) += sch_mqprio.o
|
|
obj-$(CONFIG_NET_SCH_SKBPRIO) += sch_skbprio.o
|
|
obj-$(CONFIG_NET_SCH_CHOKE) += sch_choke.o
|
|
obj-$(CONFIG_NET_SCH_QFQ) += sch_qfq.o
|
|
obj-$(CONFIG_NET_SCH_CODEL) += sch_codel.o
|
|
obj-$(CONFIG_NET_SCH_FQ_CODEL) += sch_fq_codel.o
|
|
obj-$(CONFIG_NET_SCH_CAKE) += sch_cake.o
|
|
obj-$(CONFIG_NET_SCH_FQ) += sch_fq.o
|
|
obj-$(CONFIG_NET_SCH_HHF) += sch_hhf.o
|
|
obj-$(CONFIG_NET_SCH_PIE) += sch_pie.o
|
|
obj-$(CONFIG_NET_SCH_FQ_PIE) += sch_fq_pie.o
|
|
obj-$(CONFIG_NET_SCH_CBS) += sch_cbs.o
|
|
obj-$(CONFIG_NET_SCH_ETF) += sch_etf.o
|
|
obj-$(CONFIG_NET_SCH_TAPRIO) += sch_taprio.o
|
|
|
|
obj-$(CONFIG_NET_CLS_U32) += cls_u32.o
|
|
obj-$(CONFIG_NET_CLS_ROUTE4) += cls_route.o
|
|
obj-$(CONFIG_NET_CLS_FW) += cls_fw.o
|
|
obj-$(CONFIG_NET_CLS_RSVP) += cls_rsvp.o
|
|
obj-$(CONFIG_NET_CLS_TCINDEX) += cls_tcindex.o
|
|
obj-$(CONFIG_NET_CLS_RSVP6) += cls_rsvp6.o
|
|
obj-$(CONFIG_NET_CLS_BASIC) += cls_basic.o
|
|
obj-$(CONFIG_NET_CLS_FLOW) += cls_flow.o
|
|
obj-$(CONFIG_NET_CLS_CGROUP) += cls_cgroup.o
|
|
obj-$(CONFIG_NET_CLS_BPF) += cls_bpf.o
|
|
obj-$(CONFIG_NET_CLS_FLOWER) += cls_flower.o
|
|
obj-$(CONFIG_NET_CLS_MATCHALL) += cls_matchall.o
|
|
obj-$(CONFIG_NET_EMATCH) += ematch.o
|
|
obj-$(CONFIG_NET_EMATCH_CMP) += em_cmp.o
|
|
obj-$(CONFIG_NET_EMATCH_NBYTE) += em_nbyte.o
|
|
obj-$(CONFIG_NET_EMATCH_U32) += em_u32.o
|
|
obj-$(CONFIG_NET_EMATCH_META) += em_meta.o
|
|
obj-$(CONFIG_NET_EMATCH_TEXT) += em_text.o
|
|
obj-$(CONFIG_NET_EMATCH_CANID) += em_canid.o
|
|
obj-$(CONFIG_NET_EMATCH_IPSET) += em_ipset.o
|
|
obj-$(CONFIG_NET_EMATCH_IPT) += em_ipt.o
|