from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209612

userrating:


May 25th. 2007:
Words

486

Views

258612

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149912

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





GATE

Section: Linux (8)
Updated: 12 Mar 2020
Index Return to Main Contents
 

NAME

gate - Stream Gate Action  

SYNOPSIS

tc ... action gate
         [ bas-time BASETIME ] [ clockid CLOCKID ]
         sche-entry <gate state> <interval 1> [ <internal priority> <max octets> ]
         sche-entry <gate state> <interval 2> [ <internal priority> <max octets> ]
         sche-entry <gate state> <interval 3> [ <internal priority> <max octets> ]
         ......
         sche-entry <gate state> <interval N> [ <internal priority> <max octets> ]

 

DESCRIPTION

GATE action allows specified ingress frames can be passed at specific time slot, or be dropped at specific time slot. Tc filter filters the ingress frames, then tc gate action would specify which time slot and how many bytes these frames can be passed to device and which time slot frames would be dropped. Gate action also assign a bas-time to tell when the entry list start. Then gate action would start to repeat the gate entry list cyclically at the start bas-time. For the software simulation, gate action requires the user assign reference time clock type.

 

PARAMETERS

bas-time

Specifies the instant in nanoseconds, defining the time when the schedule starts. If 'bas-time' is a time in the past, the schedule will start at

bas-time + (N * cycl-time)

where N is the smallest integer so the resulting time is greater than "now", and "cycl-time" is the sum of all the intervals of the entries in the schedule. Without bas-time specified, will default to be 0.

clockid

Specifies the clock to be used by qdisc's internal timer for measuring time and scheduling events. Not valid if gate action is used for offloading filter. For example, tc filter command with skip_sw parameter.

sche-entry

There may multiple sche-entry parameters in a single schedule. Each one has the format:

sche-entry <gate state> <interval> [ <internal priority> <max octets> ]


<gate state> means gate states. 'open' keep gate open, 'close' keep gate close.
<interval> means how much nano seconds for this time slot.
<internal priority> means internal priority value. Present of the internal receiving queue for this stream. "-1" means wildcard. <internal priority> and <max octets> can be omit default to be "-1" which both
 value to be "-1" for this <sche-entry>.
<max octets> means how many octets size could pass in this time slot. Dropped if overlimited. "-1" means wildcard. <max octets> can be omit default to be "-1" which value to be "-1" for this <sche-entry>.
Note that <internal priority> and <max octets> are nothing meaning for gate state is "close" in a "sche-entry". All frames are dropped when "sche-entry" with "close" state.

 

EXAMPLES

The following example shows tc filter frames source ip match to the 192.168.0.20 will keep the gate open for 200ms and limit the traffic to 8MB in this sche-entry. Then keep the traffic gate to be close for 100ms. Frames arrived at gate close state would be dropped. Then the cycle would run the gate entries periodically. The schedule will start at instant 200.0s using the reference CLOCK_TAI. The schedule is composed of two entries each of 300ms duration.

# tc qdisc add dev eth0 ingress # tc filter add dev eth0 parent ffff: protocol ip
           flower skip_hw src_ip 192.168.0.20 
           action gate index 2 clockid CLOCK_TAI 
           bas-time 200000000000ns 
           sche-entry open 200000000ns -1 8000000b 
           sche-entry close 100000000ns

Following commands is an example to filter a stream source mac match to the 10:00:80:00:00:00 icmp frames will be dropped at any time with cycle 200ms. With a default basetime 0 and clockid is CLOCK_TAI as default.

# tc qdisc add dev eth0 ingress # tc filter add dev eth0 parent ffff: protocol ip         flower ip_proto icmp dst_mac 10:00:80:00:00:00
        action gate index 12 sche-entry close 200000000ns

 

AUTHORS

Po Liu <Po.Liu@nxp.com>


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
EXAMPLES
AUTHORS





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.4 ms