New upstream version 18.11-rc1
[deb_dpdk.git] / examples / ip_pipeline / examples / flow_crypto.cli
1 ; SPDX-License-Identifier: BSD-3-Clause
2 ; Copyright(c) 2018 Intel Corporation
3
4 ;                 ________________
5 ; LINK0 RXQ0 --->|                |---> CRYPTO0 TXQ0
6 ;                |      Flow      |
7 ; CRYPTO0 RXQ0-->| Classification |---> LINK0 TXQ0
8 ;                |________________|
9 ;                        |
10 ;                        +-----------> SINK0 (flow lookup miss)
11 ;
12 ; Input packet: Ethernet/IPv4
13 ;
14 ; Packet buffer layout:
15 ; #   Field Name       Offset (Bytes)   Size (Bytes)
16 ; 0   Mbuf             0                128
17 ; 1   Headroom         128              128
18 ; 2   Ethernet header  256              14
19 ; 3   IPv4 header      280              20
20 ; 4   Packet           256              1536
21 ; 5   Crypto Operation 1792             160
22
23 mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 1
24 mempool MEMPOOL_SESSION0 buffer 1024 pool 1024 cache 128 cpu 1
25
26 link LINK0 dev 0000:81:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
27
28 #Cryptodev
29 cryptodev CRYPTO0 dev crypto_aesni_gcm0 queue 1 1024
30
31 table action profile AP0 ipv4 offset 270 fwd sym_crypto dev CRYPTO0 offset 1792 mempool_create MEMPOOL_SESSION0 mempool_init MEMPOOL_SESSION0
32 table action profile AP1 ipv4 offset 270 fwd
33
34 pipeline PIPELINE0 period 10 offset_port_id 0 cpu 1
35
36 pipeline PIPELINE0 port in bsz 32 link LINK0 rxq 0
37 pipeline PIPELINE0 port in bsz 32 cryptodev CRYPTO0 rxq 0
38
39 pipeline PIPELINE0 port out bsz 32 cryptodev CRYPTO0 txq 0 offset 1792
40 pipeline PIPELINE0 port out bsz 32 link LINK0 txq 0
41 pipeline PIPELINE0 port out bsz 32 sink
42
43 pipeline PIPELINE0 table match hash ext key 8 mask FFFFFFFF00000000 offset 282 buckets 1K size 4K action AP0
44 pipeline PIPELINE0 table match stub action AP1
45
46 pipeline PIPELINE0 port in 0 table 0
47 pipeline PIPELINE0 port in 1 table 1
48
49 thread 24 pipeline PIPELINE0 enable
50
51 pipeline PIPELINE0 table 0 rule add match default action fwd port 2
52
53 #AES-GCM encrypt
54 pipeline PIPELINE0 table 0 rule add match hash ipv4_addr 100.0.0.10 action fwd port 0 sym_crypto encrypt type aead aead_algo aes-gcm aead_key 000102030405060708090a0b0c0d0e0f aead_iv 000102030405060708090a0b aead_aad 000102030405060708090a0b0c0d0e0f digest_size 8 data_offset 290
55 #AES-GCM decrypt
56 #pipeline PIPELINE0 table 0 rule add match hash ipv4_addr 100.0.0.10 action fwd port 0 sym_crypto decrypt type aead aead_algo aes-gcm aead_key 000102030405060708090a0b0c0d0e0f aead_iv 000102030405060708090a0b aead_aad 000102030405060708090a0b0c0d0e0f digest_size 8 data_offset 290
57
58 pipeline PIPELINE0 table 1 rule add match default action fwd port 1