The explanation given by Intel for the example of Exception Path sample application in the sample document is quite clear, but it is still a bit unfamiliar to me as a person who has just had a knowledge of the catenary.
Reference their legend: Data Flow Flow graph
Process Analysis:
Thread CoreA0 reads data from Port0 and writes to TapA0;
Thread CoreB1 reads data from TapB1 and writes to Port1;
This is where we need to create a bridge br0 to connect tapA0 and tapB1 so that they can send data directly based on the link-layer mac.
One, the corresponding Intel DPDK example has been created according to the core ID tap_dpdk_nn #nn就是core ID
Ifconfig tap_dpdk_00 up
ifconfig tap_dpdk_03 up
Second, create the bridge and join Tap
Brctl ADDBR "Br0"
Brctl addif br0 tap_dpdk_00
Brctl addif br0 tap_dpdk_03
Ifconfig br0 up
Third, send the command production to see the data Packet transceiver:
sudo killall-usr1 exception_path
In another terminal that runs the program, you can see:
======= ====== ============ ============ ===============
Lcore Port RX TX Dropped on TX
------- ------ ------------ ------------ ---------------
0 0 14) 14 0
1 1 0) 0 0
2 0 0) 0 0
3 1 16) 16 0
======= ====== ============ ============ ===============
If you can get here, it means that you have succeeded.
But I did not succeed for a while, the reason is simple: No firewall is turned off (Fedora is turned on by default, and there is a strong firewall)
Four, close the firewall:
1, close the enhanced version of the firewall SELinux:
Open File sudo vi/etc/selinux/config
Put selinux=enforcing
Change into selinux=disabled
Save.
2. Close Firewall iptables:
sudo service iptables stop
sudo service iptables disable #不知道这两个哪个有用
To view the firewall status:
[email protected] ~]$ sudo service iptables status
Redirecting To/bin/systemctl status Iptables.service
Iptables.service-ipv4 Firewall with Iptables
loaded:loaded (/lib/systemd/system/iptables.service; disabled)
Active:inactive (Dead)
Cgroup:name=systemd:/system/iptables.service
3, the last need to restart the server.
Five, pull it:
Intel documentation should say the name of the external network cable should be how to connect the deployment, how to package, how to pass the packet to port0 and so on.
I got a transmitter, and I plugged the cable directly into the port0. Beginners do not know this.
Manage tap ports and join the bridge----------Intel DPDK Example: Exception Path sample Application