Manage tap ports and join the bridge----------Intel DPDK Example: Exception Path sample Application

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.