# US 2022/0286532 A1 · Method and apparatus for obtaining shared maximum segment size mss

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0286532 A1
- Document ID: US20220286532A1
- Status: Published application
- Kind: A1
- Application number: 17/751,961
- Filed: 2022-05-24
- Published: 2022-09-08
- Earliest claimed: 2019-11-26
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Liang MA; Wenhui LI; Wei YI
- Web page: https://patentgrep.com/patent/US20220286532A1

## CPC

- H04L 69/16: Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L 47/18: {End to end}
- H04L 47/193: at the transport layer, e.g. TCP related
- H04L 47/36: by determining packet size, e.g. maximum transfer unit [MTU]
- H04L 49/90: Buffering arrangements
- H04L 47/30: in combination with information about buffer occupancy at either end or at transit nodes
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

This application discloses a method and an apparatus for obtaining a shared maximum segment size MSS, and a storage medium, and belongs to the field of communications technologies. In this application, a first device may obtain a first parameter after a Transmission Control Protocol TCP connection is established, obtain a first MSS based on the first parameter, and further obtain a first shared MSS based on the first MSS and a second MSS. After the TCP connection is established, when a parameter of the TCP connection changes, the first device updates a shared MSS based on a changed parameter, and may use an updated shared MSS to transmit a packet. This helps save network resources and improve transmission reliability.

## Claims

### Claim 1

A method for obtaining a shared maximum segment size (MSS), comprising:
obtaining, by a first device, a first parameter after establishing a Transmission Control Protocol (TCP) connection, wherein the first parameter corresponds to the TCP connection;
obtaining, by the first device, a first MSS based on the first parameter; and
obtaining, by the first device, a first shared MSS based on the first MSS and a second MSS sent by a second device.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the first parameter comprises a maximum transmission unit (MTU) corresponding to an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining, by the first device, the first MSS based on a second parameter and the MTU corresponding to the interface, wherein the second parameter is a length of a buffer obtained when the TCP connection is established, and wherein the first MSS is a minimum value of the second parameter and a data length corresponding to the MTU.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the first parameter comprises an MTU corresponding to an interface and a length of a buffer, the interface is an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining, by the first device, the first MSS based on the MTU corresponding to the interface and the length of the buffer, wherein the first MSS is a minimum value of the length of the buffer and a data length corresponding to the MTU.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the first parameter comprises a first identifier used to identify an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining, by the first device, the first MSS based on a third parameter and an MTU corresponding to the interface identified by the first identifier, wherein the third parameter is a length of a buffer obtained when the TCP connection is established, and the first MSS is a minimum value of the third parameter and a data length corresponding to the MTU.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the first parameter comprises a length of a buffer, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining, by the first device, the first MSS based on a fourth parameter and the length of the buffer, wherein the fourth parameter is an MTU of an interface obtained when the TCP connection is established, wherein the interface is corresponding to the TCP connection, and wherein the first MSS is a minimum value of the fourth parameter and the length of the buffer.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the first parameter comprises a first identifier and a length of a buffer, the first identifier is used to identify an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining, by the first device, the first MSS based on the length of the buffer and an MTU corresponding to the interface identified by the first identifier, wherein the first MSS is a minimum value of the length of the buffer and a data length corresponding to the MTU.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
obtaining, by the first device, an update packet based on the first MSS, wherein the update packet comprises the first MSS; and
sending, by the first device, the update packet to the second device.

### Claim 8 (depends on 7)

The method according to claim 7, further comprising:
receiving, by the first device, an MTU of a third device sent by the third device on a path on which the first device and the second device are located, and the MTU of the third device is an MTU of an interface on the third device corresponding to the TCP connection;
obtaining, by the first device, a third MSS based on the MTU of the third device; and
obtaining, by the first device, a second shared MSS based on the third MSS and the first shared MSS, wherein the second shared MSS is a minimum value of the third MSS and the first shared MSS.

### Claim 9

An apparatus for obtaining a shared maximum segment size (MSS), used in a first device, wherein the apparatus comprises:
a memory storing instructions; and
a processor coupled to the memory to execute the instructions to:
obtain a first parameter after establishing a Transmission Control Protocol (TCP) connection, wherein the first parameter corresponds to the TCP connection;
obtain a first MSS based on the first parameter; and
obtain a first shared MSS based on the first MSS and a second MSS sent by a second device.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the first parameter comprises a maximum transmission unit (MTU) corresponding to an interface corresponding to the TCP connection, and the processor coupled to the memory to execute the instructions to:
obtain the first MSS based on a second parameter and the MTU corresponding to the interface, wherein the second parameter is a length of a buffer obtained when the TCP connection is established, and wherein the first MSS is a minimum value of the second parameter and a data length corresponding to the MTU.

