{
    "content": [
        {
            "type": "text",
            "text": "# tc-actions (man)\n\n## NAME\n\nactions - independently defined actions in tc\n\n## SYNOPSIS\n\ntc [ TCOPTIONS ] actions add | change | replace ACTSPEC\ntc [ TCOPTIONS ] actions get | delete ACTISPEC\ntc [ TCOPTIONS ] actions flush ACTNAMESPEC\ntc [ TCOPTIONS ] actions ls | list ACTNAMESPEC [ ACTFILTER ]\nACTSPEC  := action ACTDETAIL [ INDEXSPEC ] [ COOKIESPEC ] [ FLAGS ] [ HWSTATSSPEC ] [\nCONTROL ] [ SKIPSPEC ]\nACTISPEC := ACTNAMESPEC INDEXSPEC\nACTNAMESPEC := action ACTNAME\nINDEXSPEC := index INDEX\nACTFILTER := since MSTIME\nCOOKIESPEC := cookie COOKIE\nFLAGS := nopercpu\nHWSTATSSPEC := hwstats { immediate | delayed | disabled }\nACTDETAIL := ACTNAME ACTPARAMS\nACTNAME may be any valid action type: gact, mirred, bpf, connmark, csum, police, etc.\nMSTIME Time since last update.\nCONTROL := { reclassify | pipe | drop | continue | ok }\nSKIPSPEC := { skipsw | skiphw }\nTCOPTIONS These are the options that are specific to tc and not  only  the  options.\nRefer to tc(8) for more information.\n\n## DESCRIPTION\n\nThe  actions object in tc allows a user to define actions independently of a classifier (fil‐\nter). These actions can then be assigned to one or more filters, with  any  packets  matching\nthe classifier's criteria having that action performed on them.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPERATIONS** (2 subsections)\n- **ACTION OPTIONS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "tc-actions",
        "section": "",
        "mode": "man",
        "summary": "actions - independently defined actions in tc",
        "synopsis": "tc [ TCOPTIONS ] actions add | change | replace ACTSPEC\ntc [ TCOPTIONS ] actions get | delete ACTISPEC\ntc [ TCOPTIONS ] actions flush ACTNAMESPEC\ntc [ TCOPTIONS ] actions ls | list ACTNAMESPEC [ ACTFILTER ]\nACTSPEC  := action ACTDETAIL [ INDEXSPEC ] [ COOKIESPEC ] [ FLAGS ] [ HWSTATSSPEC ] [\nCONTROL ] [ SKIPSPEC ]\nACTISPEC := ACTNAMESPEC INDEXSPEC\nACTNAMESPEC := action ACTNAME\nINDEXSPEC := index INDEX\nACTFILTER := since MSTIME\nCOOKIESPEC := cookie COOKIE\nFLAGS := nopercpu\nHWSTATSSPEC := hwstats { immediate | delayed | disabled }\nACTDETAIL := ACTNAME ACTPARAMS\nACTNAME may be any valid action type: gact, mirred, bpf, connmark, csum, police, etc.\nMSTIME Time since last update.\nCONTROL := { reclassify | pipe | drop | continue | ok }\nSKIPSPEC := { skipsw | skiphw }\nTCOPTIONS These are the options that are specific to tc and not  only  the  options.\nRefer to tc(8) for more information.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "tc",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc/8/json"
            },
            {
                "name": "tc-bpf",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-bpf/8/json"
            },
            {
                "name": "tc-connmark",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-connmark/8/json"
            },
            {
                "name": "tc-csum",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-csum/8/json"
            },
            {
                "name": "tc-ife",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-ife/8/json"
            },
            {
                "name": "tc-mirred",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-mirred/8/json"
            },
            {
                "name": "tc-nat",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-nat/8/json"
            },
            {
                "name": "pedit",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pedit/8/json"
            },
            {
                "name": "tc-police",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-police/8/json"
            },
            {
                "name": "tc-simple",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-simple/8/json"
            },
            {
                "name": "tc-skbedit",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-skbedit/8/json"
            },
            {
                "name": "tc-skbmod",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-skbmod/8/json"
            },
            {
                "name": "tc-tunnelkey",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-tunnelkey/8/json"
            },
            {
                "name": "vlan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vlan/8/json"
            },
            {
                "name": "tc-xt",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-xt/8/json"
            },
            {
                "name": "tc",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPERATIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "change",
                        "lines": 1
                    },
                    {
                        "name": "replace",
                        "lines": 17
                    }
                ]
            },
            {
                "name": "ACTION OPTIONS",
                "lines": 86,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "actions - independently defined actions in tc\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "tc [ TCOPTIONS ] actions add | change | replace ACTSPEC\n\ntc [ TCOPTIONS ] actions get | delete ACTISPEC\n\ntc [ TCOPTIONS ] actions flush ACTNAMESPEC\n\ntc [ TCOPTIONS ] actions ls | list ACTNAMESPEC [ ACTFILTER ]\n\nACTSPEC  := action ACTDETAIL [ INDEXSPEC ] [ COOKIESPEC ] [ FLAGS ] [ HWSTATSSPEC ] [\nCONTROL ] [ SKIPSPEC ]\n\nACTISPEC := ACTNAMESPEC INDEXSPEC\n\nACTNAMESPEC := action ACTNAME\n\nINDEXSPEC := index INDEX\n\nACTFILTER := since MSTIME\n\nCOOKIESPEC := cookie COOKIE\n\nFLAGS := nopercpu\n\nHWSTATSSPEC := hwstats { immediate | delayed | disabled }\n\nACTDETAIL := ACTNAME ACTPARAMS\n\nACTNAME may be any valid action type: gact, mirred, bpf, connmark, csum, police, etc.\n\nMSTIME Time since last update.\n\nCONTROL := { reclassify | pipe | drop | continue | ok }\n\nSKIPSPEC := { skipsw | skiphw }\n\nTCOPTIONS These are the options that are specific to tc and not  only  the  options.\nRefer to tc(8) for more information.\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The  actions object in tc allows a user to define actions independently of a classifier (fil‐\nter). These actions can then be assigned to one or more filters, with  any  packets  matching\nthe classifier's criteria having that action performed on them.\n\nEach action type (mirred, police, etc.) will have its own table to store all created actions.\n\n",
                "subsections": []
            },
            "OPERATIONS": {
                "content": "add    Create a new action in that action's table.\n\n",
                "subsections": [
                    {
                        "name": "change",
                        "content": ""
                    },
                    {
                        "name": "replace",
                        "content": "Make modifications to an existing action.\n\nget    Display  the  action  with the specified index value. When combined with the -s option\nfor tc, display the statistics for that action.\n\ndelete Delete the action with the specified index value. If the action is already  associated\nwith a classifier, it does not delete the classifier.\n\nls\nlist   List  all the actions in the specified table. When combined with the -s option for tc,\ndisplay the statistics for all actions in the specified table.  When combined with the\noption since allows doing a millisecond time-filter since the last time an action  was\nused in the datapath.\n\nflush  Delete all actions stored in the specified table.\n\n"
                    }
                ]
            },
            "ACTION OPTIONS": {
                "content": "Note that these options are available to all action types.\n\nindex INDEX\nSpecify the table index value of an action.  INDEX is a 32-bit value that is unique to\nthe specific type of action referenced.\n\nFor add, change, and replace operations, the index is optional.  When adding a new ac‐\ntion, specifying an index value will assign the action to that index unless that index\nvalue  has  already  been assigned. Omitting the index value for an add operation will\ncause the kernel to assign a value to the new action.\n\nFor get and delete operations, the index is required to identify the  specific  action\nto be displayed or deleted.\n\n\ncookie COOKIE\nIn  addition to the specific action, mark the matching packet with the value specified\nby COOKIE.  The COOKIE is a 128-bit value that will not be interpreted by  the  kernel\nwhatsoever.   As  such,  it  can  be  used as a correlating value for maintaining user\nstate.  The value to be stored is completely arbitrary and does not require a specific\nformat. It is stored inside the action structure itself.\n\n\nFLAGS  Action-specific flags. Currently, the only supported flag is nopercpu which indicates\nthat action is expected to have minimal software data-path traffic and doesn't need to\nallocate stat counters with percpu allocator.  This option is intended to be  used  by\nhardware-offloaded actions.\n\n\nhwstats HWSTATS\nSpecifies  the  type  of HW stats of new action. If omitted, any stats counter type is\ngoing to be used, according to driver and its resources.  The HWSTATS  indicates  the\ntype. Any of the following are valid:\n\nimmediate\nMeans  that  in  dump,  user  gets  the  current HW stats state from the device\nqueried at the dump time.\n\ndelayed\nMeans that in dump, user gets HW stats that might be out of date for some time,\nmaybe couple of seconds. This is the case when driver polls stats updates peri‐\nodically or when it gets async stats update from the device.\n\ndisabled\nNo HW stats are going to be available in dump.\n\n\nsince MSTIME\nWhen dumping large number of actions,  a  millisecond  time-filter  can  be  specified\nMSTIME.   The  MSTIME  is a millisecond count since last time a packet hit the action.\nAs an example specifying \"since 20000\" implies to dump  all  actions  that  have  seen\npackets in the last 20 seconds. This option is useful when the kernel has a large num‐\nber of actions and you are only interested in recently used actions.\n\n\nCONTROL\nThe  CONTROL  indicates  how  tc should proceed after executing the action. Any of the\nfollowing are valid:\n\nreclassify\nRestart the classifiction by jumping back to the first filter attached  to  the\naction's parent.\n\npipe   Continue with the next action. This is the default control.\n\ndrop   Drop the packed without running any further actions.\n\ncontinue\nContinue the classification with the next filter.\n\npass   Return  to  the  calling qdisc for packet processing, and end classification of\nthis packet.\n\n\nSKIPSPEC\nThe SKIPSPEC indicates how tc should proceed when executing the  action.  Any  of  the\nfollowing are valid:\n\nskipsw\nDo  not process action by software. If hardware has no offload support for this\naction, operation will fail.\n\nskiphw\nDo not process action by hardware.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "tc(8),  tc-bpf(8),  tc-connmark(8),  tc-csum(8),  tc-ife(8),  tc-mirred(8),  tc-nat(8),   tc-\npedit(8),  tc-police(8),  tc-simple(8),  tc-skbedit(8),  tc-skbmod(8),  tc-tunnelkey(8), tc-\nvlan(8), tc-xt(8)\n\niproute2                                     1 Aug 2017                             actions in tc(8)",
                "subsections": []
            }
        }
    }
}