Tilera netlib application layer protocol stack-IP layer Implementation Method

Source: Internet
Author: User

The IP layer of Netlib implements the main functions of the traditional network protocol stack: Receiving and forwarding of IP datagram. Receiving means reporting the IP data of the local machine as the destination address to the transport layer for processing. Forwarding means forwarding the IP data of the non-local destination address based on the system route information. The process flow chart for implementing the netlib IP layer is as follows:

The Netlib IPv4 processing module provides the following functions:

● IPV4 packet receiving and processing, validity check, routing, and transmission layer reporting

● IPv4 route table query engine and maintenance process

● IPv4 neighbor information (ARP) query engine and maintenance information

The architecture of the Netlib IPv4 processing module:

● The IPv4 module maintains routing and neighbor information in the user space. The route table and the neighbor information table are both global and shareable data structures, so that both the data plane and the space plane can have access permissions.

● The control plane shares kernel routing and neighbor Information Based on netlink. The control plane adds and deletes route table items and neighbor information.

● The data plane only queries the route table and neighbor information table, and does not need to be locked during the Query Process.

Delete A route table and a neighbor information table item:

The deletion mechanism of Route tables and neighbor information table items is similar to the flow entry deletion mechanism of flow table. The deletion process is divided into two steps: delete A Table item from the corresponding table and release the physical memory space occupied by the table item.

The specific deletion steps are as follows:

● The control plane removes the table item pointer to be deleted from the corresponding table.

● Gc (garbage collector) releases the memory space occupied by table items. In order to safely release the memory, gc needs to wait for all tasks that access the table item (bound to a specific tile) to complete the access before it can be safely released.

Route table query mechanism:

The route table includes two types: Hash table and Trie table. The Hash table stores the route completion information. The Trie table is used to query route information on the data plane. The Query Process of the route table and the neighbor table does not require any "Lock" mechanism.

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.