Imported Upstream version 16.04
[deb_dpdk.git] / examples / ip_pipeline / config / edge_router_upstream.cfg
1 ;   BSD LICENSE
2 ;
3 ;   Copyright(c) 2015 Intel Corporation. All rights reserved.
4 ;   All rights reserved.
5 ;
6 ;   Redistribution and use in source and binary forms, with or without
7 ;   modification, are permitted provided that the following conditions
8 ;   are met:
9 ;
10 ;     * Redistributions of source code must retain the above copyright
11 ;       notice, this list of conditions and the following disclaimer.
12 ;     * Redistributions in binary form must reproduce the above copyright
13 ;       notice, this list of conditions and the following disclaimer in
14 ;       the documentation and/or other materials provided with the
15 ;       distribution.
16 ;     * Neither the name of Intel Corporation nor the names of its
17 ;       contributors may be used to endorse or promote products derived
18 ;       from this software without specific prior written permission.
19 ;
20 ;   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ;   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 ;   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 ;   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 ;   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 ;   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 ;   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 ;   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 ;   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 ;   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 ;   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 ;   An edge router typically sits between two networks such as the provider
33 ;   core network and the provider access network. A typical packet processing
34 ;   pipeline for the upstream traffic (i.e. traffic from access to core
35 ;   network) contains the following functional blocks: Packet RX & Firewall,
36 ;   Flow classification, Metering, Routing and Packet TX. The input packets
37 ;   are assumed to be Q-in-Q IPv4, while the output packets are MPLS IPv4
38 ;  (with variable number of labels per route).
39
40 ;   A simple implementation for this functional pipeline is presented below.
41
42 ;             Packet Rx &       Pass-Through    Flow-Classification   Flow-Actions         Routing
43 :              Firewall
44 ;             __________  SWQ0   __________  SWQ4   __________  SWQ8   __________  SWQ12  __________
45 ; RXQ0.0 --->|          |------>|          |------>|          |------>|          |------>|          |------> TXQ0.0
46 ;            |          | SWQ1  |          | SWQ5  |          | SWQ9  |          | SWQ13 |          |
47 ; RXQ1.0 --->|          |------>|          |------>|          |------>|          |------>|          |------> TXQ1.0
48 ;            |   (P1)   | SWQ2  |  (P2)    | SWQ6  |   (P3)   | SWQ10 |   (P4)   | SWQ14 |   (P5)   |
49 ; RXQ2.0 --->|          |------>|          |------>|          |------>|          |------>|          |------> TXQ2.0
50 ;            |          | SWQ3  |          | SWQ7  |          | SWQ11 |          | SWQ15 |          |
51 ; RXQ3.0 --->|          |------>|          |------>|          |------>|          |------>|          |------> TXQ3.0
52 ;            |__________|       |__________|       |__________|       |__________|       |__________|
53 ;                 |                                     |                                     |
54 ;                 +--> SINK0 (Default)                  +--> SINK1 (Default)                  +--> SINK2 (Route Miss)
55
56
57 [PIPELINE0]
58 type = MASTER
59 core = 0
60
61 [PIPELINE1]
62 type = FIREWALL
63 core = 1
64 pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
65 pktq_out = SWQ0 SWQ1 SWQ2 SWQ3 SINK0
66 n_rules = 4096
67 pkt_type = qinq_ipv4
68
69 [PIPELINE2]
70 type = PASS-THROUGH
71 core = 2
72 pktq_in = SWQ0 SWQ1 SWQ2 SWQ3
73 pktq_out = SWQ4 SWQ5 SWQ6 SWQ7
74 dma_size = 8
75 dma_dst_offset = 128; mbuf (128)
76 dma_src_offset = 268; mbuf (128) + headroom (128) + 1st ethertype offset (12) = 268
77 dma_src_mask = 00000FFF00000FFF; qinq
78 dma_hash_offset = 136; dma_dst_offset + dma_size = 136
79
80 [PIPELINE3]
81 type = FLOW_CLASSIFICATION
82 core = 2
83 pktq_in = SWQ4 SWQ5 SWQ6 SWQ7
84 pktq_out = SWQ8 SWQ9 SWQ10 SWQ11 SINK1
85 n_flows = 65536
86 key_size = 8; dma_size
87 key_offset = 128; dma_dst_offset
88 hash_offset = 136; dma_hash_offset
89 flowid_offset = 192; mbuf (128) + 64
90
91 [PIPELINE4]
92 type = FLOW_ACTIONS
93 core = 3
94 pktq_in = SWQ8 SWQ9 SWQ10 SWQ11
95 pktq_out = SWQ12 SWQ13 SWQ14 SWQ15
96 n_flows = 65536
97 n_meters_per_flow = 1
98 flow_id_offset = 192; flowid_offset
99 ip_hdr_offset = 278; mbuf (128) + headroom (128) + ethernet (14) + qinq (8) = 278
100 color_offset = 196; flowid_offset + sizeof(flow_id)
101
102 [PIPELINE5]
103 type = ROUTING
104 core = 4
105 pktq_in = SWQ12 SWQ13 SWQ14 SWQ15
106 pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0 SINK2
107 encap = ethernet_mpls
108 mpls_color_mark = yes
109 ip_hdr_offset = 278; mbuf (128) + headroom (128) + ethernet (14) + qinq (8) = 278
110 color_offset = 196; flowid_offset + sizeof(flow_id)