15630257fSFerruh Yigit.. SPDX-License-Identifier: BSD-3-Clause 271f2e9baSJasvinder Singh Copyright(c) 2015-2018 Intel Corporation. 3f1e779ecSCristian Dumitrescu 4f1e779ecSCristian DumitrescuInternet Protocol (IP) Pipeline Application 5f1e779ecSCristian Dumitrescu=========================================== 6f1e779ecSCristian Dumitrescu 7f1e779ecSCristian DumitrescuApplication overview 8f1e779ecSCristian Dumitrescu-------------------- 9f1e779ecSCristian Dumitrescu 10f1e779ecSCristian DumitrescuThe *Internet Protocol (IP) Pipeline* application is intended to be a vehicle for rapid development of packet processing 1171f2e9baSJasvinder Singhapplications on multi-core CPUs. 12f1e779ecSCristian Dumitrescu 1371f2e9baSJasvinder SinghFollowing OpenFlow and P4 design principles, the application can be used to create functional blocks called pipelines out 1471f2e9baSJasvinder Singhof input/output ports, tables and actions in a modular way. Multiple pipelines can be inter-connected through packet queues 15f1e779ecSCristian Dumitrescuto create complete applications (super-pipelines). 16f1e779ecSCristian Dumitrescu 1771f2e9baSJasvinder SinghThe pipelines are mapped to application threads, with each pipeline executed by a single thread and each thread able to run 1871f2e9baSJasvinder Singhone or several pipelines. The possibilities of creating pipelines out of ports, tables and actions, connecting multiple 1971f2e9baSJasvinder Singhpipelines together and mapping the pipelines to execution threads are endless, therefore this application can be seen as 2071f2e9baSJasvinder Singha true application generator. 21f1e779ecSCristian Dumitrescu 2271f2e9baSJasvinder SinghPipelines are created and managed through Command Line Interface (CLI): 23f1e779ecSCristian Dumitrescu 2471f2e9baSJasvinder Singh * Any standard TCP client (e.g. telnet, netcat, custom script, etc) is typically able to connect to the application, send 2571f2e9baSJasvinder Singh commands through the network and wait for the response before pushing the next command. 26f1e779ecSCristian Dumitrescu 2771f2e9baSJasvinder Singh * All the application objects are created and managed through CLI commands: 2871f2e9baSJasvinder Singh * 'Primitive' objects used to create pipeline ports: memory pools, links (i.e. network interfaces), SW queues, traffic managers, etc. 2971f2e9baSJasvinder Singh * Action profiles: used to define the actions to be executed by pipeline input/output ports and tables. 3071f2e9baSJasvinder Singh * Pipeline components: input/output ports, tables, pipelines, mapping of pipelines to execution threads. 31f1e779ecSCristian Dumitrescu 32f1e779ecSCristian DumitrescuRunning the application 33f1e779ecSCristian Dumitrescu----------------------- 34f1e779ecSCristian Dumitrescu 35f1e779ecSCristian DumitrescuThe application startup command line is:: 36f1e779ecSCristian Dumitrescu 3771f2e9baSJasvinder Singh ip_pipeline [EAL_ARGS] -- [-s SCRIPT_FILE] [-h HOST] [-p PORT] 38f1e779ecSCristian Dumitrescu 39f1e779ecSCristian DumitrescuThe application startup arguments are: 40f1e779ecSCristian Dumitrescu 41f1e779ecSCristian Dumitrescu``-s SCRIPT_FILE`` 42f1e779ecSCristian Dumitrescu 43f1e779ecSCristian Dumitrescu * Optional: Yes 44f1e779ecSCristian Dumitrescu 45f1e779ecSCristian Dumitrescu * Default: Not present 46f1e779ecSCristian Dumitrescu 4771f2e9baSJasvinder Singh * Argument: Path to the CLI script file to be run at application startup. 4871f2e9baSJasvinder Singh No CLI script file will run at startup if this argument is not present. 49f1e779ecSCristian Dumitrescu 5071f2e9baSJasvinder Singh``-h HOST`` 51f1e779ecSCristian Dumitrescu 52f1e779ecSCristian Dumitrescu * Optional: Yes 53f1e779ecSCristian Dumitrescu 5471f2e9baSJasvinder Singh * Default: ``0.0.0.0`` 55f1e779ecSCristian Dumitrescu 5671f2e9baSJasvinder Singh * Argument: IP Address of the host running ip pipeline application to be used by 5771f2e9baSJasvinder Singh remote TCP based client (telnet, netcat, etc.) for connection. 5871f2e9baSJasvinder Singh 5971f2e9baSJasvinder Singh``-p PORT`` 6071f2e9baSJasvinder Singh 6171f2e9baSJasvinder Singh * Optional: Yes 6271f2e9baSJasvinder Singh 6371f2e9baSJasvinder Singh * Default: ``8086`` 6471f2e9baSJasvinder Singh 6571f2e9baSJasvinder Singh * Argument: TCP port number at which the ip pipeline is running. 6671f2e9baSJasvinder Singh This port number should be used by remote TCP client (such as telnet, netcat, etc.) to connect to host application. 6771f2e9baSJasvinder Singh 6871f2e9baSJasvinder SinghRefer to *DPDK Getting Started Guide* for general information on running applications and the Environment Abstraction Layer (EAL) options. 6971f2e9baSJasvinder Singh 7071f2e9baSJasvinder SinghThe following is an example command to run ip pipeline application configured for layer 2 forwarding: 7171f2e9baSJasvinder Singh 7271f2e9baSJasvinder Singh.. code-block:: console 7371f2e9baSJasvinder Singh 7471f2e9baSJasvinder Singh $ ./build/ip_pipeline -c 0x3 -- -s examples/route_ecmp.cli 7571f2e9baSJasvinder Singh 7671f2e9baSJasvinder SinghThe application should start successfully and display as follows: 7771f2e9baSJasvinder Singh 7871f2e9baSJasvinder Singh.. code-block:: console 7971f2e9baSJasvinder Singh 8071f2e9baSJasvinder Singh EAL: Detected 40 lcore(s) 8171f2e9baSJasvinder Singh EAL: Detected 2 NUMA nodes 8271f2e9baSJasvinder Singh EAL: Multi-process socket /var/run/.rte_unix 8371f2e9baSJasvinder Singh EAL: Probing VFIO support... 8471f2e9baSJasvinder Singh EAL: PCI device 0000:02:00.0 on NUMA socket 0 8571f2e9baSJasvinder Singh EAL: probe driver: 8086:10fb net_ixgbe 8671f2e9baSJasvinder Singh ... 8771f2e9baSJasvinder Singh 8871f2e9baSJasvinder SinghTo run remote client (e.g. telnet) to communicate with the ip pipeline application: 8971f2e9baSJasvinder Singh 9071f2e9baSJasvinder Singh.. code-block:: console 9171f2e9baSJasvinder Singh 9271f2e9baSJasvinder Singh $ telnet 127.0.0.1 8086 9371f2e9baSJasvinder Singh 9471f2e9baSJasvinder SinghWhen running a telnet client as above, command prompt is displayed: 9571f2e9baSJasvinder Singh 9671f2e9baSJasvinder Singh.. code-block:: console 9771f2e9baSJasvinder Singh 9871f2e9baSJasvinder Singh Trying 127.0.0.1... 9971f2e9baSJasvinder Singh Connected to 127.0.0.1. 10071f2e9baSJasvinder Singh Escape character is '^]'. 10171f2e9baSJasvinder Singh 10271f2e9baSJasvinder Singh Welcome to IP Pipeline! 10371f2e9baSJasvinder Singh 10471f2e9baSJasvinder Singh pipeline> 10571f2e9baSJasvinder Singh 10671f2e9baSJasvinder SinghOnce application and telnet client start running, messages can be sent from client to application. 10771f2e9baSJasvinder SinghAt any stage, telnet client can be terminated using the quit command. 108f1e779ecSCristian Dumitrescu 109f1e779ecSCristian Dumitrescu 110f1e779ecSCristian DumitrescuApplication stages 111f1e779ecSCristian Dumitrescu------------------ 112f1e779ecSCristian Dumitrescu 113f1e779ecSCristian DumitrescuInitialization 114f1e779ecSCristian Dumitrescu~~~~~~~~~~~~~~ 115f1e779ecSCristian Dumitrescu 11671f2e9baSJasvinder SinghDuring this stage, EAL layer is initialised and application specific arguments are parsed. Furthermore, the data strcutures 11771f2e9baSJasvinder Singh(i.e. linked lists) for application objects are initialized. In case of any initialization error, an error message 11871f2e9baSJasvinder Singhis displayed and the application is terminated. 119f1e779ecSCristian Dumitrescu 120f1e779ecSCristian Dumitrescu.. _ip_pipeline_runtime: 121f1e779ecSCristian Dumitrescu 122f1e779ecSCristian DumitrescuRun-time 123f1e779ecSCristian Dumitrescu~~~~~~~~ 124f1e779ecSCristian Dumitrescu 12571f2e9baSJasvinder SinghThe master thread is creating and managing all the application objects based on CLI input. 126f1e779ecSCristian Dumitrescu 12771f2e9baSJasvinder SinghEach data plane thread runs one or several pipelines previously assigned to it in round-robin order. Each data plane thread 12871f2e9baSJasvinder Singhexecutes two tasks in time-sharing mode: 129f1e779ecSCristian Dumitrescu 13071f2e9baSJasvinder Singh1. *Packet processing task*: Process bursts of input packets read from the pipeline input ports. 131f1e779ecSCristian Dumitrescu 13271f2e9baSJasvinder Singh2. *Message handling task*: Periodically, the data plane thread pauses the packet processing task and polls for request 13371f2e9baSJasvinder Singh messages send by the master thread. Examples: add/remove pipeline to/from current data plane thread, add/delete rules 13471f2e9baSJasvinder Singh to/from given table of a specific pipeline owned by the current data plane thread, read statistics, etc. 135f1e779ecSCristian Dumitrescu 13671f2e9baSJasvinder SinghExamples 13771f2e9baSJasvinder Singh-------- 138f1e779ecSCristian Dumitrescu 13971f2e9baSJasvinder Singh.. _table_examples: 140f1e779ecSCristian Dumitrescu 141f1e779ecSCristian Dumitrescu.. tabularcolumns:: |p{3cm}|p{5cm}|p{4cm}|p{4cm}| 142f1e779ecSCristian Dumitrescu 14371f2e9baSJasvinder Singh.. table:: Pipeline examples provided with the application 144f1e779ecSCristian Dumitrescu 14571f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 146f1e779ecSCristian Dumitrescu | Name | Table(s) | Actions | Messages | 14771f2e9baSJasvinder Singh +=======================+======================+================+====================================+ 14871f2e9baSJasvinder Singh | L2fwd | Stub | Forward | 1. Mempool create | 14971f2e9baSJasvinder Singh | | | | 2. Link create | 15071f2e9baSJasvinder Singh | Note: Implemented | | | 3. Pipeline create | 15171f2e9baSJasvinder Singh | using pipeline with | | | 4. Pipeline port in/out | 15271f2e9baSJasvinder Singh | a simple pass-through | | | 5. Pipeline table | 15371f2e9baSJasvinder Singh | connection between | | | 6. Pipeline port in table | 15471f2e9baSJasvinder Singh | input and output | | | 7. Pipeline enable | 15571f2e9baSJasvinder Singh | ports. | | | 8. Pipeline table rule add | 15671f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 15771f2e9baSJasvinder Singh | Flow classification | Exact match | Forward | 1. Mempool create | 15871f2e9baSJasvinder Singh | | | | 2. Link create | 15971f2e9baSJasvinder Singh | | * Key = byte array | | 3. Pipeline create | 16071f2e9baSJasvinder Singh | | (16 bytes) | | 4. Pipeline port in/out | 16171f2e9baSJasvinder Singh | | * Offset = 278 | | 5. Pipeline table | 16271f2e9baSJasvinder Singh | | * Table size = 64K | | 6. Pipeline port in table | 16371f2e9baSJasvinder Singh | | | | 7. Pipeline enable | 16471f2e9baSJasvinder Singh | | | | 8. Pipeline table rule add default | 16571f2e9baSJasvinder Singh | | | | 9. Pipeline table rule add | 16671f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 16771f2e9baSJasvinder Singh | KNI | Stub | Forward | 1. Mempool create | 16871f2e9baSJasvinder Singh | | | | 2. Link create | 16971f2e9baSJasvinder Singh | | | | 3. Pipeline create | 17071f2e9baSJasvinder Singh | | | | 4. Pipeline port in/out | 17171f2e9baSJasvinder Singh | | | | 5. Pipeline table | 17271f2e9baSJasvinder Singh | | | | 6. Pipeline port in table | 17371f2e9baSJasvinder Singh | | | | 7. Pipeline enable | 17471f2e9baSJasvinder Singh | | | | 8. Pipeline table rule add | 17571f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 17671f2e9baSJasvinder Singh | Firewall | ACL | Allow/Drop | 1. Mempool create | 17771f2e9baSJasvinder Singh | | | | 2. Link create | 17871f2e9baSJasvinder Singh | | * Key = n-tuple | | 3. Pipeline create | 17971f2e9baSJasvinder Singh | | * Offset = 270 | | 4. Pipeline port in/out | 18071f2e9baSJasvinder Singh | | * Table size = 4K | | 5. Pipeline table | 18171f2e9baSJasvinder Singh | | | | 6. Pipeline port in table | 18271f2e9baSJasvinder Singh | | | | 7. Pipeline enable | 18371f2e9baSJasvinder Singh | | | | 8. Pipeline table rule add default | 18471f2e9baSJasvinder Singh | | | | 9. Pipeline table rule add | 18571f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 18671f2e9baSJasvinder Singh | IP routing | LPM (IPv4) | Forward | 1. Mempool Create | 18771f2e9baSJasvinder Singh | | | | 2. Link create | 18871f2e9baSJasvinder Singh | | * Key = IP dest addr | | 3. Pipeline creat | 18971f2e9baSJasvinder Singh | | * Offset = 286 | | 4. Pipeline port in/out | 19071f2e9baSJasvinder Singh | | * Table size = 4K | | 5. Pipeline table | 19171f2e9baSJasvinder Singh | | | | 6. Pipeline port in table | 19271f2e9baSJasvinder Singh | | | | 7. Pipeline enable | 19371f2e9baSJasvinder Singh | | | | 8. Pipeline table rule add default | 19471f2e9baSJasvinder Singh | | | | 9. Pipeline table rule add | 19571f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 19671f2e9baSJasvinder Singh | Equal-cost multi-path | LPM (IPv4) | Forward, | 1. Mempool Create | 19771f2e9baSJasvinder Singh | routing (ECMP) | | load balance, | 2. Link create | 19871f2e9baSJasvinder Singh | | * Key = IP dest addr | encap ether | 3. Pipeline create | 19971f2e9baSJasvinder Singh | | * Offset = 286 | | 4. Pipeline port in/out | 20071f2e9baSJasvinder Singh | | * Table size = 4K | | 5. Pipeline table (LPM) | 20171f2e9baSJasvinder Singh | | | | 6. Pipeline table (Array) | 20271f2e9baSJasvinder Singh | | | | 7. Pipeline port in table (LPM) | 20371f2e9baSJasvinder Singh | | Array | | 8. Pipeline enable | 20471f2e9baSJasvinder Singh | | | | 9. Pipeline table rule add default | 20571f2e9baSJasvinder Singh | | * Key = Array index | | 10. Pipeline table rule add(LPM) | 20671f2e9baSJasvinder Singh | | * Offset = 256 | | 11. Pipeline table rule add(Array) | 20771f2e9baSJasvinder Singh | | * Size = 64K | | | 208f1e779ecSCristian Dumitrescu | | | | | 20971f2e9baSJasvinder Singh +-----------------------+----------------------+----------------+------------------------------------+ 210f1e779ecSCristian Dumitrescu 211f1e779ecSCristian DumitrescuCommand Line Interface (CLI) 212f1e779ecSCristian Dumitrescu---------------------------- 213f1e779ecSCristian Dumitrescu 21471f2e9baSJasvinder SinghLink 21571f2e9baSJasvinder Singh~~~~ 216f1e779ecSCristian Dumitrescu 21771f2e9baSJasvinder Singh Link configuration :: 218f1e779ecSCristian Dumitrescu 21971f2e9baSJasvinder Singh link <link_name> 22071f2e9baSJasvinder Singh dev <device_name>|port <port_id> 22171f2e9baSJasvinder Singh rxq <n_queues> <queue_size> <mempool_name> 22271f2e9baSJasvinder Singh txq <n_queues> <queue_size> promiscuous on | off 22371f2e9baSJasvinder Singh [rss <qid_0> ... <qid_n>] 224f1e779ecSCristian Dumitrescu 225bc57bef7SKevin Laatz Note: The PCI device name must be specified in the Domain:Bus:Device.Function format. 226bc57bef7SKevin Laatz 227f1e779ecSCristian Dumitrescu 22871f2e9baSJasvinder SinghMempool 22971f2e9baSJasvinder Singh~~~~~~~ 230f1e779ecSCristian Dumitrescu 23171f2e9baSJasvinder Singh Mempool create :: 232f1e779ecSCristian Dumitrescu 23371f2e9baSJasvinder Singh mempool <mempool_name> buffer <buffer_size> 23471f2e9baSJasvinder Singh pool <pool_size> cache <cache_size> cpu <cpu_id> 235f1e779ecSCristian Dumitrescu 236f1e779ecSCristian Dumitrescu 23771f2e9baSJasvinder SinghSoftware queue 23871f2e9baSJasvinder Singh~~~~~~~~~~~~~~ 239f1e779ecSCristian Dumitrescu 24071f2e9baSJasvinder Singh Create software queue :: 241f1e779ecSCristian Dumitrescu 24271f2e9baSJasvinder Singh swq <swq_name> size <size> cpu <cpu_id> 243f1e779ecSCristian Dumitrescu 244f1e779ecSCristian Dumitrescu 24571f2e9baSJasvinder SinghTraffic manager 24671f2e9baSJasvinder Singh~~~~~~~~~~~~~~~ 247f1e779ecSCristian Dumitrescu 24871f2e9baSJasvinder Singh Add traffic manager subport profile :: 249f1e779ecSCristian Dumitrescu 25071f2e9baSJasvinder Singh tmgr subport profile 25171f2e9baSJasvinder Singh <tb_rate> <tb_size> 25271f2e9baSJasvinder Singh <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate> 25371f2e9baSJasvinder Singh <tc_period> 25471f2e9baSJasvinder Singh 25571f2e9baSJasvinder Singh 25671f2e9baSJasvinder Singh Add traffic manager pipe profile :: 25771f2e9baSJasvinder Singh 25871f2e9baSJasvinder Singh tmgr pipe profile 25971f2e9baSJasvinder Singh <tb_rate> <tb_size> 26071f2e9baSJasvinder Singh <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate> 26171f2e9baSJasvinder Singh <tc_period> 26271f2e9baSJasvinder Singh <tc_ov_weight> <wrr_weight0..15> 26371f2e9baSJasvinder Singh 26471f2e9baSJasvinder Singh Create traffic manager port :: 26571f2e9baSJasvinder Singh 26671f2e9baSJasvinder Singh tmgr <tmgr_name> 26771f2e9baSJasvinder Singh rate <rate> 26871f2e9baSJasvinder Singh spp <n_subports_per_port> 26971f2e9baSJasvinder Singh pps <n_pipes_per_subport> 27071f2e9baSJasvinder Singh qsize <qsize_tc0> 27171f2e9baSJasvinder Singh <qsize_tc1> <qsize_tc2> <qsize_tc3> 27271f2e9baSJasvinder Singh fo <frame_overhead> mtu <mtu> cpu <cpu_id> 27371f2e9baSJasvinder Singh 27471f2e9baSJasvinder Singh Configure traffic manager subport :: 27571f2e9baSJasvinder Singh 27671f2e9baSJasvinder Singh tmgr <tmgr_name> 27771f2e9baSJasvinder Singh subport <subport_id> 27871f2e9baSJasvinder Singh profile <subport_profile_id> 27971f2e9baSJasvinder Singh 28071f2e9baSJasvinder Singh Configure traffic manager pipe :: 28171f2e9baSJasvinder Singh 28271f2e9baSJasvinder Singh tmgr <tmgr_name> 28371f2e9baSJasvinder Singh subport <subport_id> 28471f2e9baSJasvinder Singh pipe from <pipe_id_first> to <pipe_id_last> 28571f2e9baSJasvinder Singh profile <pipe_profile_id> 28671f2e9baSJasvinder Singh 28771f2e9baSJasvinder Singh 28871f2e9baSJasvinder SinghTap 28971f2e9baSJasvinder Singh~~~ 29071f2e9baSJasvinder Singh 29171f2e9baSJasvinder Singh Create tap port :: 29271f2e9baSJasvinder Singh 29371f2e9baSJasvinder Singh tap <name> 29471f2e9baSJasvinder Singh 29571f2e9baSJasvinder Singh 29671f2e9baSJasvinder SinghKni 29771f2e9baSJasvinder Singh~~~ 29871f2e9baSJasvinder Singh 29971f2e9baSJasvinder Singh Create kni port :: 30071f2e9baSJasvinder Singh 30171f2e9baSJasvinder Singh kni <kni_name> 30271f2e9baSJasvinder Singh link <link_name> 30371f2e9baSJasvinder Singh mempool <mempool_name> 30471f2e9baSJasvinder Singh [thread <thread_id>] 30571f2e9baSJasvinder Singh 30671f2e9baSJasvinder Singh 307*1edccebcSFan ZhangCryptodev 308*1edccebcSFan Zhang~~~~~~~~~ 309*1edccebcSFan Zhang 310*1edccebcSFan Zhang Create cryptodev port :: 311*1edccebcSFan Zhang 312*1edccebcSFan Zhang cryptodev <cryptodev_name> 313*1edccebcSFan Zhang dev <DPDK Cryptodev PMD name> 314*1edccebcSFan Zhang queue <n_queues> <queue_size> 315*1edccebcSFan Zhang 31671f2e9baSJasvinder SinghAction profile 31771f2e9baSJasvinder Singh~~~~~~~~~~~~~~ 31871f2e9baSJasvinder Singh 31971f2e9baSJasvinder Singh Create action profile for pipeline input port :: 32071f2e9baSJasvinder Singh 32171f2e9baSJasvinder Singh port in action profile <profile_name> 32271f2e9baSJasvinder Singh [filter match | mismatch offset <key_offset> mask <key_mask> key <key_value> port <port_id>] 32371f2e9baSJasvinder Singh [balance offset <key_offset> mask <key_mask> port <port_id0> ... <port_id15>] 32471f2e9baSJasvinder Singh 32571f2e9baSJasvinder Singh Create action profile for the pipeline table :: 32671f2e9baSJasvinder Singh 32771f2e9baSJasvinder Singh table action profile <profile_name> 32871f2e9baSJasvinder Singh ipv4 | ipv6 32971f2e9baSJasvinder Singh offset <ip_offset> 33071f2e9baSJasvinder Singh fwd 33171f2e9baSJasvinder Singh [balance offset <key_offset> mask <key_mask> outoffset <out_offset>] 33271f2e9baSJasvinder Singh [meter srtcm | trtcm 33371f2e9baSJasvinder Singh tc <n_tc> 33471f2e9baSJasvinder Singh stats none | pkts | bytes | both] 33571f2e9baSJasvinder Singh [tm spp <n_subports_per_port> pps <n_pipes_per_subport>] 33671f2e9baSJasvinder Singh [encap ether | vlan | qinq | mpls | pppoe] 33771f2e9baSJasvinder Singh [nat src | dst 33871f2e9baSJasvinder Singh proto udp | tcp] 33971f2e9baSJasvinder Singh [ttl drop | fwd 34071f2e9baSJasvinder Singh stats none | pkts] 34171f2e9baSJasvinder Singh [stats pkts | bytes | both] 342*1edccebcSFan Zhang [sym_crypto cryptodev <cryptodev_name> 343*1edccebcSFan Zhang mempool_create <mempool_name> mempool_init <mempool_name>] 34471f2e9baSJasvinder Singh [time] 34571f2e9baSJasvinder Singh 34671f2e9baSJasvinder Singh 34771f2e9baSJasvinder SinghPipeline 34871f2e9baSJasvinder Singh~~~~~~~~ 34971f2e9baSJasvinder Singh 35071f2e9baSJasvinder SinghCreate pipeline :: 35171f2e9baSJasvinder Singh 35271f2e9baSJasvinder Singh pipeline <pipeline_name> 35371f2e9baSJasvinder Singh period <timer_period_ms> 35471f2e9baSJasvinder Singh offset_port_id <offset_port_id> 35571f2e9baSJasvinder Singh cpu <cpu_id> 35671f2e9baSJasvinder Singh 35771f2e9baSJasvinder SinghCreate pipeline input port :: 35871f2e9baSJasvinder Singh 35971f2e9baSJasvinder Singh pipeline <pipeline_name> port in 36071f2e9baSJasvinder Singh bsz <burst_size> 36171f2e9baSJasvinder Singh link <link_name> rxq <queue_id> 36271f2e9baSJasvinder Singh | swq <swq_name> 36371f2e9baSJasvinder Singh | tmgr <tmgr_name> 36471f2e9baSJasvinder Singh | tap <tap_name> mempool <mempool_name> mtu <mtu> 36571f2e9baSJasvinder Singh | kni <kni_name> 36671f2e9baSJasvinder Singh | source mempool <mempool_name> file <file_name> bpp <n_bytes_per_pkt> 36771f2e9baSJasvinder Singh [action <port_in_action_profile_name>] 36871f2e9baSJasvinder Singh [disabled] 36971f2e9baSJasvinder Singh 37071f2e9baSJasvinder SinghCreate pipeline output port :: 37171f2e9baSJasvinder Singh 37271f2e9baSJasvinder Singh pipeline <pipeline_name> port out 37371f2e9baSJasvinder Singh bsz <burst_size> 37471f2e9baSJasvinder Singh link <link_name> txq <txq_id> 37571f2e9baSJasvinder Singh | swq <swq_name> 37671f2e9baSJasvinder Singh | tmgr <tmgr_name> 37771f2e9baSJasvinder Singh | tap <tap_name> 37871f2e9baSJasvinder Singh | kni <kni_name> 37971f2e9baSJasvinder Singh | sink [file <file_name> pkts <max_n_pkts>] 38071f2e9baSJasvinder Singh 38171f2e9baSJasvinder SinghCreate pipeline table :: 38271f2e9baSJasvinder Singh 38371f2e9baSJasvinder Singh pipeline <pipeline_name> table 38471f2e9baSJasvinder Singh match 38571f2e9baSJasvinder Singh acl 38671f2e9baSJasvinder Singh ipv4 | ipv6 38771f2e9baSJasvinder Singh offset <ip_header_offset> 38871f2e9baSJasvinder Singh size <n_rules> 38971f2e9baSJasvinder Singh | array 39071f2e9baSJasvinder Singh offset <key_offset> 39171f2e9baSJasvinder Singh size <n_keys> 39271f2e9baSJasvinder Singh | hash 39371f2e9baSJasvinder Singh ext | lru 39471f2e9baSJasvinder Singh key <key_size> 39571f2e9baSJasvinder Singh mask <key_mask> 39671f2e9baSJasvinder Singh offset <key_offset> 39771f2e9baSJasvinder Singh buckets <n_buckets> 39871f2e9baSJasvinder Singh size <n_keys> 39971f2e9baSJasvinder Singh | lpm 40071f2e9baSJasvinder Singh ipv4 | ipv6 40171f2e9baSJasvinder Singh offset <ip_header_offset> 40271f2e9baSJasvinder Singh size <n_rules> 40371f2e9baSJasvinder Singh | stub 40471f2e9baSJasvinder Singh [action <table_action_profile_name>] 40571f2e9baSJasvinder Singh 40671f2e9baSJasvinder SinghConnect pipeline input port to table :: 40771f2e9baSJasvinder Singh 40871f2e9baSJasvinder Singh pipeline <pipeline_name> port in <port_id> table <table_id> 40971f2e9baSJasvinder Singh 41071f2e9baSJasvinder SinghDisplay statistics for specific pipeline input port, output port 41171f2e9baSJasvinder Singhor table :: 41271f2e9baSJasvinder Singh 41371f2e9baSJasvinder Singh pipeline <pipeline_name> port in <port_id> stats read [clear] 41471f2e9baSJasvinder Singh pipeline <pipeline_name> port out <port_id> stats read [clear] 41571f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> stats read [clear] 41671f2e9baSJasvinder Singh 41771f2e9baSJasvinder SinghEnable given input port for specific pipeline instance :: 41871f2e9baSJasvinder Singh 41971f2e9baSJasvinder Singh pipeline <pipeline_name> port out <port_id> disable 42071f2e9baSJasvinder Singh 42171f2e9baSJasvinder SinghDisable given input port for specific pipeline instance :: 42271f2e9baSJasvinder Singh 42371f2e9baSJasvinder Singh pipeline <pipeline_name> port out <port_id> disable 42471f2e9baSJasvinder Singh 42571f2e9baSJasvinder SinghAdd default rule to table for specific pipeline instance :: 42671f2e9baSJasvinder Singh 42771f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> rule add 42871f2e9baSJasvinder Singh match 42971f2e9baSJasvinder Singh default 43071f2e9baSJasvinder Singh action 43171f2e9baSJasvinder Singh fwd 43271f2e9baSJasvinder Singh drop 43371f2e9baSJasvinder Singh | port <port_id> 43471f2e9baSJasvinder Singh | meta 43571f2e9baSJasvinder Singh | table <table_id> 43671f2e9baSJasvinder Singh 43771f2e9baSJasvinder SinghAdd rule to table for specific pipeline instance :: 43871f2e9baSJasvinder Singh 43971f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> rule add 44071f2e9baSJasvinder Singh 44171f2e9baSJasvinder Singh match 44271f2e9baSJasvinder Singh acl 44371f2e9baSJasvinder Singh priority <priority> 44471f2e9baSJasvinder Singh ipv4 | ipv6 <sa> <sa_depth> <da> <da_depth> 44571f2e9baSJasvinder Singh <sp0> <sp1> <dp0> <dp1> <proto> 44671f2e9baSJasvinder Singh | array <pos> 44771f2e9baSJasvinder Singh | hash 44871f2e9baSJasvinder Singh raw <key> 44971f2e9baSJasvinder Singh | ipv4_5tuple <sa> <da> <sp> <dp> <proto> 45071f2e9baSJasvinder Singh | ipv6_5tuple <sa> <da> <sp> <dp> <proto> 45171f2e9baSJasvinder Singh | ipv4_addr <addr> 45271f2e9baSJasvinder Singh | ipv6_addr <addr> 45371f2e9baSJasvinder Singh | qinq <svlan> <cvlan> 45471f2e9baSJasvinder Singh | lpm 45571f2e9baSJasvinder Singh ipv4 | ipv6 <addr> <depth> 45671f2e9baSJasvinder Singh 45771f2e9baSJasvinder Singh action 45871f2e9baSJasvinder Singh fwd 45971f2e9baSJasvinder Singh drop 46071f2e9baSJasvinder Singh | port <port_id> 46171f2e9baSJasvinder Singh | meta 46271f2e9baSJasvinder Singh | table <table_id> 46371f2e9baSJasvinder Singh [balance <out0> ... <out7>] 46471f2e9baSJasvinder Singh [meter 46571f2e9baSJasvinder Singh tc0 meter <meter_profile_id> policer g <pa> y <pa> r <pa> 46671f2e9baSJasvinder Singh [tc1 meter <meter_profile_id> policer g <pa> y <pa> r <pa> 46771f2e9baSJasvinder Singh tc2 meter <meter_profile_id> policer g <pa> y <pa> r <pa> 46871f2e9baSJasvinder Singh tc3 meter <meter_profile_id> policer g <pa> y <pa> r <pa>]] 46971f2e9baSJasvinder Singh [tm subport <subport_id> pipe <pipe_id>] 47071f2e9baSJasvinder Singh [encap 47171f2e9baSJasvinder Singh ether <da> <sa> 47271f2e9baSJasvinder Singh | vlan <da> <sa> <pcp> <dei> <vid> 47371f2e9baSJasvinder Singh | qinq <da> <sa> <pcp> <dei> <vid> <pcp> <dei> <vid> 47471f2e9baSJasvinder Singh | mpls unicast | multicast 47571f2e9baSJasvinder Singh <da> <sa> 47671f2e9baSJasvinder Singh label0 <label> <tc> <ttl> 47771f2e9baSJasvinder Singh [label1 <label> <tc> <ttl> 47871f2e9baSJasvinder Singh [label2 <label> <tc> <ttl> 47971f2e9baSJasvinder Singh [label3 <label> <tc> <ttl>]]] 48071f2e9baSJasvinder Singh | pppoe <da> <sa> <session_id>] 48171f2e9baSJasvinder Singh [nat ipv4 | ipv6 <addr> <port>] 48271f2e9baSJasvinder Singh [ttl dec | keep] 48371f2e9baSJasvinder Singh [stats] 48471f2e9baSJasvinder Singh [time] 485*1edccebcSFan Zhang [sym_crypto 486*1edccebcSFan Zhang encrypt | decrypt 487*1edccebcSFan Zhang type 488*1edccebcSFan Zhang | cipher 489*1edccebcSFan Zhang cipher_algo <algo> cipher_key <key> cipher_iv <iv> 490*1edccebcSFan Zhang | cipher_auth 491*1edccebcSFan Zhang cipher_algo <algo> cipher_key <key> cipher_iv <iv> 492*1edccebcSFan Zhang auth_algo <algo> auth_key <key> digest_size <size> 493*1edccebcSFan Zhang | aead 494*1edccebcSFan Zhang aead_algo <algo> aead_key <key> aead_iv <iv> aead_aad <aad> 495*1edccebcSFan Zhang digest_size <size> 496*1edccebcSFan Zhang data_offset <data_offset>] 49771f2e9baSJasvinder Singh 49871f2e9baSJasvinder Singh where: 49971f2e9baSJasvinder Singh <pa> ::= g | y | r | drop 50071f2e9baSJasvinder Singh 50171f2e9baSJasvinder SinghAdd bulk rules to table for specific pipeline instance :: 50271f2e9baSJasvinder Singh 50371f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> rule add bulk <file_name> <n_rules> 50471f2e9baSJasvinder Singh 50571f2e9baSJasvinder Singh Where: 50671f2e9baSJasvinder Singh - file_name = path to file 50771f2e9baSJasvinder Singh - File line format = match <match> action <action> 50871f2e9baSJasvinder Singh 50971f2e9baSJasvinder SinghDelete table rule for specific pipeline instance :: 51071f2e9baSJasvinder Singh 51171f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> rule delete 51271f2e9baSJasvinder Singh match <match> 51371f2e9baSJasvinder Singh 51471f2e9baSJasvinder SinghDelete default table rule for specific pipeline instance :: 51571f2e9baSJasvinder Singh 51671f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> rule delete 51771f2e9baSJasvinder Singh match 51871f2e9baSJasvinder Singh default 51971f2e9baSJasvinder Singh 52071f2e9baSJasvinder SinghAdd meter profile to the table for specific pipeline instance :: 52171f2e9baSJasvinder Singh 52271f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> meter profile <meter_profile_id> 52371f2e9baSJasvinder Singh add srtcm cir <cir> cbs <cbs> ebs <ebs> 52471f2e9baSJasvinder Singh | trtcm cir <cir> pir <pir> cbs <cbs> pbs <pbs> 52571f2e9baSJasvinder Singh 52671f2e9baSJasvinder SinghDelete meter profile from the table for specific pipeline instance :: 52771f2e9baSJasvinder Singh 52871f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> 52971f2e9baSJasvinder Singh meter profile <meter_profile_id> delete 53071f2e9baSJasvinder Singh 53171f2e9baSJasvinder Singh 53271f2e9baSJasvinder SinghUpdate the dscp table for meter or traffic manager action for specific 53371f2e9baSJasvinder Singhpipeline instance :: 53471f2e9baSJasvinder Singh 53571f2e9baSJasvinder Singh pipeline <pipeline_name> table <table_id> dscp <file_name> 53671f2e9baSJasvinder Singh 53771f2e9baSJasvinder Singh Where: 53871f2e9baSJasvinder Singh - file_name = path to file 53971f2e9baSJasvinder Singh - exactly 64 lines 54071f2e9baSJasvinder Singh - File line format = <tc_id> <tc_queue_id> <color>, with <color> as: g | y | r 54171f2e9baSJasvinder Singh 54271f2e9baSJasvinder Singh 54371f2e9baSJasvinder SinghPipeline enable/disable 54471f2e9baSJasvinder Singh~~~~~~~~~~~~~~~~~~~~~~~ 54571f2e9baSJasvinder Singh 54671f2e9baSJasvinder Singh Enable given pipeline instance for specific data plane thread :: 54771f2e9baSJasvinder Singh 54871f2e9baSJasvinder Singh thread <thread_id> pipeline <pipeline_name> enable 54971f2e9baSJasvinder Singh 55071f2e9baSJasvinder Singh 55171f2e9baSJasvinder Singh Disable given pipeline instance for specific data plane thread :: 55271f2e9baSJasvinder Singh 55371f2e9baSJasvinder Singh thread <thread_id> pipeline <pipeline_name> disable 554