Table of Contents
1. Multi-queue network card hardware implementation
2. What is RSS
3. Configure RSS in DPDK
Home Backend Development XML/RSS Tutorial Detailed introduction of network card multi-queue technology and RSS function

Detailed introduction of network card multi-queue technology and RSS function

Apr 25, 2017 am 09:23 AM

Multi-queue network card is a technology. It was originally used to solve the problem of network IO QoS (quality of service). Later, as the bandwidth of network IO continued to increase, a single-core CPU could not fully meet the needs of the network card. Through Support for multi-queue network card drivers binds each queue to different cores through interrupts to meet the needs of the network card.

Common ones include Intel's 82575, 82576, Boardcom's 57711, etc. The following takes the Intel 82575 network card that is commonly used by the company's servers as an example to analyze the hardware implementation of the multi-queue network card and the support of the Linux kernel software. .

1. Multi-queue network card hardware implementation

Figure 1.1 is the Intel 82575 hardware logic diagram, with four hardware queues. When a packet is received, a flow is always received in the same queue by hashing the SIP, Sport, DIP, and Dport quadruples in the packet header. At the same time, the interrupt bound to the queue is triggered.

Figure 1.1 82575 hardware logic diagram

2. What is RSS

RSS (Receive Side Scaling) is a method that can Network card driver technology that enables efficient distribution of received messages among multiple CPUs under the processor system.

  • The network card parses the received message and obtains the IP address, protocol and port quintuple information

  • The network card passes the configured HASH The function calculates the HASH value based on the five-tuple information, and can also calculate the HASH value based on the two, three, or four-tuple information.

  • Take the lower digits of the HASH value (the specific network card may be different) as the index of RETA (redirection table)

  • According to the storage in RETA The value is distributed to the corresponding CPU

The following figure describes the complete processing flow:

Programs based on RSS technology can distribute data between multiple CPUs through hardware flow, and dynamic load balancing can be achieved by modifying RETA.

3. Configure RSS in DPDK

DPDK supports setting static hash values ​​and configuring RETA. However, RSS in DPDK is based on ports, and packets are distributed according to the port's receiving queue. For example, if we configure 3 receive queues (0,1,2) on a port and enable RSS, then it will look like this:

{0,1,2,0,1,2,0 .........}

Applications running on different CPUs receive messages from different receive queues, thus achieving the effect of message distribution.

Enable the RSS function in DPDK by setting the mq_mode field in rte_eth_conf, rx_mode.mq_mode = ETH_MQ_RX_RSS.

When the RSS function is turned on, the hash value calculated by RSS will be stored in the rte_pktmbuf corresponding to the message, which can be accessed through pktmbuf.hash.rss. This value can be used directly in subsequent packet processing without recalculating the hash value, such as fast forwarding, identifying packet flows, etc.

RETA is configurable at runtime, so that the application can dynamically change the receiving queue corresponding to the CPU, thereby dynamically adjusting message distribution. Specifically configured through the driver of the PMD module, such as ixgbe_dev_rss_reta_update and ixgbe_dev_rss_reta_query.

The above is the detailed content of Detailed introduction of network card multi-queue technology and RSS function. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use PHP and XML to implement RSS subscription management and display on the website How to use PHP and XML to implement RSS subscription management and display on the website Jul 29, 2023 am 10:09 AM

How to use PHP and XML to implement RSS subscription management and display on a website. RSS (Really Simple Syndication) is a standard format for publishing frequently updated blog posts, news, audio and video content. Many websites provide RSS subscription functions, allowing users to easily obtain the latest information. In this article, we will learn how to use PHP and XML to implement the RSS subscription management and display functions of the website. First, we need to create an RSS subscription to XM

PHP application: Get rss subscription content through function PHP application: Get rss subscription content through function Jun 20, 2023 pm 06:25 PM

With the rapid development of the Internet, more and more websites have begun to provide RSS subscription services, allowing users to easily obtain updated content from the website. As a popular server-side scripting language, PHP has many functions for processing RSS subscriptions, allowing developers to easily extract the required data from RSS sources. This article will introduce how to use PHP functions to obtain RSS subscription content. 1. What is RSS? The full name of RSS is "ReallySimpleSyndication" (abbreviated

How to write a simple RSS subscriber via PHP How to write a simple RSS subscriber via PHP Sep 25, 2023 pm 07:05 PM

How to write a simple RSS subscriber through PHP RSS (ReallySimpleSyndication) is a format used to subscribe to website content. Through the subscriber, you can get the latest articles, news, blogs and other updates. In this article, we will write a simple RSS subscriber using PHP to demonstrate how to obtain and display the content of an RSS feed. Confirm environment and preparation Before starting, make sure you have a PHP environment and have the SimpleXML extension installed.

How to use PHP to implement RSS subscription function How to use PHP to implement RSS subscription function Sep 05, 2023 pm 04:43 PM

How to use PHP to implement RSS subscription function RSS (ReallySimpleSyndication) is a format used to publish and subscribe to website updated content. Using RSS, users can easily obtain the latest information from websites that interest them without having to visit the website regularly. In this article, we will learn how to implement RSS subscription functionality using PHP. First, we need to understand the basic structure of RSS. A typical RSS document consists of one or more items

XML/RSS Data Integration: Practical Guide for Developers & Architects XML/RSS Data Integration: Practical Guide for Developers & Architects Apr 02, 2025 pm 02:12 PM

XML/RSS data integration can be achieved by parsing and generating XML/RSS files. 1) Use Python's xml.etree.ElementTree or feedparser library to parse XML/RSS files and extract data. 2) Use ElementTree to generate XML/RSS files and gradually add nodes and data.

Advanced XML/RSS Tutorial: Ace Your Next Technical Interview Advanced XML/RSS Tutorial: Ace Your Next Technical Interview Apr 06, 2025 am 12:12 AM

XML is a markup language for data storage and exchange, and RSS is an XML-based format for publishing updated content. 1. XML defines data structures, suitable for data exchange and storage. 2.RSS is used for content subscription and uses special libraries when parsing. 3. When parsing XML, you can use DOM or SAX. When generating XML and RSS, elements and attributes must be set correctly.

Crawl RSS feeds from other websites using PHP Crawl RSS feeds from other websites using PHP Jun 13, 2023 pm 02:55 PM

As Internet content continues to enrich and diversify, more and more people are beginning to use RSS technology to subscribe to blogs, news and other content they are interested in, so that they will no longer miss any important information. As one of the commonly used programming languages ​​in web development, PHP also provides some powerful functions and tools to help us crawl RSS subscriptions from other websites and display them on our own website. This article will introduce how to use PHP to crawl RSS subscriptions of other websites and parse them into arrays or objects.

Implement RSS subscription function using PHP and XML Implement RSS subscription function using PHP and XML Aug 09, 2023 pm 08:13 PM

Using PHP and XML to implement RSS subscription function RSS (ReallySimpleSyndication) is a standard format for publishing and subscribing to website updates. It is based on XML and gets the latest content through the subscriber's RSS reader. In this article, we will introduce how to use PHP and XML to implement a simple RSS subscription function. Create an XML file First, we need to create an XML file to store the content we want to publish. Suppose we want to publish a text

See all articles