### Claim 11 (depends on 9)

The apparatus according to claim 9, wherein the first parameter comprises an MTU corresponding to an interface and a length of a buffer, the interface corresponding to the TCP connection, and the processor coupled to the memory to execute the instructions to:
obtain the first MSS based on the MTU corresponding to the interface and the length of the buffer, wherein the first MSS is a minimum value of the length of the buffer and a data length corresponding to the MTU.

### Claim 12 (depends on 9)

The apparatus according to claim 9, wherein the first parameter comprises a first identifier used to identify an interface corresponding to the TCP connection, and wherein the processor coupled to the memory to execute the instructions to:
obtain the first MSS based on a third parameter and an MTU corresponding to the interface identified by the first identifier, wherein the third parameter is a length of a buffer obtained when the TCP connection is established, and the first MSS is a minimum value of the third parameter and a data length corresponding to the MTU.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein the first parameter comprises a length of a buffer, and the processor coupled to the memory to execute the instructions to:
obtain the first MSS based on a fourth parameter and the length of the buffer, wherein the fourth parameter is an MTU of an interface obtained when the TCP connection is established, wherein the interface is corresponding to the TCP connection, and wherein the first MSS is a minimum value of the fourth parameter and the length of the buffer.

### Claim 14 (depends on 9)

The apparatus according to claim 9, wherein the first parameter comprises a first identifier and a length of a buffer, the first identifier is used to identify an interface corresponding to the TCP connection, and the processor coupled to the memory to execute the instructions to:
obtain the first MSS based on the length of the buffer and an MTU corresponding to the interface identified by the first identifier, wherein the first MSS is a minimum value of the length of the buffer and a data length corresponding to the MTU.

### Claim 15 (depends on 9)

The apparatus according to claim 9, wherein the processor coupled to the memory to further execute the instructions to:
obtain an update packet based on the first MSS, wherein the update packet comprises the first MSS; and
send the update packet to the second device.

### Claim 16 (depends on 15)

The apparatus according to claim 15, wherein the processor coupled to the memory to execute the instructions to:
receive an MTU of a third device sent by the third device on a path on which the first device and the second device are located, and the MTU of the third device is an MTU of an interface on the third device corresponding to the TCP connection; and
obtain a third MSS based on the MTU of the third device, and obtain a second shared MSS based on the third MSS and the first shared MSS, wherein the second shared MSS is a minimum value of the third MSS and the first shared MSS.

### Claim 17

A non-transitory machine-readable storage medium having instructions stored therein, which when executed by a processor, cause the processor to perform operations, the operations comprising:
obtaining a first parameter after establishing a Transmission Control Protocol (TCP) connection, wherein the first parameter corresponds to the TCP connection;
obtaining a first maximum segment size (MSS) based on the first parameter; and
obtaining a first shared MSS based on the first MSS and a second MSS sent by a second device.

### Claim 18 (depends on 17)

The non-transitory machine-readable storage medium of claim 17, wherein the first parameter comprises a maximum transmission unit (MTU) corresponding to an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining the first MSS based on a second parameter and the MTU corresponding to the interface, wherein the second parameter is a length of a buffer obtained when the TCP connection is established, and wherein the first MSS is a minimum value of the second parameter and a data length corresponding to the MTU.

### Claim 19 (depends on 17)

The non-transitory machine-readable storage medium of claim 17 wherein the first parameter comprises an MTU corresponding to an interface and a length of a buffer, the interface is an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining the first MSS based on the MTU corresponding to the interface and the length of the buffer, wherein the first MSS is a minimum value of the length of the buffer and a data length corresponding to the MTU.

### Claim 20 (depends on 17)

The non-transitory machine-readable storage medium of claim 17, wherein the first parameter comprises a first identifier used to identify an interface corresponding to the TCP connection, and wherein the obtaining the first MSS based on the first parameter comprises:
obtaining the first MSS based on a third parameter and an MTU corresponding to the interface identified by the first identifier, wherein the third parameter is a length of a buffer obtained when the TCP connection is established, and the first MSS is a minimum value of the third parameter and a data length corresponding to the MTU.
