New upstream version 18.08
[deb_dpdk.git] / examples / ip_pipeline / examples / kni.cli
1 ; SPDX-License-Identifier: BSD-3-Clause
2 ; Copyright(c) 2010-2018 Intel Corporation
3
4 ;                 _______________          ______________________
5 ;                |               |  KNI0  |                      |
6 ; LINK0 RXQ0 --->|...............|------->|--+                   |
7 ;                |               |  KNI1  |  | br0               |
8 ; LINK1 TXQ0 <---|...............|<-------|<-+                   |
9 ;                |               |        |     Linux Kernel     |
10 ;                |   PIPELINE0   |        |     Network Stack    |
11 ;                |               |  KNI1  |                      |
12 ; LINK1 RXQ0 --->|...............|------->|--+                   |
13 ;                |               |  KNI0  |  | br0               |
14 ; LINK0 TXQ0 <---|...............|<-------|<-+                   |
15 ;                |_______________|        |______________________|
16 ;
17 ; Insert Linux kernel KNI module:
18 ;    [Linux]$ insmod rte_kni.ko
19 ;
20 ; Configure Linux kernel bridge between KNI0 and KNI1 interfaces:
21 ;    [Linux]$ brctl addbr br0
22 ;    [Linux]$ brctl addif br0 KNI0
23 ;    [Linux]$ brctl addif br0 KNI1
24 ;    [Linux]$ ifconfig br0 up
25 ;    [Linux]$ ifconfig KNI0 up
26 ;    [Linux]$ ifconfig KNI1 up
27 ;
28 ; Monitor packet forwarding performed by Linux kernel between KNI0 and KNI1:
29 ;    [Linux]$ tcpdump -i KNI0
30 ;    [Linux]$ tcpdump -i KNI1
31
32 mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
33
34 link LINK0 dev 0000:02:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
35 link LINK1 dev 0000:02:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
36
37 kni KNI0 link LINK0 mempool MEMPOOL0
38 kni KNI1 link LINK1 mempool MEMPOOL0
39
40 table action profile AP0 ipv4 offset 270 fwd
41
42 pipeline PIPELINE0 period 10 offset_port_id 0 cpu 0
43
44 pipeline PIPELINE0 port in bsz 32 link LINK0 rxq 0
45 pipeline PIPELINE0 port in bsz 32 kni KNI1
46 pipeline PIPELINE0 port in bsz 32 link LINK1 rxq 0
47 pipeline PIPELINE0 port in bsz 32 kni KNI0
48
49 pipeline PIPELINE0 port out bsz 32 kni KNI0
50 pipeline PIPELINE0 port out bsz 32 link LINK1 txq 0
51 pipeline PIPELINE0 port out bsz 32 kni KNI1
52 pipeline PIPELINE0 port out bsz 32 link LINK0 txq 0
53
54 pipeline PIPELINE0 table match stub action AP0
55 pipeline PIPELINE0 table match stub action AP0
56 pipeline PIPELINE0 table match stub action AP0
57 pipeline PIPELINE0 table match stub action AP0
58
59 pipeline PIPELINE0 port in 0 table 0
60 pipeline PIPELINE0 port in 1 table 1
61 pipeline PIPELINE0 port in 2 table 2
62 pipeline PIPELINE0 port in 3 table 3
63
64 thread 1 pipeline PIPELINE0 enable
65
66 pipeline PIPELINE0 table 0 rule add match default action fwd port 0
67 pipeline PIPELINE0 table 1 rule add match default action fwd port 1
68 pipeline PIPELINE0 table 2 rule add match default action fwd port 2
69 pipeline PIPELINE0 table 3 rule add match default action fwd port 3