Socket application program interface (api) for efficient data transactions
US-2015381710-A1 · Dec 31, 2015 · US
US2016337482A1 · US · A1
| Field | Value |
|---|---|
| Publication number | US-2016337482-A1 |
| Application number | US-201615222741-A |
| Country | US |
| Kind code | A1 |
| Filing date | Jul 28, 2016 |
| Priority date | Jan 29, 2014 |
| Publication date | Nov 17, 2016 |
| Grant date | — |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A method and an apparatus for processing a data packet based on parallel protocol stack instances and the method includes determining a distribution policy of a data packet according to distribution policy information of a network adapter, determining a first protocol stack instance according to the distribution policy of the data packet, and creating a target socket in the first protocol stack instance such that when the data packet is distributed to the first protocol stack instance, the first protocol stack instance performs protocol processing on the data packet using the target socket. Hence, a case in which a protocol stack instance that is specified for the target socket by an application conflicts with a protocol stack instance specified by a network adapter is avoided, and a technical problem that protocol processing cannot be performed on the data packet is resolved.
Opening claim text (preview).
What is claimed is: 1 . A method for processing a data packet based on parallel protocol stack instances, comprising: obtaining distribution policy information of a network adapter; determining a distribution policy of the data packet according to the distribution policy information; obtaining an instruction of an application to create a target socket; determining a first protocol stack instance according to the distribution policy of the data packet; creating the target socket in the first protocol stack instance; and performing, by the first protocol stack instance, protocol processing on the data packet using the target socket. 2 . The method according to claim 1 , wherein the distribution policy information comprises a distribution policy of the network adapter. 3 . The method according to claim 2 , wherein the distribution policy information further comprises at least one of the following information: hardware configuration information; and software configuration information, wherein determining the distribution policy of the data packet according to the distribution policy information comprises adjusting the distribution policy of the network adapter according to the hardware configuration information and the software configuration information, to determine the distribution policy of the data packet, and wherein the method further comprises writing the distribution policy of the data packet into the network adapter such that the network adapter distributes the data packet to the first protocol stack instance according to the distribution policy of the data packet. 4 . The method according to claim 2 , wherein the distribution policy information further comprises at least one of the following information: hardware configuration information; and software configuration information, wherein determining the distribution policy of the data packet according to the distribution policy information comprises adjusting the distribution policy of the network adapter according to the hardware configuration information to determine the distribution policy of the data packet, and wherein the method further comprises writing the distribution policy of the data packet into the network adapter such that the network adapter distributes the data packet to the first protocol stack instance according to the distribution policy of the data packet. 5 . The method according to claim 2 , wherein the distribution policy information further comprises at least one of the following information: hardware configuration information; and software configuration information, wherein determining the distribution policy of the data packet according to the distribution policy information comprises adjusting the distribution policy of the network adapter according to the software configuration information to determine the distribution policy of the data packet, and wherein the method further comprises writing the distribution policy of the data packet into the network adapter such that the network adapter distributes the data packet to the first protocol stack instance according to the distribution policy of the data packet. 6 . The method according to claim 1 , wherein before determining the first protocol stack instance according to the distribution policy of the data packet, the method further comprises identifying, a manner that is indicated by the application and that is used when the target socket is created is a manner of calling a connect function. 7 . The method according to claim 1 , wherein before determining the first protocol stack instance according to the distribution policy of the data packet, the method further comprises: identifying, a manner that is indicated by the application and that is used when the target socket is created, is a manner of calling a bind function and/or a manner of calling a listen function; and creating the target socket in all protocol stack instances comprised in the parallel protocol stack instances, wherein determining the first protocol stack instance according to the distribution policy of the data packet, and creating the target socket in the first protocol stack instance comprises: obtaining, by means of listening, a transmission control protocol (TCP) connection establishment success indication sent by a protocol stack instance in the protocol stack instances in which the target socket has been created; determining the first protocol stack instance according to the distribution policy of the data packet; and creating the target socket in the first protocol stack instance. 8 . The method according to claim 7 , wherein before obtaining the TCP connection establishment success indication, the method further comprises performing, by the protocol stack instance that receives a data packet of a TCP type, the protocol processing on the data packet of the TCP type when the data packet of the TCP type is received and when the TCP connection establishment success indication is not obtained by means of listening. 9 . The method according to claim 7 , wherein after creating the target sockets in all protocol stack instances comprised in the parallel protocol stack instances, the method further comprises performing, by the protocol stack instance that receives a data packet of a user datagram protocol (UDP) type, the protocol processing on the data packet of the UDP type when the data packet of the UDP type is received. 10 . The method according to claim 1 , wherein after the instruction of the application to create the target socket is obtained by means of listening, the method further comprises sending, to the application, a pseudo result that the target socket has been created. 11 . An apparatus for processing a data packet based on parallel protocol stack instances, comprising: a memory configured to store a program; a communications interface coupled to the memory and configured to obtain distribution policy information of a network adapter; and a processor coupled to the memory and configured to execute the program stored in the memory to: obtain an instruction of an application to create a target socket; determine a distribution policy of the data packet according to the distribution policy information; determine a first protocol stack instance according to the distribution policy of the data packet; create a target socket in the first protocol stack instance; and perform, by the first protocol stack instance, protocol processing on the data packet using the target socket. 12 . The apparatus according to claim 11 , wherein the distribution policy information comprises a distribution policy of the network adapter. 13 . The apparatus according to claim 12 , wherein the distribution policy information further comprises at least one of hardware configuration information and software configuration information, wherein the processor is further configured to adjust the distribution policy of the network adapter according to the hardware configuration information and the software configuration information to determine the distribution policy of the data packet, and wherein the communications interface is further configured to write the distribution policy of the data packet into the network adapter such that the network adapter distributes the data packet to the first protocol stack instance according to the distribution policy of the data packet. 14 . The apparatus according to claim 12 , wherein the distribution policy information further comprises at least one of hardware configuration information and software configuration information, wherein the processor is furt
involving adaptations of sockets based mechanisms (secure socket layer H04L63/168) · CPC title
in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46) · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.