DATA TRANSMISSION METHOD AND RELATED APPARATUS
20230262680 · 2023-08-17
Inventors
Cpc classification
H04L1/00
ELECTRICITY
H04L25/14
ELECTRICITY
H04W72/1263
ELECTRICITY
H04J3/0602
ELECTRICITY
International classification
H04W72/1263
ELECTRICITY
Abstract
An embodiment of this application provides a data transmission method. The method includes: A first communication apparatus sends an i.sup.th AM group to a second communication apparatus, and sends first data of a plurality of service flows to the second communication apparatus based on a mapping relationship. The first data is carried in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, the mapping relationship is a mapping relationship between a slot of a first calendar and the plurality of service flows, and the first calendar includes s slots. The M time units between the i.sup.th AM group and the (i+1).sup.th AM group include N first counting periods, each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar.
Claims
1. A data transmission method comprising: sending, by a first communication apparatus, an i.sup.th alignment marker (AM) group to a second communication apparatus, wherein the i.sup.th AM group is used to align a plurality of logical lanes, and i is an integer greater than or equal to 1; sending, by the first communication apparatus, first data of a plurality of service flows to the second communication apparatus based on a mapping relationship by using the plurality of logical lanes, wherein the first data is carried in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, and M is an integer greater than or equal to 2, wherein the mapping relationship is a mapping relationship between a slot of a first calendar and the plurality of service flows, wherein the first calendar comprises s slots, and s is an integer greater than or equal to 2; and the M time units between the i.sup.th AM group and the (i+1).sup.th AM group comprise N first counting periods, each of the first counting periods comprise s time units, each time unit of a corresponding first counting period corresponds to one slot of the first calendar, different time units of a same first counting period correspond to different slots of the first calendar, and N is an integer greater than or equal to 1; and sending, by the first communication apparatus, the (i+1).sup.th AM group to the second communication apparatus, wherein a transmission time interval between sending the i.sup.th AM group by the first communication apparatus and sending the (i+1).sup.th AM group by the first communication apparatus is the M time units.
2. The method according to claim 1, wherein the M time units between the i.sup.th AM group and the (i+1).sup.th AM group further comprise at least one second counting period, the second counting period comprises a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
3. The method according to claim 2, wherein the at least one second counting period comprises one second counting period; and wherein a first time unit within the second counting period is continuous with a last time unit within a last counting period in the N first counting periods, and a last time unit within the second counting period is continuous with a first time unit of the (i+1).sup.th AM group; or a first time unit within the second counting period is continuous with a last time unit within the i.sup.th AM group, and a last time unit within the second counting period is continuous with a first time unit of a first counting period in the N first counting periods.
4. The method according to claim 3, wherein in response to a remainder obtained by dividing M by s being r, the second counting period comprises r time units, and r is an integer greater than or equal to 1 and less than s.
5. The method according to claim 2, wherein the at least one second counting period comprises two second counting period; a first time unit within a first second counting period in the two second counting periods is continuous with a last time unit comprised in the i.sup.th AM group, and a last time unit comprised in the first second counting period is continuous with a first time unit of a first counting period in the N first counting periods; and a first time unit within a second second counting period in the two second counting periods is continuous with a last time unit comprised in a last counting period in the N first counting periods, and a last time unit comprised in the second second counting period is continuous with a first time unit of the (i+1).sup.th AM group.
6. The method according to claim 5, wherein in response to a remainder obtained by dividing M by s being r, the two second counting periods comprise r time units, and r is an integer greater than or equal to 1 and less than s.
7. The method according to claim 1 wherein each slot comprised in the first calendar corresponds to a part of the plurality of logical lanes.
8. The method according to claim 7, wherein in response to a quantity of slots within the first calendar being equal to a quantity of logical lanes comprised in the plurality of logical lanes, the slots comprised in the first calendar one-to-one correspond to the logical lanes comprised in the plurality of logical lanes.
9. The method according to claim 7, wherein in response to a quantity of logical lanes within the plurality of logical lanes being equal to K multiplied by a quantity of slots comprised in the first calendar, and K being an integer greater than or equal to 2, each slot of the first calendar corresponds to K logical lanes in the plurality of logical lanes, and the K logical lanes corresponding to different slots of the first calendar are different.
10. The method according to claim 7, wherein in response to a quantity of slots within the first calendar being equal to K multiplied by a quantity of logical lanes within the plurality of logical lanes, and K being an integer greater than or equal to 2, each of the plurality of logical lanes corresponds to K slots of the first calendar, and the K slots corresponding to different logical lanes are different.
11. The method according to claim 1, wherein the method further comprises: generating the i.sup.th AM group based on the mapping relationship, wherein the i.sup.th AM group indicates service flows separately corresponding to the slots of the first calendar.
12. The method according to claim 11, wherein a first AM in the i.sup.th AM group is used to identify a slot, of the first calendar, that corresponds to a first time unit of a first counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
13. A data transmission method comprising: Receiving, by a second communication apparatus, an i.sup.th alignment marker LAM) group sent by a first communication apparatus, wherein the i.sup.th AM group is used to align a plurality of logical lanes, and i is an integer greater than or equal to 1; receiving, by the second communication apparatus in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, first data that is of a plurality of service flows and that is sent by the first communication apparatus by using the plurality of logical lanes, wherein M is an integer greater than or equal to 2; determining, by the second communication apparatus, service flows corresponding to data separately carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, wherein there is a mapping relationship between the plurality of service flows and a slot of a first calendar, wherein the first calendar comprises s slots, and s is an integer greater than or equal to 2; and the M time units between the i.sup.th AM group and the (i+1).sup.th AM group comprise N first counting periods, the first counting period comprises s time units, each time unit of the first counting period corresponds to one slot of the first calendar, different time units of a same first counting period correspond to different slots of the first calendar, and N is an integer greater than or equal to 1; and receiving, by the second communication apparatus, the (i+1).sup.th AM group sent by the first communication apparatus, wherein a reception time interval between receiving the i.sup.th AM group by the second communication apparatus and receiving the (i+1).sup.th AM group by the second communication apparatus is the M time units.
14. The method according to claim 13, wherein the M time units between the i.sup.th AM group and the (i+1).sup.th AM group further comprise at least one second counting period, the second counting period comprises a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
15. The method according to claim 14, wherein the at least one second counting period comprises one second counting period; and a first time unit within in the second counting period is continuous with a last time unit within a last counting period in the N first counting periods, and a last time unit within the second counting period is continuous with a first time unit of the (i+1).sup.th AM group; or a first time unit within the second counting period is continuous with a last time unit within the i.sup.th AM group, and a last time unit within the second counting period is continuous with a first time unit of a first counting period in the N first counting periods.
16. A first communication apparatus comprising: a transceiver, configured to send an i.sup.th alignment marker (AM) group to a second communication apparatus, wherein the i.sup.th AM group is used to align a plurality of logical lanes, wherein is an integer greater than or equal to 1; and send first data of a plurality of service flows to the second communication apparatus based on a mapping relationship by using the plurality of logical lanes, wherein the first data is carried in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, wherein M is an integer greater than or equal to 2, wherein the mapping relationship is a mapping relationship between a slot of a first calendar and the plurality of service flows, wherein the first calendar comprises s slots, and wherein s is an integer greater than or equal to 2; the M time units between the i.sup.th AM group and the (i+1).sup.th AM group comprise N first counting periods, the first counting period comprises s time units, each time unit of the first counting period corresponds to one slot of the first calendar, different time units of a same first counting period correspond to different slots of the first calendar, and N is an integer greater than or equal to 1; and the first communication apparatus sends the (i+1) AM group to the second communication apparatus, wherein a transmission time interval between sending the i.sup.th AM group by the first communication apparatus and sending the (i+1).sup.th AM group by the first communication apparatus is the M time units.
17. The first communication apparatus according to claim 16, wherein the M time units between the i.sup.th AM group and the (i+1).sup.th AM group further comprise at least one second counting period, the second counting period comprises a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
18. The first communication apparatus according to claim 17, wherein the at least one second counting period comprises one second counting period; and wherein a first time unit within the second counting period is continuous with a last time unit within a last counting period in the N first counting periods, and a last time unit comprised in the second counting period is continuous with a first time unit of the (i+1).sup.th AM group; or a first time unit within the second counting period is continuous with a last time unit within the i.sup.th AM group, and a last time unit within the second counting period is continuous with a first time unit of a 1.sup.st first counting period in the N first counting periods.
19. The first communication apparatus according to claim 18, wherein in response to a remainder obtained by dividing M by s being r, the second counting period comprises s-r time units, and wherein r is an integer greater than or equal to 1 and less than s.
20. The first communication apparatus according to claim 17, wherein the at least one second counting period comprises two second counting periods; and wherein a first time unit within a first second counting period in the two second counting periods is continuous with a last time unit within the i.sup.th AM group, and a last time unit within the first second counting period is continuous with a first time unit of a first counting period in the N first counting periods; and a first time unit comprised in a second second counting period in the two second counting periods is continuous with a last time unit within a last counting period in the N first counting periods, and a last time unit within the second second counting period is continuous with a first time unit of the (i+1).sup.th AM group.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0216]
[0217]
[0218]
[0219]
[0220]
[0221]
[0222]
[0223]
[0224]
[0225]
[0226]
[0227]
[0228]
[0229]
[0230]
[0231]
[0232]
[0233]
[0234]
[0235]
[0236]
[0237]
[0238]
[0239]
[0240]
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
DESCRIPTION OF EMBODIMENTS
[0248] Embodiments of this application provide a data transmission method and a related communication apparatus, to reduce a data transmission delay, and improve data transmission performance.
[0249] Development of a network imposes higher requirements on network traffic. For example, there are currently 100G (100,000 megabits per second), 200G (200,000 megabits per second), and 400G (400,000 megabits per second) Ethernet technologies. Development of the network imposes higher requirements on an Ethernet speed.
[0250] It may be understood that the first communication apparatus and the second communication apparatus may be a chip, a unit with receiving and sending functions, or a physical device. If the first communication apparatus sends data, the second communication apparatus receives the data. If the second communication apparatus sends data, the first communication apparatus receives the data. A transmission physical lane of the first communication apparatus one-to-one corresponds to a reception physical lane of the second communication apparatus. A transmission physical lane of the second communication apparatus one-to-one corresponds to a reception physical lane of the first communication apparatus. This embodiment of this application is described by using an example in which the first communication apparatus is a transmitting end device and the second communication apparatus is a receiving end device.
[0251] There is a mapping relationship between the physical lane and a logical lane in the first communication apparatus and the second communication apparatus. For example, one physical lane corresponds to one logical lane, one physical lane corresponds to two logical lanes, or one physical lane corresponds to four logical lanes. In other words, one physical lane may carry data of one or more logical lanes.
[0252] In addition, IEEE 802.3 defines different quantities of logical lanes for Ethernet technologies at different speeds. For example, a quantity of logical lanes in the 100G Ethernet technology is 4. For another example, a quantity of logical lanes in the 200G Ethernet technology is 8. For still another example, a quantity of logical lanes in the 400G Ethernet technology is 16.
[0253] In this embodiment of this application, quantities of logical lanes defined by Ethernet technologies at different speeds may be consistent with or different from quantities of logical lanes defined by IEEE 802.3 for Ethernet technologies at different speeds. For example, IEEE 802.3 defines 16 logical lanes for the 400G Ethernet technology, and each logical lane supports a 25G bandwidth. However, this application may define four logical lanes for the 400G Ethernet technology, and each logical lane supports a 100G bandwidth.
[0254] It should be noted that the logical lane may be a physical coding sublayer (PCS) lane or a forward error correction (FEC) lane. For example, for a 200G/400G Ethernet interface, a logical lane may be referred to as a PCS lane or an FEC lane. For another example, for a 100G Ethernet interface, a logical lane may be referred to as an FEC lane. Because the PCS lane and the FEC lane are usually distributed inside an implementation unit, and are usually referred to as logical lanes for distinguishing from a physical medium access (PMA) sublayer lane. In this application, the PCS lane and the FEC lane are also referred to as logical lanes.
[0255] When the first communication apparatus and the second communication apparatus transmit data by using a plurality of logical lanes, to ensure that the second communication apparatus can implement locking and alignment of the logical lanes, IEEE 802.3 further designs an alignment marker (AM) to identify each logical lane.
[0256] The AM has a specific format. The 200G/400G Ethernet technology is used as an example. An AM format is shown in
[0257] An AM format in another Ethernet technology at another speed is similar to or different from the AM format in the 200G Ethernet technology and the AM format in the 400G Ethernet technology. To avoid repetition, examples are not enumerated one by one herein.
[0258] The AM one-to-one corresponds to the logical lane. The 200G Ethernet technology is used as an example. The first communication apparatus and the second communication apparatus each include eight logical lanes, and an AM of each logical lane is shown in Table 1. In Table 1, one row represents an AM of one lane. The second communication apparatus may lock the logical lane in a plurality of manners. For example, in IEEE 802.3, the second communication apparatus receives an AM, and matches CM.sub.0 to CM.sub.5 in the AM with CM.sub.0 to CM.sub.5 in the AM in Table 1. CM.sub.0 to CM.sub.5 have 48 bits in total, and may be divided into 12 nibbles (a nibble is 4 consecutive binary bits). When a quantity of nibbles that are mismatched between CM.sub.0 to CM.sub.5 in the second communication apparatus and CM.sub.0 to CM in the AM in Table 1 is less than or equal to 3, the second communication apparatus may lock one logical lane. Then, the second communication apparatus identifies a lane number of the logical lane based on received UM.sub.0 to UM.sub.5.
TABLE-US-00001 TABLE 1 Logical {CM.sub.0, CM.sub.1, CM.sub.2, UP.sub.0, CM.sub.3, CM.sub.4, lane CM.sub.5, UP.sub.1, UM.sub.0, UM.sub.1, UM.sub.2, UP.sub.2, number UM.sub.3, UM.sub.4, UM.sub.5} 0 0 × 9A, 0 × 4A, 0 × 26, 0 × 05, 0 × 65, 0 × B5, 0 × D9, 0 × D6, 0 × B3, 0 × C0, 0 × 8C, 0 × 29, 0 × 4C, 0 × 3F, 0 × 73 1 0 × 9A, 0 × 4A, 0 × 26, 0 × 04, 0 × 65, 0 × B5, 0 × D9, 0 × 67, 0 × 5A, 0 × DE, 0 × 7E, 0 × 98, 0 × A5, 0 × 21, 0 × 81 2 0 × 9A, 0 × 4A, 0 × 26, 0 × 46, 0 × 65, 0 × B5, 0 × D9, 0 × FE, 0 × 3E, 0 × F3, 0 × 56, 0 × 01, 0 × C1, 0 × 0C, 0 × A9 3 0 × 9A, 0 × 4A, 0 × 26, 0 × 5A, 0 × 65, 0 × B5, 0 × D9, 0 × 84, 0 × 86, 0 × 80, 0 × D0, 0 × 7B, 0 × 79, 0 × 7F, 0 × 2F 4 0 × 9A, 0 × 4A, 0 × 26, 0 × E1, 0 × 65, 0 × B5, 0 × D9, 0 × 19, 0 × 2A, 0 × 51, 0 × F2, 0 × E6, 0 × D5, 0 × AE, 0 × 0D 5 0 × 9A, 0 × 4A, 0 × 26, 0 × F2, 0 × 65, 0 × B5, 0 × D9, 0 × 4E, 0 × 12, 0 × 4F, 0 × D1, 0 × B1, 0 × ED, 0 × B0, 0 × 2E 6 0 × 9A, 0 × 4A, 0 × 26, 0 × 3D, 0 × 65, 0 × B5, 0 × D9, 0 × EE, 0 × 42, 0 × 9C, 0 × A1, 0 × 11, 0 × BD, 0 × 63, 0 × 5E 7 0 × 9A, 0 × 4A, 0 × 26, 0 × 22, 0 × 5, 0 × B5, 0 × D9, 0 × 32, 0 × D6, 0 × 76, 0 × 5B, 0 × CD, 0 × 29, 0 × 89, 0 × A4
[0259] The AM format is an AM format defined by IEEE 802.3 for Ethernet technologies at different speeds.
[0260] If the logical lane in this embodiment of this application is a logical lane defined by IEEE 802.3 for Ethernet technologies at different speeds, a size and a format of an AM corresponding to each logical lane are the same as a size and a format of an AM defined in IEEE 802.3 described above.
[0261] If a quantity of logical lanes that is newly defined in this embodiment of this application for Ethernet technologies at different speeds is different from a quantity of logical lanes defined by IEEE 802.3 for Ethernet technologies at different speeds, a size and a format of an AM corresponding to each logical lane may be the same as or different from a size and a format of an AM defined in IEEE 802.3 described above.
[0262] For example, a quantity of logical lanes defined by IEEE 802.3 for the 400G Ethernet technology is 16, that is, each logical lane supports a 25G bandwidth, and a size of an AM corresponding to each logical lane is 120 bits, namely, a size and a format of the AM shown in
[0263] If a quantity of logical lanes that is newly defined in this embodiment of this application for the 400G Ethernet technology is 4, a size of an AM corresponding to each logical lane is 120 bits, that is, each logical lane supports a 100G bandwidth, namely, a size and a format of the AM shown in
[0264] If the 400G Ethernet technology supports only a logical lane with a 25G bandwidth, and a quantity of logical lanes defined for the 400G Ethernet technology in this application is 4, logical lanes in each newly defined 100G logical lane further need to be divided. In other words, four 25G logical lanes in the newly defined 100G logical lane may further be divided, to adapt to the 400G Ethernet technology. Therefore, a size of an AM corresponding to the newly defined 100G logical lane may be 4×120 bits, to facilitate alignment of four 25G logical lanes in the 100G logical lane that are subsequently further divided. Specifically, the format of the AM of the newly defined 100G logical lane needs to be configured based on a subsequent data distribution granularity and a distribution rule of the four 25G logical lanes, and the configured AM with 4×120 bits includes padding bits such as UP.sub.1 and UP.sub.2. Related functions of UP.sub.1 and UP.sub.2 are similar to functions of UP.sub.1 and UP.sub.2 in the AM shown in
[0265] The foregoing is described by using only the 400G Ethernet technology as an example. For example, 40G, 100G, and 200G Ethernet technologies are also similar. Details are not described herein again.
[0266] In this embodiment of this application, a quantity of AMs included in each AM group is equal to a quantity of logical lanes. Whether quantities of logical lanes of Ethernet technologies at different speeds are defined by IEEE 802.3, or defined in a new manner, a quantity of AMs included in each AM group is the same as a quantity of logical lanes. For a format and a size of an AM, refer to the foregoing related descriptions.
[0267] The following describes a data processing process between a first communication apparatus and a second communication apparatus with reference to
[0268] The 200G Ethernet technology is used as an example in
[0269] After the AM group is inserted, FEC coding is performed on a plurality of serial bit blocks of a second size to add check bits. Then, the bit blocks of a second size are distributed to several PCS lanes or FEC lanes based on a specific quantity of bits through distribution and interleaving, and each AM included in the AM group is distributed in a corresponding PCS lane or FEC lane. Bits in the PCS lane or FEC lane may be sent to the second communication apparatus by using a PMA lane. The physical lane may be a PMA lane.
[0270] The second communication apparatus receives, by using a PMD and the PMA lane, the bits sent by the first communication device, locks a lane based on an AM in each PCS lane or FEC lane, and reorders the lanes, to obtain a serial code block stream. Then, the second communication apparatus performs FEC decoding on the serial code block stream, to remove an AM group from the serial code block stream, and performs descrambling and reverse transcoding on the serial code block stream from which the AM group is removed, to obtain the serial code block stream of the bit block of a first size. The second communication apparatus performs decoding and rate matching on the serial code block stream of the bit block of a first size, and sends data to the RS sublayer and the MAC layer, and the data is transmitted to the data link layer by using the MAC layer.
[0271] It may be understood that, for different Ethernet technologies, the bit block of a first size is different from the bit block of a second size. For example, for the 200G/400G Ethernet technology, the bit block of a first size is 64B (bit)/66B, and the bit block of a second size is 256B/257B. The AM group includes four or eight 257B code blocks. For another example, for the 100G Ethernet technology, the bit block of a first size is 64B/66B, and the bit block of a second size is 256B/257B. The AM group includes five 257B code blocks.
[0272] It should be noted that, for ease of understanding,
[0273] The following describes in detail a data transmission process between a first communication apparatus and a second communication apparatus by using a plurality of lanes with reference to
[0274]
[0275] Similarly, the 200G Ethernet technology is used as an example to describe in detail the two distribution processes. As shown in
[0276] The encoding symbol is a data unit used by the first communication apparatus to distribute data. For example, in the 400G Ethernet technology defined by IEEE 802.3, the encoding symbol may be 10 bits, 12 bits, or the like. In addition, in this embodiment of this application, in the 200G and 400G Ethernet technologies, the encoding symbol may be 257 bits. For details, refer to related examples in
[0277] Therefore, to ensure that an AM corresponding to each logical lane appears completely on each logical lane in an expected mode, before the AM group is inserted into the serial data stream, the AM group needs to be constructed based on an AM format of the logical lane and a specific distribution rule, so that the second communication apparatus receives an AM in a correct format, to lock and align the logic lanes.
[0278] For example, if a quantity of logical lanes that is newly defined in this embodiment of this application for the 400G Ethernet technology is 4, a size of an AM corresponding to each logical lane is 120 bits, that is, each logical lane supports a 100G bandwidth, namely, a size and a format of the AM shown in
[0279] For example, if the 400G Ethernet technology supports only a logical lane with a 25G bandwidth, and a quantity of logical lanes defined for the 400G Ethernet technology in this application is 4, logical lanes in each newly defined 100G logical lane further need to be divided. In other words, four 25G logical lanes in the newly defined 100G logical lane may further be divided, to adapt to the 400G Ethernet technology. Therefore, a size of an AM corresponding to the newly defined 100G logical lane may be 4×120 bits, to facilitate alignment of four 25G logical lanes in the 100G logical lane that are subsequently further divided. If a distribution granularity of the four newly defined 100G logical lanes is a distribution granularity of 257 bits, the first communication apparatus may configure the 4×120-bit AM of each 100G logical lane as two 257-bit code blocks. For the four 100G logical lanes, one AM group includes eight 257-bit code blocks. Then, the first communication apparatus inserts the AM group (including eight 257-bit code blocks) into the serial data stream.
[0280]
[0281] In
[0282] Currently, in a FlexE technology, a FlexE Shim layer is inserted into a standard Ethernet architecture, to implement decoupling of a MAC sub-rate from an underlying PHY layer, so as to meet a requirement that a data transmission rate of an ingress port of a switch is consistent with a data transmission rate of an egress port of the switch. However, the FlexE Shim brings specific delay overheads for data transmission. Consequently, a data transmission delay is large, and data transmission performance is affected.
[0283] This application provides a data transmission method. A first calendar is designed based on an AM group, there is a mapping relationship between a slot included in the first calendar and a plurality of service flows, and the plurality of service flows are mapped to corresponding slots, to implement sub-rate allocation. Therefore, this implements decoupling between a MAC sub-rate and an underlying PHY layer, implements consistency between a data transmission rate of an ingress port of a transmitting end device and a data transmission rate of an egress port without introducing a FlexE Shim, implements an end-to-end cut-through forwarding mechanism, reduces a data transmission delay, and improves data transmission performance.
[0284]
[0285] 801: A first communication apparatus sends an i.sup.th AM group to a second communication apparatus.
[0286] The i.sup.th AM group is used to align a plurality of logical lanes, and i is an integer greater than or equal to 1. The i.sup.th AM group includes a plurality of AMs, and the plurality of logical lanes one-to-one correspond to the plurality of AMs.
[0287] For example, if the plurality of logical lanes include eight logical lanes, the i.sup.th AM group includes eight AMs, each AM corresponds to one logical lane, and the eight AMs are used to align the eight logical lanes.
[0288] A quantity of code blocks included in each AM group may be configured according to a data distribution rule and a distribution granularity. For details, refer to the foregoing descriptions of the format and size of the AM and the AM group.
[0289] In this embodiment, a manner of defining a logical lane may be a logical lane defined by IEEE 802.3 for Ethernet technologies at different speeds, or may be a newly defined logical lane of Ethernet technologies at different speeds.
[0290] 1. The i.sup.th AM group is described based on the logical lane defined by IEEE 802.3 for Ethernet technologies at different speeds.
[0291] For example, in the 200G Ethernet technology defined by IEEE 802.3, the i.sup.th AM group includes four 257-bit code blocks, that is, the i.sup.th AM group includes eight AMs used to align eight logical lanes in the 200G Ethernet technology.
[0292] For example, in the 400G Ethernet technology defined by IEEE 802.3, the i.sup.th AM group includes eight 257-bit code blocks. The i.sup.th AM group includes 16 AMs used to align 16 logical lanes in the 400G Ethernet technology.
[0293] 2. The i.sup.th AM group is described based on the newly defined logical lane of Ethernet technologies at different speeds.
[0294] For example, the 400G Ethernet technology includes four newly defined logical lanes, and the i.sup.th AM group includes four 257-bit code blocks, that is, the i.sup.th AM group includes four AMs used to align four newly defined logical lanes in the 400G Ethernet technology. Alternatively, the i.sup.th AM group includes eight 257-bit code blocks, that is, the i.sup.th AM group includes four AMs used to align four newly defined logical lanes in the 400G Ethernet technology. For related descriptions of the size and the format of the AM corresponding to the newly defined logical lane and the quantity of code blocks included in the AM group, refer to the foregoing related descriptions. Details are not described herein again.
[0295] In this embodiment of this application, distribution of the code blocks in the AM group is similar to the distribution process described in
[0296] In some embodiments, as shown in
[0297] For example, in the 200G Ethernet technology, the duration of the M time units between two adjacent AM groups is duration for sending 81920 257-bit code blocks. In the 400G Ethernet technology, the duration of the M time units between two adjacent AM groups is duration for sending 163840 257-bit code blocks.
[0298] 802: The first communication apparatus sends first data of a plurality of service flows to the second communication apparatus based on a mapping relationship by using the plurality of logical lanes.
[0299] The first data is carried in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, M is an integer greater than or equal to 2, and the mapping relationship is a mapping relationship between a slot of a first calendar and the plurality of service flows.
[0300] The time unit is duration for sending one code block, duration for sending two code blocks, or other duration. This is not limited in this application. For example, the time unit is duration for sending one 257-bit code block.
[0301] The following describes the mapping relationship with reference to Example 1 to Example 4.
[0302] Example 1: In the 200G Ethernet technology, the plurality of service flows include a service flow 1 and a service flow 2. The service flow 1 occupies a 100G bandwidth, and the service flow 2 occupies a 100G bandwidth. To implement sub-rate allocation in the 200G Ethernet technology, so that the service flow 1 occupies a 100G bandwidth, and the service flow 2 occupies a 100G bandwidth, the first calendar includes eight slots: a slot 0 to a slot 7, and a bandwidth occupied by each slot is 25G. Then, the service flow 1 is mapped to the slot 0 to the slot 3, and the service flow 2 is mapped to the slot 4 to the slot 7. The mapping relationship may be represented as Table 2.
TABLE-US-00002 TABLE 2 Service flow Bandwidth Slot of a first calendar Service flow 1 100G Slot 0, slot 1, slot 2, and slot 3 Service flow 2 100G Slot 4, slot 5, slot 6, and slot 7
[0303] It can be learned from Table 2 that the service flow 1 is mapped to the slot 0 to the slot 3, and the service flow 2 is mapped to the slot 4 to the slot 7, so that the first communication apparatus implements sub-rate allocation in the 200G Ethernet technology. Therefore, this implements consistency between a data transmission rate of an ingress port of the first communication apparatus and a data transmission rate of an egress port, implements an end-to-end cut-through forwarding mechanism, reduces a data transmission delay, and improves data transmission performance.
[0304] Example 2: In the 400G Ethernet technology, the plurality of service flows include a service flow 1, a service flow 2, and a service flow 3. The service flow 1 occupies a 100G bandwidth, the service flow 2 occupies a 100G bandwidth, and the service flow 3 occupies a 200G bandwidth. To implement sub-rate allocation in the 400G Ethernet technology, so that the service flow 1 occupies a 100G bandwidth, the service flow 2 occupies a 100G bandwidth, and the service flow 3 occupies a 200G bandwidth, in this embodiment, the first calendar includes 16 slots: a slot 0 to a slot 15, and a bandwidth occupied by each slot is 25G. Then, the service flow 1 is mapped to the slot 0 to the slot 3, the service flow 2 is mapped to the slot 4 to the slot 7, and the service flow 3 is mapped to the slot 8 to the slot 15. The mapping relationship may be represented as Table 3.
TABLE-US-00003 TABLE 3 Service flow Bandwidth Slot of a first calendar Service flow 100G Slot 0, slot 1, slot 2, and slot 3 1 Service flow 100G Slot 4, slot 5, slot 6, and slot 7 2 Service flow 200G Slot 8, slot 9, slot 10, 3 slot 11, slot 12, slot 13, slot 14, and slot 15
[0305] Example 3: In the 400G Ethernet technology, the plurality of service flows include a service flow 1, a service flow 2, and a service flow 3. The service flow 1 occupies a 100G bandwidth, the service flow 2 occupies a 100G bandwidth, and the service flow 3 occupies a 200G bandwidth. To implement sub-rate allocation in the 400G Ethernet technology, so that the service flow 1 occupies a 100G bandwidth, the service flow 2 occupies a 100G bandwidth, and the service flow 3 occupies a 200G bandwidth, the first calendar includes four slots: a slot 0 to a slot 3, and a bandwidth occupied by each slot is 100G. The service flow 1 is mapped to the slot 0, the service flow 2 is mapped to the slot 1, and the service flow 3 is mapped to the slot 2 and the slot 3. The mapping relationship may be represented as Table 4.
TABLE-US-00004 TABLE 4 Service flow Bandwidth Slot of a first calendar Service flow 1 100G slot 0 Service flow 2 100G slot 1 Service flow 3 200G Slot 2 and slot 3
[0306] Example 4: In the 400G Ethernet technology, the plurality of service flows include a service flow 1 and a service flow 2. The service flow 1 and the service flow 2 each occupy a 200G bandwidth. To implement sub-rate allocation in the 400G Ethernet technology, so that the service flow 1 occupies a 200G bandwidth, and the service flow 2 occupies a 200G bandwidth, the first calendar includes two slots: a slot 0 and a slot 1, and a bandwidth occupied by each slot is 200G. The service flow 1 is mapped to the slot 0, and the service flow 2 is mapped to the slot 1. The mapping relationship may be represented as Table 5.
TABLE-US-00005 TABLE 5 Service flow Bandwidth Slot of a first calendar Service flow 1 200G Slot 0 Service flow 2 200G Slot 1
[0307] It can be learned from Table 2 to Table 5 that the plurality of service flows are mapped to corresponding slots of the first calendar, to implement sub-rate allocation. Therefore, this implements consistency between a data transmission rate of an ingress port of the first communication apparatus and a data transmission rate of an egress port, implements an end-to-end cut-through forwarding mechanism, avoids traffic distribution imbalance caused by distributing a bandwidth in a steering mode or a splitting mode, avoids a bandwidth waste, reduces a data transmission delay, and improves data transmission performance.
[0308] The M time units between the i.sup.th AM group and the (i+1).sup.th AM group includes N first counting periods, where N is an integer greater than or equal to 1, each first counting period includes s time units, and s is an integer greater than or equal to 2.
[0309] There are a plurality of manners of dividing the first counting period. The following shows two possible implementations. The first counting period in this embodiment of this application is also applicable to another division manner, and an example of the following division manner constitutes no limitation on this application.
[0310] Division manner 1: Divide the M time units between the i.sup.th AM group and the (i+1).sup.th AM group by using the AM group as a boundary, to obtain the N first counting periods.
[0311] For example, as shown in
[0312] The first calendar includes s slots, the N first counting periods include s time units, and the s time units one-to-one corresponds to the s slots. The s time units included in the first counting period may be separately mapped to corresponding slots in a sequence of the slots, or may not be separately mapped to corresponding slots in a sequence of the slots. This is not limited in this application. The following is described by using an example in which the s time units included in the first counting period may be separately mapped to corresponding slots in the sequence of the slots.
[0313] For example, as shown in
[0314] The division manner 1 has the following two cases, which are separately described in the following:
[0315] Case 1: If a remainder obtained by dividing the quantity M of time units between the i.sup.th AM group and the (i+1).sup.th AM group by the quantity s of time units included in the first counting period is 0, the first time unit of the 1.sup.st first counting period in the N first counting periods is continuous with the last time unit of the i.sup.th AM group, and a last first counting period in the N first counting periods is continuous with a first time unit of the (i+1).sup.th AM group.
[0316] For example, as shown in
[0317] Each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar.
[0318] It can be learned from
[0319] Case 2: If a remainder obtained by dividing the quantity M of time units between the i.sup.th AM group and the (i+1).sup.th AM group by the quantity s of time units included in the first counting period is r, r is an integer greater than or equal to 1 and less than s, the M time units between the i.sup.th AM group and the (i+1).sup.th AM group further include one second counting period, and the second counting period includes only a part of the s time units, namely, including r time units.
[0320] A first time unit of the second counting period is continuous with a last time unit of the last first counting period in the N first counting periods, and a last time unit of the second counting period is continuous with the first time unit of the (i+1).sup.th AM group.
[0321] For example, as shown in
[0322] Each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar.
[0323] Each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of the second counting period correspond to different slots of the first calendar.
[0324] For example, as shown in
[0325] For another example, as shown in
[0326] Division manner 2: Divide the M time units between the i.sup.th AM group and the (i+1).sup.th AM group by using a time unit corresponding to a slot 0 as a boundary, where the M time units include the N first counting periods.
[0327] The first calendar includes s slots. In some embodiments, as shown in
[0328] The division manner 2 has the following two cases, which are separately described in the following:
[0329] Case 1: If a remainder obtained by dividing the quantity M of time units between the i.sup.th AM group and the (i+1).sup.th AM group by the quantity s of time units included in the first counting period is 0, the first time unit of the 1.sup.st first counting period in the N first counting periods is continuous with the last time unit of the i.sup.th AM group, and a last first counting period in the N first counting periods is continuous with a first time unit of the (i+1).sup.th AM group.
[0330] For example, as shown in
[0331] Each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar.
[0332] It can be learned from
[0333] Case 2: If a remainder obtained by dividing the quantity M of time units between the i.sup.th AM group and the (i+1).sup.th AM group by the quantity s of time units included in the first counting period is r, r is an integer greater than or equal to 1 and less than s, the M time units between the i.sup.th AM group and the (i+1).sup.th AM group further include at least one second counting period, and each of the at least one second counting period includes only a part of the s time units. In other words, the at least one second counting period includes r time units in total.
[0334] The at least one second counting period includes two possible cases.
[0335] 1. The at least one second counting period includes one second counting period, the second counting period includes r time units, and there are two possible location relationships between the second counting period and the N first counting periods.
[0336] Location relationship 1: A first time unit of the second counting period is continuous with a last time unit of the last first counting period in the N first counting periods.
[0337] In the location relationship 1, a last time unit of the second counting period is continuous with the first time unit of the (i+1).sup.th AM group.
[0338] For example, as shown in
[0339] Location relationship 2: A last time unit of the second counting period is continuous with a first time unit of the 1.sup.st first counting period in the N first counting periods.
[0340] In the location relationship 2, a first time unit of the second counting period is continuous with the last time unit of the i.sup.th AM group.
[0341] For example, as shown in
[0342] 2. The at least one second counting period includes two second counting periods, and the two second counting periods include r time units in total. Location relationships between the two second counting periods and the N first counting periods are as follows: A last time unit of the 1.sup.st second counting period is continuous with the first time unit of the 1.sup.st first counting period in the N first counting periods, and a first time unit of the 2.sup.nd second counting period is continuous with the last time unit of the last first counting period in the N first counting periods.
[0343] In addition, a first time unit of the 1.sup.st second counting period is continuous with the last time unit of the i.sup.th AM group, and a last time unit of the 2.sup.nd second counting period is continuous with the first time unit of the (i+1).sup.th AM group.
[0344] For example, as shown in
[0345] Each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar. Each time unit of each second counting period in the at least one second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
[0346] For example, as shown in
[0347] For example, as shown in
[0348] In the division manner 1 and the division manner 2, when N is greater than or equal to 2, a last time unit of a j.sup.th first counting period in the N first counting periods is continuous with a first time unit of a (j+1).sup.th first counting period in the N first counting periods, where j is an integer greater than or equal to 1, and j is less than N.
[0349] For example, as shown in
[0350] Then, the first communication apparatus sends the first data of the plurality of service flows to the second communication apparatus based on the mapping relationship in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group. For a specific transmission process of the first communication apparatus by using the plurality of logical lanes, refer to related descriptions in
[0351] In this embodiment, the slot of the first calendar is divided by using the i.sup.th AM group as a boundary, and the division manner is compatible with the existing Ethernet architecture. In addition, a bandwidth supported by each slot of the first calendar may be set based on an actual requirement. For example, in Table 2, a bandwidth occupied by each slot is 25G, and a bandwidth occupied by each slot in Table 4 is 100G. Therefore, when the slot of the first calendar is divided based on the i.sup.th AM group, light-weight mapping may be designed based on an actual situation, to achieve flexible implementation.
[0352] For example, with reference to Table 2 and
[0353] For example, with reference to Table 3 and
[0354] 803: The second communication apparatus determines service flows corresponding to data separately carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0355] In some embodiments, the second communication apparatus determines slots, of the first calendar, separately corresponding to the M time units; and determines, based on the slots, of the first calendar, separately corresponding to the M time units, the service flows corresponding to the data separately carried in the M time units. For a specific determining manner, refer to the following related descriptions. For a process in which the second communication apparatus receives the data, refer to the data reception and parsing process shown in
[0356] 804: The first communication apparatus sends the (i+1).sup.th AM group.
[0357] A transmission time interval between sending the i.sup.th AM group by the first communication apparatus and sending the (i+1).sup.th AM group by the first communication apparatus is the M time units.
[0358] For example, as shown in
[0359] 805: The first communication apparatus sends second data of a plurality of service flows to the second communication apparatus based on a mapping relationship by using the plurality of logical lanes.
[0360] 806: The second communication apparatus determines service flows corresponding to data separately carried in M time units between the (i+1).sup.th AM group and an (i+2).sup.th AM group.
[0361] Operation 804 to operation 806 are similar to operation 801 to operation 803. For details, refer to related descriptions of operation 801 to operation 803. Details are not described herein again.
[0362] In this embodiment of this application, the first communication apparatus sends the i.sup.th AM group to the second communication apparatus, where the i.sup.th AM group is used to align the plurality of logical lanes, and i is an integer greater than or equal to 1; and sends the first data of the plurality of service flows to the second communication apparatus based on a mapping relationship by using the plurality of logical lanes, where the first data is carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, and M is an integer greater than or equal to 2. The mapping relationship is a mapping relationship between the slot of the first calendar and the plurality of service flows, the first calendar includes s time units, the M time units between the i.sup.th AM group and the (i+1).sup.th AM group include N first counting periods, the first counting period includes s time units, each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar, where s is an integer greater than or equal to 2, and N is an integer greater than or equal to 1. Then, the first communication apparatus sends the (i+1).sup.th AM group to the second communication apparatus, where the transmission time interval between sending the i.sup.th AM group by the first communication apparatus and sending the (i+1).sup.th AM group by the first communication apparatus is the M time units. It can be learned that, in this embodiment of this application, a first calendar (calendar) is designed based on the i.sup.th AM group, and the slot included in the first calendar has a mapping relationship with the plurality of service flows. The first communication apparatus maps the data of the plurality of service flows to a corresponding slot, so that the first communication apparatus implements sub-rate allocation. Therefore, this implements decoupling between a MAC sub-rate and an underlying PHY layer, implements consistency between a data transmission rate of an ingress port of a transmitting end device and a data transmission rate of an egress port without introducing a FlexE Shim, implements end-to-end cut-through forwarding, breaks through a bottleneck of the cut-through forwarding technology, reduces a data transmission delay, and improves data transmission performance.
[0363] In this embodiment of this application, in the embodiment shown in
[0364] Operation 803a The second communication apparatus determines slots, of the first calendar, separately corresponding to the M time units.
[0365] In operation 803a, the second communication apparatus determines, in a plurality of manners, the slots separately corresponding to the M time units. The following separately describes the manners.
[0366] Determining manner 1: The second communication apparatus determines, based on a first correspondence between a pre-configured time unit of the first counting period and the slot, the slots, of the first calendar, separately corresponding to the M time units.
[0367] The following describes the determining manner 1 based on the division manner 1 of the first counting period.
[0368] The first correspondence is first described based on the division manner 1 of the first counting period in operation 802.
[0369] For example, as shown in
[0370] If a remainder obtained by dividing M by s is 0, M time units between two adjacent AM groups include N first counting periods, and each first counting period includes s time units, a first time unit of each first counting period corresponds to the slot 0 of the first calendar, a second time unit corresponds to the slot 1 of the first calendar, and the rest can be deduced by analogy. An s.sup.th time unit corresponds to the slot s−1 of the first calendar. Therefore, the first correspondence between the first counting period and the slot of the first calendar only needs to be configured on the second communication apparatus once.
[0371] If a remainder obtained by dividing M by s is r, N first counting periods and one second counting period are included between the i.sup.th AM group and the (i+1).sup.th AM group. It can be learned from
[0372] In an embodiment, the second communication apparatus determines, based on the first correspondence and a second correspondence between at least one second counting period and the slot, the slots, of the first calendar, separately corresponding to the M time units.
[0373] In the division manner 1 of the first counting period, when a remainder obtained by dividing M by s is r, one second counting period is further included between the i.sup.th AM group and the (i+1).sup.th AM group, and the second communication apparatus should configure a correspondence between the second counting period and the slot.
[0374] For example, as shown in
[0375] For another example, as shown in
[0376] The following describes the first correspondence based on the division manner 2 of the first counting period.
[0377] In the division manner 2, the first counting period is divided by using the time unit corresponding to the slot 0 as a boundary. Therefore, in the s time units included in each first counting period, the first time unit corresponds to the slot 0 of the first calendar, the second time unit corresponds to the slot 1 of the first calendar, and the rest can be deduced by analogy. The s.sup.th time unit corresponds to the slot s−1 of the first calendar. Therefore, the first correspondence between the first counting period and the slot of the first calendar only needs to be configured on the second communication apparatus once.
[0378] In an embodiment, the second communication apparatus determines, based on the first correspondence and a second correspondence between at least one second counting period and the slot, the slots, of the first calendar, separately corresponding to the M time units.
[0379] In the division manner 1 of the first counting period, when a remainder obtained by dividing M by s is r, at least one second counting period is further included between the i.sup.th AM group and the (i+1).sup.th AM group, and the second communication apparatus should configure a second correspondence between the at least one second counting period and the slot.
[0380] For example, as shown in
[0381] For still another example, as shown in
[0382] Determining manner 2: The second communication apparatus determines, based on the i.sup.th AM group, the slots, of the first calendar, separately corresponding to the M time units.
[0383] A first AM in the i.sup.th AM group is used to identify a slot, of the first calendar, that corresponds to a first time unit of a 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0384] In some embodiments, the second communication apparatus determines, based on the i.sup.th AM group, the slot corresponding to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, and then determines the slot corresponding to each time unit of each counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, to determine the slots separately corresponding to the M time units. Because the quantity M of time units between two adjacent AM groups is not necessarily exactly divided by the quantity s of slots included in the first calendar, the first AM in the AM group is used to identify the slot, of the first calendar, that corresponds to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, so that the second communication apparatus determines the slots corresponding to the M time units.
[0385] The following first describes the determining manner 2 based on the division manner 1 of the first counting period and with reference to
[0386] For example, as shown in
[0387] For example, as shown in
[0388] The following describes the determining manner 2 based on the division manner 2 of the first counting period and with reference to
[0389] For example, as shown in
[0390] For example, as shown in
[0391] In this embodiment, the second communication apparatus may alternatively select another AM in the i.sup.th AM group to identify the slot, of the first calendar, corresponding to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group. This is not limited in this application. For example, the second communication apparatus selects a second AM in the i.sup.th AM group to identify the slot, of the first calendar, corresponding to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0392] Based on the determining manner 2, in an embodiment, this embodiment further includes operation 801a, and operation 801a is performed before operation 801.
[0393] Operation 801a: The first communication apparatus generates the i.sup.th AM group based on the slot corresponding to the first time unit of the 1.sup.st counting period in the M time units.
[0394] The first AM in the i.sup.th AM group is used to identify the slot, of the first calendar, that corresponds to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0395] In this embodiment, the first communication apparatus may use a padding bit in the i.sup.th AM group to identify the slot corresponding to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group. In an embodiment, the first AM in the i.sup.th AM group includes a second padding part.
[0396] The second padding part carries an ID of the slot corresponding to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0397] In the 200G or 400G Ethernet technology, the second padding part may be UP.sub.1. In the 40G or 100G Ethernet technology, the second padding part may be BIP.sub.3. The following describes the second padding part by using the 200G Ethernet technology as an example.
[0398] As shown in
[0399] It should be noted that the second padding part may alternatively be UP.sub.1 of another AM in the i.sup.th AM group. This is not limited in this application. For example, the second padding part is UP.sub.1 of the second AM in the i.sup.th AM group.
[0400] The following describes, with reference to
[0401] The following describes the second padding part based on the division manner 1 of the first counting period and with reference to
[0402] Example 1: As shown in
[0403] Example 2: As shown in
[0404] Example 3: As shown in
[0405] Example 4: As shown in
[0406] The following describes the second padding part based on the division manner 1 of the first counting period and with reference to
[0407] For example, as shown in
[0408] It should be noted that
[0409] Operation 803b: The second communication apparatus determines, based on the slots, of the first calendar, separately corresponding to the M time units, the service flows corresponding to the data separately carried in the M time units.
[0410] In some embodiments, the second communication apparatus determines, based on the mapping relationship and the slots, of the first calendar, separately corresponding to the M time units, the service flows corresponding to the data separately carried in the M time units. For related descriptions of the mapping relationship, refer to the related descriptions in operation 802.
[0411] The mapping relationship may be pre-configured in the first communication apparatus and the second communication apparatus, or may be carried in the i.sup.th AM group. This is not limited in this application.
[0412] For a manner in which the mapping relationship is pre-configured in the first communication apparatus and the second communication apparatus, when the mapping relationship changes, the first communication apparatus and the second communication apparatus should update the mapping relationship.
[0413] If the mapping relationship is carried in the i.sup.th AM group, in an embodiment, this embodiment further includes operation 801b, and operation 801b is performed before operation 801.
[0414] Operation 801b: The first communication apparatus generates the i.sup.th AM group based on the mapping relationship.
[0415] The i.sup.th AM group indicates service flows separately corresponding to the slots of the first calendar.
[0416] In some embodiments, the first communication apparatus uses a first padding part of the i.sup.th AM group to identify IDs of the service flows separately corresponding to the slots of the first calendar. In an embodiment, the i.sup.th AM group includes P AMs, where P is a quantity of the plurality of logical lanes, and P is an integer greater than 1.
[0417] When P is greater than or equal to s, the first communication apparatus may use the first padding part of the i.sup.th AM group to identify the service flows separately corresponding to the slots of the first calendar.
[0418] When P is greater than s, the first communication apparatus may use a first padding part of first s AMs or last s AMs in the i.sup.th AM group to identify the service flows separately corresponding to the slots of the first calendar. This is not limited in this application.
[0419] It should be noted that if the second communication apparatus determines, based on the i.sup.th AM group, the slots, of the first calendar, separately corresponding to the M time units in operation 803a, and the second communication apparatus determines, based on the i.sup.th AM group and the slots, of the first calendar, separately corresponding to the M time units, the service flows corresponding to the data separately carried in the M time units in operation 803b, operation 801a and operation 801b may be combined as follows: The first communication apparatus generates the i.sup.th AM group based on the mapping relationship and the slot, of the first calendar, that corresponds to each time unit of the first counting period, to obtain the i.sup.th AM group used to identify the service flows separately corresponding to the slots of the first calendar, and the first AM in the i.sup.th AM group used to identify the slot, of the first calendar, that corresponds to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0420] The first padding part may be UP.sub.2 of an AM in the 200G or 400G Ethernet technology, or BIP.sub.7 in the 40G or 100G Ethernet technology. The following is described by using UP.sub.2 of the AM in the 200G Ethernet technology as an example.
[0421] For example, as shown in
[0422] It should be noted that when P is less than s, the first communication apparatus may pre-configure the mapping relationship, or use a first padding part of an AM group adjacent to the i.sup.th AM group and the first padding part of the i.sup.th AM group to identify the service flows separately corresponding to the slots of the first calendar. This is not limited in this application.
[0423] The following describes, by using an example in which the first padding part is UP.sub.2 of the AM in the 200G or 400G Ethernet technology, a case in which the first padding part of the it AM group is used to identify the service flows separately corresponding to the slots of the first calendar. The following is described by using an example in which P is equal to s.
[0424] Example 1: As shown in
[0425] Because the first counting period includes s time units, and the s time units one-to-one correspond to s slots, UP.sub.2 of each AM in the first AM group may carry the service flow corresponding to the slot corresponding to each time unit of the first counting period. In
[0426] In
[0427] Example 2: As shown in
[0428] Because the third counting period includes s time units, and the s time units one-to-one correspond to s slots, UP.sub.2 of each AM in the first AM group may carry the service flow corresponding to the slot corresponding to each time unit of the third counting period. In the third counting period included in the first AM group and the second AM group, a first time unit corresponds to the slot 4, a second time unit corresponds to the slot 5, a third time unit corresponds to the slot 6, a fourth time unit corresponds to the slot 7, a fifth time unit corresponds to the slot 0, and the rest can be deduced by analogy. An eighth time unit corresponds to the slot 3. It can be learned from the mapping relationship shown in Table 2 that the service flow 1 is mapped to the slot 0 to the slot 3, and the service flow 2 is mapped to the slot 4 to the slot 7.
[0429] Therefore, UP.sub.2 of first four AMs in the second AM group separately carries an ID of the service flow 2, and UP.sub.2 of last four AMs in the first AM group separately carries an ID of the service flow 1. In other words, in operation 801b, the first communication apparatus separately encodes UP.sub.2 of the first four AMs in the first AM group, to obtain IDs, separately carried on UP.sub.2 of the first four AMs, of service flows corresponding to the slot 4 to the slot 7. The first communication apparatus separately encodes UP.sub.2 of the last four AMs in the second AM group, to obtain IDs, separately carried on UP.sub.2 of the last four AMs, of service flows corresponding to the slot 0 to the slot 3.
[0430] In
[0431] Example 3: As shown in
[0432] Because the first counting period includes s time units, and the s time units one-to-one correspond to s slots, UP.sub.2 of each AM in the first AM group may carry the service flow corresponding to the slot corresponding to each time unit of the first counting period. Therefore, UP.sub.2 of first four AMs in the first AM group separately carries an ID of the service flow 1, UP.sub.2 of a fifth AM to an eight AM in the first AM group separately carries an ID of the service flow 2, and UP.sub.2 of a ninth AM to a sixteenth AM in the first AM group separately carries an ID of the service flow 3. In other words, in operation 801b, the first communication apparatus encodes UP.sub.2 of each AM in the first AM group, to obtain IDs, separately carried on UP.sub.2 of the first four AMs in the first AM group, of service flows corresponding to the slot 0 to the slot 3, IDs, separately carried on UP.sub.2 of the fifth AM to the eighth AM in the first AM group, of service flows corresponding to the slot 4 to the slot 7, and IDs, separately carried on UP.sub.2 of the ninth AM to the sixteenth AM in the first AM group, of service flows corresponding to the slot 8 to the slot 15.
[0433] In
[0434] Example 4: As shown in
[0435] It can be learned from the mapping relationship shown in Table 3 that the service flow 1 is mapped to the slot 0 to the slot 3, the service flow 2 is mapped to the slot 4 to the slot 7, and the service flow 3 is mapped to the slot 8 to the slot 15. Because the third counting period includes s time units, and the s time units one-to-one correspond to s slots, UP.sub.2 of each AM in the first AM group may carry the service flow corresponding to the slot corresponding to each time unit of the third counting period. Therefore, UP.sub.2 of first eight AMs in the second AM group separately carries an ID of the service flow 3, UP.sub.2 of a ninth AM to a twelfth AM in the second AM group separately carries an ID of the service flow 1, and UP.sub.2 of a thirteenth AM to a sixteenth AM in the second AM group separately carries an ID of the service flow 2.
[0436] In
[0437] The example 1 to the example 4 are examples based on the division manner 1 of the first counting period. The following shows an example 5 based on the division manner 2 of the first counting period.
[0438] Example 5: As shown in
[0439] Therefore, UP.sub.2 of the first four AMs in the first AM group separately carries IDs of the service flows corresponding to the slot 0 to the slot 3, and UP.sub.2 of the last four AMs in the first AM group separately carries IDs of the service flows corresponding to the slot 4 to the slot 7. UP.sub.2 of the first four AMs in the second AM group separately carries the IDs of the service flows corresponding to the slot 0 to the slot 3, and UP.sub.2 of the last four AMs in the second AM group separately carries the IDs of the service flows corresponding to the slot 4 to the slot 7.
[0440] It can be learned from the foregoing that in the division manner 2 of the first counting period, in the first counting period included in M time units between different AM groups, in the s time units of the first counting period, the first time unit corresponds to the slot 0, the second time unit corresponds to the slot 1, and the rest can be deduced by analogy. The s.sup.th time unit corresponds to the slot s−1. In other words, slots corresponding to different time units of a same first counting period does not vary with AM groups. Therefore, in this implementation, the first communication apparatus may use only the first padding part of the first AM group in the serial data stream to identify the service flow of the slot corresponding to the time unit corresponding to the first counting period, and does not need to identify the service flow of each AM group in the serial data stream. In other words, when the mapping relationship between the slots in the first calendar and the plurality of service flows changes, the first communication apparatus may use UP.sub.2 of the AM in the AM group to identify the service flow corresponding to the slot in the first calendar. This is not limited in this application.
[0441] It can be learned from the example that the first communication apparatus may carry, by using the i.sup.th AM group, the ID of the service flow corresponding to the slot of the first calendar, and the slot corresponding to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0442] It should be noted that, regardless of the division manner 1 or the division manner 2 of the first counting period, when M is evenly divided by s, a first time unit of a 1.sup.st first counting period between adjacent AM groups corresponds to the slot 0. Then, the first communication apparatus does not need to identify, by using UP.sub.1 of a first AM in each AM group in the serial data stream, an ID of a slot corresponding to the first time unit of the 1.sup.st count period included in the M time units between the AM groups. For example, the first communication apparatus may use a first AM in the first AM group in the serial data stream to identify the ID of the slot corresponding to the first time unit of the 1.sup.st counting period included in the M time units between adjacent AM groups. In addition, when M is evenly divided by s, the first communication apparatus does not need to identify, by using UP.sub.2 of the AM in each AM group in the serial data stream, the service flow corresponding to the slot of the first calendar; and may identify, by using UP.sub.2 of the AM in the AM group, the service flow corresponding to the slot in the first calendar when the mapping relationship between the slots of the first calendar and the plurality of service flows changes. This is not limited in this application.
[0443] In this embodiment, the first communication apparatus is compatible with an architecture of the existing Ethernet technology in a manner in which the i.sup.th AM group carries the mapping relationship between the slots of the first calendar and the plurality of service flows. This implements indication of a mapping relationship between a slot and a service flow without introducing additional signaling overheads. In addition, because the first counting period includes s time units, the i.sup.th AM group may be used to identify a slot corresponding to each time unit in the first counting period. A remainder obtained by dividing the quantity M of time units included between the i.sup.th AM group and the (i+1).sup.th AM group by the quantity s of slots is not 0, and slots corresponding to time units that are at a same location of the first counting period and that are included between different AM groups may change. Therefore, the first communication apparatus may identify, by using the AM group, a service flow of a slot corresponding to each time unit in the first counting period.
[0444] In addition, because the quantity M of time units between two adjacent AM groups is not necessarily exactly divided by the quantity s of slots included in the first calendar, the first AM in the AM group is used to identify the slot, of the first calendar, that corresponds to the first time unit of the 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group. Therefore, a receiving end device determines slots corresponding to the M time units, and then determines, based on the mapping relationship, a service flow corresponding to each slot, to determine a service flow corresponding to data carried in the M time units.
[0445] In embodiments of this application, in the embodiment shown in
[0446] The M time units between the i.sup.th AM group and the (i+1).sup.th AM group include N first counting periods, the first calendar includes s slots, each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar.
[0447] There are a plurality of division granularities of time units. For example, the time unit is duration for sending one 257-bit code block, duration for sending two 257-bit code blocks, or other duration. This is not limited in this application.
[0448] When a data distribution granularity of the first communication apparatus is a distribution granularity of one time unit, a relationship may be established between the slot of the first calendar and the logical lane. The following describes three possible relationships between the slots of the first calendar and the plurality of logical lanes with reference to
[0449] Relationship 1: A quantity Q of logical lanes included in the plurality of logical lanes is equal to K multiplied by the quantity s of slots included in the first calendar, and a remainder obtained by dividing the quantity M of time units between two adjacent AM groups by the quantity Q of logical lanes included in the plurality of logical lanes is 0, where M, K, Q, and s are all integers greater than or equal to 2. In other words, Q mod s=0, Q=K×s, and M mod Q=0. “mod” indicates a modulo operation.
[0450] In this case, each slot of the first calendar corresponds to K logical lanes in the plurality of logical lanes, and the K logical lanes corresponding to different slots are different. To ensure that AMs in each AM group can be accurately distributed to corresponding logical lanes, the quantity M of time units between two adjacent AM groups should be an integer multiple of the quantity Q of logical lanes included in the plurality of logical lanes.
[0451] For example, as shown in
[0452] It can be learned from the descriptions in
[0453] The following describes the relationship 1 between the slots and the logical lanes with reference to an example in
[0454] In the standard 400G Ethernet technology, distribution and interleaving are performed in a unit of 10 bits. One slot (257-bit code block) is distributed to 16 logical lanes. If one logical lane is faulty, data of all slots is affected. To avoid the problem, this embodiment of this application provides the following solution: The 400G Ethernet technology is newly defined to include four logical lanes, and each logical lane supports a 100G bandwidth. As shown in
[0455] As shown in
[0456] Relationship 2: The quantity s of slots included in the first calendar is equal to K multiplied by the quantity Q of logical lanes included in the plurality of logical lanes, and a remainder obtained by dividing the quantity M of time units between two adjacent AM groups by the quantity Q of logical lanes included in the plurality of logical lanes is 0, where M, K, Q, and s are all integers greater than or equal to 2. In other words, s mod Q=0, s=K×Q, and M mod s=0.
[0457] In this case, each of the plurality of logical lanes corresponds to K slots of the first calendar, and the K slots corresponding to different logical lanes are different. To ensure that AMs in each AM group can be accurately distributed to corresponding logical lanes, the quantity M of time units between two adjacent AM groups should be an integer multiple of the quantity Q of logical lanes included in the plurality of logical lanes.
[0458] For example, as shown in
[0459] It can be learned from the related descriptions in
[0460] The following describes the relationship 2 between the slots and the logical lanes with reference to an example in
[0461] In the standard 400G Ethernet technology, distribution and interleaving are performed in a unit of 10 bits. One slot (257-bit code block) is distributed to 16 logical lanes. If one logical lane is faulty, data of all slots is affected. To avoid the problem, this embodiment of this application provides the following solution: The 400G Ethernet technology is newly defined to include four logical lanes, and each logical lane supports a 100G bandwidth. As shown in
[0462] As shown in
[0463] Relationship 3: The quantity s of slots included in the first calendar is equal to the quantity Q of logical lanes included in the plurality of logical lanes, and a remainder obtained by dividing the quantity M of time units between two adjacent AM groups by the quantity Q of logical lanes included in the plurality of logical lanes is 0, that is, s=Q, and M mod Q=0, where s, Q, and M are all integers greater than or equal to 2.
[0464] The slot included in the first calendar one-to-one corresponds to the logical lane included in the plurality of logical lanes. To ensure that AMs in each AM group can be accurately distributed to corresponding logical lanes, the quantity M of time units between two adjacent AM groups should be an integer multiple of the quantity Q of logical lanes included in the plurality of logical lanes.
[0465] For example, as shown in
[0466] It can be learned from the related descriptions in
[0467] The following describes the relationship 3 between the slots and the logical lanes with reference to an example in
[0468] In the standard 400G Ethernet technology, distribution and interleaving are performed in a unit of 10 bits. One slot (257-bit code block) is distributed to 16 logical lanes. If one logical lane is faulty, data of all slots is affected. To avoid the problem, this embodiment of this application provides the following solution: The 400G Ethernet technology is newly defined to include four logical lanes, and each logical lane supports a 100G bandwidth. As shown in
[0469] It can be learned from
[0470] It should be noted that the foregoing examples are described by using the 400G Ethernet technology as an example. However, during actual application, this embodiment of this application is also applicable to an Ethernet technology at another speed. This is not limited in this application. For example, this embodiment of this application is also applicable to the 200G Ethernet technology. In addition, in the foregoing examples, the relationship between the slots of the first calendar and the logical lanes is described by using an example in which one time unit is duration for sending one 257-bit code block. During actual application, the time unit may also be other duration. For a time unit with other duration, relationships between the slots of the first calendar and the logical lanes are similar to that in the foregoing examples, and are not described one by one herein again.
[0471] The relationship between the slot of the first calendar and the logical lane is described by using an example in which the distribution granularity is one time unit. This embodiment of this application is also applicable to another distribution granularity. For example, distribution is performed by using two time units as a distribution granularity.
[0472] It should be noted that, when a plurality of time units are used as a distribution granularity, the relationship between the slots of the first calendar and the logical lanes is any one of the relationship 1 to the relationship 3 shown above, and in each relationship, M mod a=0, where a is the distribution granularity, and a is an integer greater than 1. This can ensure that an AM in each AM group is distributed to a corresponding logical lane according to a distribution rule, to implement alignment of a plurality of logical lanes.
[0473] With reference to
[0474] The 400G Ethernet technology is newly defined to include four logical lanes, and each logical lane supports a 100G bandwidth. As shown in
[0475] It can be learned from
[0476] The following describes in detail the first communication apparatus and the second communication apparatus in embodiments of this application with reference to
[0477]
[0478] The transceiver unit 1610 is configured to: send an i.sup.th AM group to a second communication apparatus, where the i.sup.th AM group is used to align a plurality of logical lanes, and i is an integer greater than or equal to 1; and send first data of a plurality of service flows to the second communication apparatus based on a mapping relationship by using the plurality of logical lanes, where the first data is carried in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, M is an integer greater than or equal to 2, a first counting period includes s time units, each time unit of the first counting period corresponds to one slot of a first calendar, different time units of a same first counting period correspond to different slots of the first calendar, and N is an integer greater than or equal to 1; and send the (i+1).sup.th AM group to the second communication apparatus, where a transmission time interval between sending the i.sup.th AM group by the transceiver unit 1610 and sending the (i+1).sup.th AM group by the transceiver unit 1610 is the M time units, where s is an integer greater than or equal to 2.
[0479] In a possible implementation, the M time units between the i.sup.th AM group and the (i+1).sup.th AM group further includes at least one second counting period, the second counting period includes only a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
[0480] In another possible implementation, the at least one second counting period includes one second counting period.
[0481] A first time unit included in the second counting period is continuous with a last time unit included in a last counting period in the N first counting periods, and a last time unit included in the second counting period is continuous with a first time unit of the (i+1).sup.th AM group.
[0482] Alternatively, a first time unit included in the second counting period is continuous with a last time unit included in the i.sup.th AM group, and a last time unit included in the second counting period is continuous with a first time unit of a 1.sup.st first counting period in the N first counting periods.
[0483] In another possible implementation, if a remainder obtained by dividing M by s is r, the second counting period includes r time units, and r is an integer greater than or equal to 1 and less than s.
[0484] In another possible implementation, the at least one second counting period includes two second counting periods.
[0485] A first time unit included in a 1.sup.st second counting period in the two second counting periods is continuous with a last time unit included in the i.sup.th AM group, and a last time unit included in the 1.sup.st second counting period is continuous with a first time unit of a 1.sup.st first counting period in the N first counting periods.
[0486] A first time unit included in a 2.sup.nd second counting period in the two second counting periods is continuous with a last time unit included in a last counting period in the N first counting periods, and a last time unit included in the 2.sup.nd second counting period is continuous with a first time unit of the (i+1).sup.th AM group.
[0487] In another possible implementation, if a remainder obtained by dividing M by s is r, the two second counting periods include r time units, and r is an integer greater than or equal to 1 and less than s. In this possible implementation, the remainder obtained by dividing M by s is used to determine a quantity of time units included in the two second counting periods.
[0488] In another possible implementation, each slot included in the first calendar corresponds to only a part of the plurality of logical lanes.
[0489] In another possible implementation, if a quantity of slots included in the first calendar is equal to a quantity of logical lanes included in the plurality of logical lanes, the slots included in the first calendar one-to-one correspond to the logical lanes included in the plurality of logical lanes.
[0490] In another possible implementation, if a quantity of logical lanes included in the plurality of logical lanes is equal to K multiplied by a quantity of slots included in the first calendar, and K is an integer greater than or equal to 2, each slot of the first calendar corresponds to K logical lanes in the plurality of logical lanes, and the K logical lanes corresponding to different slots of the first calendar are different.
[0491] In another possible implementation, if a quantity of slots included in the first calendar is equal to K multiplied by a quantity of logical lanes included in the plurality of logical lanes, and K is an integer greater than or equal to 2, each of the plurality of logical lanes corresponds to K slots of the first calendar, and the K slots corresponding to different logical lanes are different.
[0492] In another possible implementation, the processing unit 1620 is configured to generate the i.sup.th AM group based on the mapping relationship, where the i.sup.th AM group indicates service flows corresponding to the slots of the first calendar.
[0493] In another possible implementation, a first AM in the i.sup.th AM group indicates a slot, of the first calendar, that corresponds to a first time unit of a 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0494] The first communication apparatus shown in
[0495] The transceiver unit 1610 is configured to send first data of a plurality of service flows to a second communication apparatus based on a mapping relationship by using a plurality of logical lanes, where the first data is carried in M time units, and M is an integer greater than or equal to 2.
[0496] The M time units include N first counting periods and at least one second counting period, the first counting period includes s time units, each time unit of the first counting period corresponds to one slot of a first calendar, and different time units of a same first counting period correspond to different slots of the first calendar, where s is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0497] The second counting period includes only a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
[0498] In a possible implementation, the transceiver unit 1610 is further configured to: [0499] send an i.sup.th AM group to the second communication apparatus, where i is an integer greater than or equal to 1; and [0500] send an (i+1).sup.th AM group to the second communication apparatus, where the i.sup.th AM group and the (i+1).sup.th AM group are used to align the plurality of logical lanes, and a transmission time interval between sending the i.sup.th AM group by the transceiver unit 1610 and sending the (i+1).sup.th AM group by the transceiver unit 1610 is the M time units. In other words, the M time units carrying the first data is the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0501] In another possible implementation, the first communication apparatus further includes a processing unit 1620.
[0502] The processing unit 1620 is configured to generate the i.sup.th AM group based on the mapping relationship, where the i.sup.th AM group indicates service flows separately corresponding to the slots of the first calendar.
[0503] In another possible implementation, a first AM in the i.sup.th AM group is used to identify a slot, of the first calendar, that corresponds to a first time unit of a 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.hAM group.
[0504] It should be understood that for a specific process in which the units in the first communication apparatus 1600 perform the foregoing corresponding operations, refer to descriptions in the method embodiments. For brevity, details are not described herein again.
[0505]
[0506] The transceiver unit 1710 is configured to: receive an i.sup.th AM group sent by a first communication apparatus, where the i.sup.th AM group is used to align a plurality of logical lanes, and i is an integer greater than or equal to 1; and receive, in M time units between the i.sup.th AM group and an (i+1).sup.th AM group, first data that is of a plurality of service flows and that is sent by the first communication apparatus by using the plurality of logical lanes, where M is an integer greater than or equal to 2.
[0507] The processing unit 1720 is configured to: determine service flows corresponding to data separately carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0508] There is a mapping relationship between the plurality of service flows and a slot of a first calendar, and the first calendar includes s slots. The M time units between the i.sup.th AM group and the (i+1).sup.th AM group include N first counting periods, the first counting period includes s time units, each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar, where s is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0509] The transceiver unit 1710 is further configured to receive the (i+1).sup.th AM group sent by the first communication apparatus, where a reception time interval between receiving the i.sup.th AM group by the transceiver unit from the first communication apparatus and receiving the (i+1).sup.th AM group by the transceiver unit from the first communication apparatus is the M time units.
[0510] In a possible implementation, the M time units between the i.sup.thAM group and the (i+1).sup.th AM group further includes at least one second counting period, the second counting period includes only a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
[0511] In another possible implementation, the at least one second counting period includes one second counting period.
[0512] A first time unit included in the second counting period is continuous with a last time unit included in a last counting period in the N first counting periods, and a last time unit included in the second counting period is continuous with a first time unit of the (i+1).sup.th AM group.
[0513] Alternatively, a first time unit included in the second counting period is continuous with a last time unit included in the i.sup.th AM group, and a last time unit included in the second counting period is continuous with a first time unit of a 1.sup.st first counting period in the N first counting periods.
[0514] In another possible implementation, if a remainder obtained by dividing M by s is r, the second counting period includes r time units, and r is an integer greater than or equal to 1 and less than s.
[0515] In another possible implementation, the at least one second counting period includes two second counting periods.
[0516] A first time unit included in a 1.sup.st second counting period in the two second counting periods is continuous with a last time unit included in the i.sup.th AM group, and a last time unit included in the 1.sup.st second counting period is continuous with a first time unit of a 1.sup.st first counting period in the N first counting periods.
[0517] A first time unit included in a 2.sup.nd second counting period in the two second counting periods is continuous with a last time unit included in a last counting period in the N first counting periods, and a last time unit included in the 2.sup.nd second counting period is continuous with a first time unit of the (i+1).sup.th AM group.
[0518] In another possible implementation, if a remainder obtained by dividing M by s is r, the two second counting periods include r time units, and r is an integer greater than or equal to 1 and less than s. In this possible implementation, the remainder obtained by dividing M by s is used to determine a quantity of time units included in the two second counting periods.
[0519] In another possible implementation, each slot included in the first calendar corresponds to only a part of the plurality of logical lanes.
[0520] In another possible implementation, if a quantity of slots included in the first calendar is equal to a quantity of logical lanes included in the plurality of logical lanes, the slots included in the first calendar one-to-one correspond to the logical lanes included in the plurality of logical lanes.
[0521] In another possible implementation, if a quantity of logical lanes included in the plurality of logical lanes is equal to K multiplied by a quantity of slots included in the first calendar, and K is an integer greater than or equal to 2, each slot of the first calendar corresponds to K logical lanes in the plurality of logical lanes, and the K logical lanes corresponding to different slots of the first calendar are different.
[0522] In another possible implementation, if a quantity of slots included in the first calendar is equal to K multiplied by a quantity of logical lanes included in the plurality of logical lanes, and K is an integer greater than or equal to 2, each of the plurality of logical lanes corresponds to K slots of the first calendar, and the K slots corresponding to different logical lanes are different.
[0523] In another possible implementation, the processing unit 1720 is configured to: [0524] determine slots, of the first calendar, separately corresponding to the M time units between the i.sup.th AM group and the (i+1).sup.th AM group; and [0525] determine, based on the i.sup.th AM group and the slots, of the first calendar, separately corresponding to the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, the service flows corresponding to data separately carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0526] In another possible implementation, the i.sup.th AM group indicates service flows separately corresponding to the slots of the first calendar, and the processing unit 1720 is configured to: [0527] determine, based on the i.sup.th AM group and the slots, of the first calendar, separately corresponding to the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, the service flows corresponding to data separately carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0528] In another possible implementation, a first AM in the i.sup.th AM group indicates a slot, of the first calendar, that corresponds to a first time unit of a 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, and the processing unit 1720 is configured to: [0529] determine, based on the first AM in the i.sup.th AM group, the slots, of the first calendar, separately corresponding to the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0530] The second communication apparatus 1700 shown in
[0531] The transceiver unit 1710 is configured to receive, in M time units, first data that is of a plurality of service flows and that is sent by a first communication apparatus by using a plurality of logical lanes, where M is an integer greater than or equal to 2.
[0532] The processing unit 1720 is configured to determine service flows corresponding to data separately carried in the M time units.
[0533] There is a mapping relationship between the plurality of service flows and a slot of a first calendar, and the first calendar includes s slots.
[0534] The M time units between the i.sup.th AM group and the (i+1).sup.th AM group include N first counting periods and at least one second counting period, s is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0535] Each time unit of the first counting period corresponds to one slot of the first calendar, and different time units of a same first counting period correspond to different slots of the first calendar.
[0536] The second counting period includes only a part of the s time units, each time unit of the second counting period corresponds to one slot of the first calendar, and different time units of a same second counting period correspond to different slots of the first calendar.
[0537] In a possible implementation, the transceiver unit 1710 is further configured to: [0538] receive an i.sup.th AM group sent by the first communication apparatus, where i is an integer greater than or equal to 1; and [0539] receive an (i+1).sup.th AM group sent by the first communication apparatus.
[0540] The i.sup.th AM group and the (i+1).sup.th AM group are used to align the plurality of logical lanes, and a reception time interval between receiving the i.sup.th AM group by the transceiver unit 1710 from the first communication apparatus and receiving the (i+1).sup.th AM group by the transceiver unit 1710 from the first communication apparatus is the M time units.
[0541] In another possible implementation, the processing unit 1720 is configured to: determine slots, of the first calendar, separately corresponding to the M time units; and determine, based on the slots, of the first calendar, separately corresponding to the M time units, the service flows corresponding to data separately carried in the M time units.
[0542] In another possible implementation, the i.sup.th AM group indicates service flows corresponding to the slots of the first calendar, and the processing unit 1720 is configured to: [0543] determine, based on the i.sup.th AM group and the slots, of the first calendar, separately corresponding to the M time units, the service flows corresponding to data separately carried in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0544] In another possible implementation, a first AM in the i.sup.th AM group is used to identify a slot, of the first calendar, that corresponds to a first time unit of a 1.sup.st counting period in the M time units between the i.sup.th AM group and the (i+1).sup.th AM group, and the processing unit 1720 is configured to: [0545] determine, based on the first AM in the i.sup.th AM group, the slots, of the first calendar, separately corresponding to the M time units between the i.sup.th AM group and the (i+1).sup.th AM group.
[0546] It should be understood that for a specific process in which the units in the second communication apparatus 1700 perform the foregoing corresponding operations, refer to descriptions in the method embodiments. For brevity, details are not described herein again.
[0547] The first communication apparatus 1600 in the foregoing solutions has functions to implement corresponding operations performed by the first communication apparatus. The second communication apparatus 1700 in the foregoing solutions has functions to implement corresponding operations performed by the second communication apparatus. The functions may be implemented by hardware or software, or may be implemented by hardware by executing corresponding software. The hardware or the software includes one or more modules corresponding to the foregoing functions. For example, the transceiver unit may be replaced with a communication interface, and another unit such as a processing unit may be replaced with a processor, to respectively perform a sending operation, a receiving operation, and a related processing operation in the method embodiments. In this embodiment of this application, a communication interface of an apparatus is used by the apparatus to communicate with another device. For example, the communication interface may be a transmitter, a receiver, a transceiver, a circuit, a bus, a module, a pin, or another type of communication interface. This is not limited in this embodiment of this application.
[0548] In an implementation process, the processor may be configured to perform, for example, but not limited to, baseband-related processing, and the communication interface may be configured to perform, for example, but not limited to, information exchange. The foregoing components may be separately disposed on chips independent of each other, or at least some or all of the components may be disposed on a same chip. For example, the processor may further be divided into an analog baseband processor and a digital baseband processor. The analog baseband processor and the communication interface may be integrated on a same chip, and the digital baseband processor may be disposed on an independent chip. With continuous development of integrated circuit technologies, more components may be integrated on a same chip. For example, the digital baseband processor and a plurality of application processors (for example, but not limited to, a graphics processor and a multimedia processor) may be integrated on a same chip. The chip may be referred to as a system on chip (system on chip, SoC). Whether the components are separately disposed on different chips or integrated and disposed on one or more chips usually depends on a requirement of a product design. An implementation form of the component is not limited in this embodiment of this application.
[0549] It may be understood that the processor in the foregoing embodiments may separately implement, by executing program instructions by using a hardware platform having a processor and a communication interface, functions of the processor in any design in the foregoing embodiments of this application. In view of this, as shown in
[0550] In a possible implementation, if the communication apparatus 1800 is the first communication apparatus, the communication apparatus 1800 is configured to perform some or all of the operations performed by the first communication apparatus in the method embodiments. If the communication apparatus 1800 is the second communication apparatus, the communication apparatus 1800 is configured to perform some or all of the operations performed by the second communication apparatus in the method embodiments.
[0551] It should be understood that the first communication apparatus in
[0552] An embodiment of this application further provides a data transmission system. Refer to
[0553] It may be understood that the methods, the procedures, the operations, or the operations in the designs described in the embodiments of this application can be implemented in a one-to-one correspondence manner by computer software, electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on particular applications and design constraints of the technical solutions. For example, in terms of good universality, low costs, and decoupling between software and hardware, program instructions may be executed to implement the functions. For another example, in terms of system performance and reliability, a dedicated circuit may be used to implement the functions. A person of ordinary skill may use different methods to implement the described functions for each particular application. This is not limited herein.
[0554] According to the method provided in embodiments of this application, this application further provides a computer program product. The computer program product includes computer program code. When the computer program code is run on a computer, the computer is enabled to perform the method in the foregoing embodiments. The embodiments in this application may also be combined with each other.
[0555] According to the method provided in embodiments of this application, this application further provides a computer-readable medium. The computer-readable medium stores program code. When the program code is run on a computer, the computer is enabled to perform the method in the foregoing embodiments.
[0556] According to the method provided in embodiments of this application, this application further provides a chip. The chip includes a processor, and the processor is configured to perform operations in the method embodiments. In an embodiment, the chip further includes a memory. The memory is coupled to the processor.
[0557] In embodiments of this application, it should be noted that the method embodiments in embodiments of this application may be applied to the processor, or may be implemented by the processor. The processor may be an integrated circuit chip and has a signal processing capability. In an implementation process, operations in the method embodiments can be implemented by using a hardware-integrated logical circuit in the processor, or by using instructions in a form of software. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, to implement or perform the methods, the operations, and logical block diagrams that are disclosed in embodiments of this application. The general-purpose processor may be a microprocessor, any conventional processor, or the like.
[0558] It may be understood that the memory in embodiments of this application may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), used as an external cache. There are a plurality of different types of RAMs, such as a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchlink dynamic random access memory (SLDRAM), and a direct rambus random access memory (DR RAM).
[0559] It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in various embodiments of this application. The execution sequences of the processes should be determined based on functions and internal logic of the processes, and should not be construed as any limitation on the implementation processes of embodiments of this application.
[0560] It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for detailed working processes of the foregoing system, apparatus, and unit, refer to corresponding processes in the foregoing method embodiments. Details are not described herein again.
[0561] In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in another manner. For example, the described apparatus embodiment is merely an example. For example, division into the units is merely logical function division and may be other division during actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be implemented through some interfaces. The indirect coupling or communication connection between the apparatuses or units may be implemented in an electronic form, a mechanical form, or another form.
[0562] The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve objectives of the solutions of the embodiments.
[0563] In addition, functional units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units may be integrated into one unit. The integrated unit may be implemented in a form of hardware, or may be implemented in a form of a software functional unit.
[0564] When the integrated unit is implemented in the form of a software functional unit and is sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of this application essentially, or the part contributing to the current technology, or all or some of the technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the operations of the methods described in the embodiments of this application. The foregoing storage medium includes any medium that can store program code, for example, a USB flash drive, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disc.
[0565] The foregoing embodiments are merely intended for describing the technical solutions of this application, but not for limiting this application. Although this application is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments or make equivalent replacements to some technical features thereof, without departing from the scope of the technical solutions of the embodiments of this application.