Method and apparatus for processing data packet based on parallel protocol stack instances

US10069947B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10069947-B2
Application numberUS-201615222753-A
CountryUS
Kind codeB2
Filing dateJul 28, 2016
Priority dateJan 29, 2014
Publication dateSep 4, 2018
Grant dateSep 4, 2018

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method and an apparatus for processing a data packet based on parallel protocol stack instances, where lower-layer protocol processing is performed, using a first protocol stack instance. An associated second protocol stack instance is determined using a target socket after the target socket that is needed to perform upper-layer protocol processing on the data packet is determined, and the upper-layer protocol processing is performed, using the target socket and the second protocol stack instance. The second protocol stack instance that performs the upper-layer protocol processing is determined using the target socket, and hence, a technical problem that protocol processing cannot be performed on a data packet because a protocol stack instance specified by an application (APP) conflicts with a protocol stack instance specified by a network adapter is resolved.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for processing a data packet based on parallel protocol stack instances, comprising: performing, using a first protocol stack instance, lower-layer protocol processing on the data packet that is distributed by a network adapter to the first protocol stack instance; determining a target socket that is needed to perform upper-layer protocol processing on the data packet; determining, according to the target socket, a second protocol stack instance that is associated with the target socket; and performing, using the target socket and the second protocol stack instance, the upper-layer protocol processing on the data packet, wherein the lower-layer protocol processing and the upper-layer protocol processing jointly accomplish complete protocol processing on the data packet. 2. The method according to claim 1 , wherein determining the second protocol stack instance comprises determining, according to an affinity that is in an affinity graph and that is between the target socket and each protocol stack instance comprised in the parallel protocol stack instances, the second protocol stack instance that is associated with the target socket, wherein the affinity between the target socket and each protocol stack instance is used to indicate a quantity of data packets, on which the upper-layer protocol processing needs to be performed using the target socket, in data packets already distributed by the network adapter to each protocol stack instance. 3. The method according to claim 2 , wherein before determining the second protocol stack instance, the method further comprises updating, according to another quantity of data packets on which the lower-layer protocol processing has been performed, a first affinity that is recorded in the affinity graph and that is between the target socket and the first protocol stack instance. 4. The method according to claim 3 , wherein after updating the first affinity that is recorded in the affinity graph and that is between the target socket and the first protocol stack instance, the method further comprises determining whether n×A is greater than B, wherein A is the first affinity between the target socket and the first protocol stack instance, wherein B is a second affinity that is recorded in the affinity graph and that is between the target socket and an associated protocol stack instance, wherein n is a preset coefficient, and wherein determining the second protocol stack instance that is associated with the target socket comprises: determining that the protocol stack instance that is recorded in the affinity graph and that is associated with the target socket is used as the second protocol stack instance that is associated with the target socket when n×A is not greater than B; determining the first protocol stack instance as the second protocol stack instance that is associated with the target socket when n×A is greater than B; and updating the protocol stack instance that is recorded in the affinity graph and that is associated with the target socket to the first protocol stack instance when n×A is greater than B. 5. The method according to claim 1 , wherein performing the upper-layer protocol processing on the data packet comprises: adding, to a lower-layer data receiving queue of the target socket, the data packet on which the lower-layer protocol processing has been performed; and performing the upper-layer protocol processing on the data packet in the lower-layer data receiving queue using the second protocol stack instance when the target socket is obtained by means of polling according to a protocol stack instance association linked list that corresponds to the second protocol stack instance, wherein the protocol stack instance association linked list that corresponds to the second protocol stack instance is used to indicate a socket that is associated with the second protocol stack instance. 6. The method according to claim 1 , further comprising: receiving a first data packet sent by an application (APP); determining the target socket that is needed to perform protocol processing on the first data packet; determining the second protocol stack instance that is associated with the target socket; and performing the protocol processing on the first data packet using the target socket and the second protocol stack instance. 7. A method for processing a data packet based on parallel protocol stack instances, comprising: receiving a first data packet sent by an application (APP); determining a target socket that is needed to perform protocol processing on the first data packet; determining, according to an association between the target socket and a second protocol stack instance, the second protocol stack instance that is associated with the target socket; and performing the protocol processing on the first data packet using the target socket and the second protocol stack instance, wherein the association between the target socket and the second protocol stack instance is determined when a first protocol stack instance and the second protocol stack instance perform the protocol processing on a second data packet, wherein the first protocol stack instance performs lower-layer protocol processing on the second data packet, wherein the second protocol stack instance performs upper-layer protocol processing on the second data packet, and wherein the lower-layer protocol processing and the upper-layer protocol processing jointly accomplish complete protocol processing on the second data packet. 8. The method according to claim 7 , wherein performing the protocol processing on the first data packet using the target socket and the second protocol stack instance comprises: adding the first data packet to an APP data sending queue of the target socket; and performing the lower-layer protocol processing and the upper-layer protocol processing on the first data packet in the APP data sending queue separately using the target socket and the second protocol stack instance when the APP data sending queue of the target socket is obtained by means of polling according to a protocol stack instance association linked list that corresponds to the second protocol stack instance, wherein the protocol stack instance association linked list that corresponds to the second protocol stack instance is used to indicate a socket that is associated with the second protocol stack instance. 9. The method according to claim 7 , wherein determining the second protocol stack instance that is associated with the target socket comprises: determining, according to an affinity graph, whether a protocol stack instance associated with the target socket exists, wherein the affinity graph is used to record the protocol stack instance associated with the target socket; and determining the protocol stack instance associated with the target socket as the second protocol stack instance when the protocol stack instance associated with the target socket exists. 10. The method according to claim 9 , further comprising: adding a control message to a receiving queue of a parent protocol stack instance of the target socket when the protocol stack instance associated with the target socket does not exist, wherein the parent protocol stack instance of the target socket is the protocol stack instance used to create the target socket, and wherein the control message is used to instruct to perform the protocol processing on the first data packet; parsing the control message to obtain the first data packet when the control message in the receiving queue of the parent protocol stack instance is obtained by means of polling; performing the protocol processing on the first data packet using t

Assignees

Inventors

Classifications

  • Definitions, standards or architectural aspects of layered protocol stacks · CPC title

  • H04L69/162Primary

    involving adaptations of sockets based mechanisms (secure socket layer H04L63/168) · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10069947B2 cover?
A method and an apparatus for processing a data packet based on parallel protocol stack instances, where lower-layer protocol processing is performed, using a first protocol stack instance. An associated second protocol stack instance is determined using a target socket after the target socket that is needed to perform upper-layer protocol processing on the data packet is determined, and the up…
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification H04L69/162. Mapped technology areas include Electricity.
When was this patent published?
Publication date Tue Sep 04 2018 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).