xref: /dpdk/app/graph/examples/l3fwd_pcap.cli (revision 0f32dac4bbf74761972249090523f4581ca13126)
1; SPDX-License-Identifier: BSD-3-Clause
2; Copyright(c) 2023 Marvell.
3
4;
5; Graph configuration for given usecase
6;
7graph l3fwd coremask 0x03 bsz 32 tmo 10 model default pcap_enable 1 num_pcap_pkts 100000 pcap_file /tmp/output.pcap
8
9;
10; Mempools to be attached with ethdev
11;
12mempool mempool0 size 8192 buffers 4000 cache 256 numa 0
13
14;
15; DPDK devices and configuration.
16;
17; Note: Customize the parameters below to match your setup.
18;
19ethdev net_pcap0 rxq 1 txq 1 mempool0
20ethdev net_pcap1 rxq 1 txq 1 mempool0
21ethdev net_pcap0 promiscuous on
22ethdev net_pcap1 promiscuous on
23
24;
25; IPv4 addresses assigned to DPDK devices
26;
27ethdev net_pcap0 ip4 addr add 10.0.2.1 netmask 255.255.255.0
28ethdev net_pcap1 ip4 addr add 20.0.2.1 netmask 255.255.255.0
29
30;
31; IPv6 addresses assigned to DPDK devices
32;
33ethdev net_pcap0 ip6 addr add 5220:DA4F:6870:5220:DA4F:6870:5220:DA4A netmask FFFF:FFFF:FFFF:FFFF:FF00:0000:0000:0000
34ethdev net_pcap1 ip6 addr add 6220:DA4F:6870:5220:DA4F:6870:5220:DA4B netmask FFFF:FFFF:FFFF:FFFF:FF00:0000:0000:0000
35
36;
37; IPv4 routes which are installed to ipv4_lookup node for LPM processing
38;
39ipv4_lookup route add ipv4 10.0.2.0 netmask 255.255.255.0 via 10.0.2.1
40ipv4_lookup route add ipv4 20.0.2.0 netmask 255.255.255.0 via 20.0.2.1
41
42;
43; IPv6 routes which are installed to ipv6_lookup node for LPM processing
44;
45ipv6_lookup route add ipv6 5220:DA4F:6870:5220:DA4F:6870:5220:DA4A netmask FFFF:FFFF:FFFF:FFFF:FF00:0000:0000:0000 via 5220:DA4F:6870:5220:DA4F:6870:5220:DA4A
46ipv6_lookup route add ipv6 6220:DA4F:6870:5220:DA4F:6870:5220:DA4B netmask FFFF:FFFF:FFFF:FFFF:FF00:0000:0000:0000 via 6220:DA4F:6870:5220:DA4F:6870:5220:DA4B
47
48;
49; Peer MAC and IPv4 address mapping
50;
51neigh add ipv4 10.0.2.2 52:20:DA:4F:68:70
52neigh add ipv4 20.0.2.2 62:20:DA:4F:68:70
53
54;
55; Peer MAC and IPv6 address mapping
56;
57neigh add ipv6 5220:DA4F:6870:5220:DA4F:6870:5220:DA4A 52:20:DA:4F:68:70
58neigh add ipv6 6220:DA4F:6870:5220:DA4F:6870:5220:DA4B 62:20:DA:4F:68:70
59
60;
61; Port-Queue-Core mapping for ethdev_rx node
62;
63ethdev_rx map port net_pcap0 queue 0 core 1
64ethdev_rx map port net_pcap1 queue 0 core 1
65
66;
67; Graph start command to create graph.
68;
69; Note: No more command should come after this.
70;
71graph start
72