xref: /dpdk/app/graph/examples/l3fwd.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 0xff 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 0002:02:00.0 rxq 1 txq 8 mempool0
20ethdev 0002:03:00.0 rxq 1 txq 8 mempool0
21ethdev 0002:02:00.0 mtu 1700
22ethdev 0002:03:00.0 mtu 1700
23ethdev 0002:02:00.0 promiscuous on
24ethdev 0002:03:00.0 promiscuous on
25
26;
27; IPv4 addresses assigned to DPDK devices
28;
29ethdev 0002:02:00.0 ip4 addr add 10.0.2.1 netmask 255.255.255.0
30ethdev 0002:03:00.0 ip4 addr add 20.0.2.1 netmask 255.255.255.0
31
32;
33; IPv6 addresses assigned to DPDK devices
34;
35ethdev 0002:02:00.0 ip6 addr add 5220:DA4F:6870:5220:DA4F:6870:5220:DA4A netmask FFFF:FFFF:FFFF:FFFF:FF00:0000:0000:0000
36ethdev 0002:03:00.0 ip6 addr add 6220:DA4F:6870:5220:DA4F:6870:5220:DA4B netmask FFFF:FFFF:FFFF:FFFF:FF00:0000:0000:0000
37
38;
39; IPv4 routes which are installed to ipv4_lookup node for LPM processing
40;
41ipv4_lookup route add ipv4 10.0.2.0 netmask 255.255.255.0 via 10.0.2.1
42ipv4_lookup route add ipv4 20.0.2.0 netmask 255.255.255.0 via 20.0.2.1
43
44;
45; IPv6 routes which are installed to ipv6_lookup node for LPM processing
46;
47ipv6_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
48ipv6_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
49
50;
51; Peer MAC and IPv4 address mapping
52;
53neigh add ipv4 10.0.2.2 52:20:DA:4F:68:70
54neigh add ipv4 20.0.2.2 62:20:DA:4F:68:70
55
56;
57; Peer MAC and IPv6 address mapping
58;
59neigh add ipv6 5220:DA4F:6870:5220:DA4F:6870:5220:DA4A 52:20:DA:4F:68:70
60neigh add ipv6 6220:DA4F:6870:5220:DA4F:6870:5220:DA4B 62:20:DA:4F:68:70
61
62;
63; Port-Queue-Core mapping for ethdev_rx node
64;
65ethdev_rx map port 0002:02:00.0 queue 0 core 1
66ethdev_rx map port 0002:03:00.0 queue 0 core 2
67
68;
69; Graph start command to create graph.
70;
71; Note: No more command should come after this.
72;
73graph start
74