System and method for managing packet data with variable metadata size

By dynamically adjusting the size of packet metadata, the problem of inefficient resource allocation in network communication systems is solved, achieving efficient packet processing and memory utilization, and optimizing network performance and power consumption.

CN121967525APending Publication Date: 2026-05-01AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LTD
Filing Date
2025-10-17
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies face problems such as inefficient memory utilization, memory fragmentation, and increased processing latency due to fixed metadata sizes when managing resource allocation for packets in network communication systems. They are particularly difficult to adapt to when dealing with different packet sizes and service conditions.

Method used

By configuring processors in a network communication system to dynamically adjust the metadata size of packets, and based on the determination that the metadata size exceeds a threshold, a portion of the packet is moved from one unit to another, or a new unit is created to accommodate larger metadata, ensuring optimized resource allocation and memory utilization.

Benefits of technology

It achieves efficient resource allocation under different packet sizes and processing requirements, avoids memory waste and latency, optimizes network performance and power consumption, and ensures the efficiency and flexibility of packet processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967525A_ABST
    Figure CN121967525A_ABST
Patent Text Reader

Abstract

The present technology relates to a system and method for managing packet data having a variable metadata size, and a device for packet processing in a network. In an embodiment, the apparatus includes a first port configured to receive a first packet. The apparatus further includes a processor coupled to the first port, the processor configured to generate first metadata associated with the first packet and determine a first size of the first metadata. The apparatus also includes a buffer coupled to the processor configured to store the first packet and the first metadata. Based on a determination that the first size exceeds a predefined threshold, the processor is further configured to move a portion of the first packet to accommodate larger metadata. This configuration allows for dynamic adjustment of packet data and metadata storage, thereby optimizing handling of packets with different metadata requirements. Other embodiments are also present.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This technology relates to network communication systems and methods. Background Technology

[0002] As modern network communication systems become increasingly complex and data demands rise, there is a growing need for improved methods to manage and store packets in network devices. With networks handling larger volumes of traffic, managing the allocation of resources such as memory and processing power becomes increasingly challenging. Applications such as cloud computing, telecommunications, and data centers rely on the efficient processing and transmission of packets to maintain system performance.

[0003] Various methods for improving packet management in network communications have been explored, but these methods are often insufficient. Novel and improved systems and methods are needed. Summary of the Invention

[0004] In one aspect, this disclosure relates to an apparatus comprising: a first port configured to receive a first packet, the first packet including a first unit and a second unit; a processor coupled to the first port, the processor configured to generate first metadata associated with the first packet and determine a first size of the first metadata, the first metadata including a first field indicating the first size of the first metadata; and a buffer coupled to the processor, the buffer configured to store the first packet and the first metadata; wherein the processor is configured to move a portion of the first packet from the first unit to the second unit based on a determination that the first size of the first metadata exceeds a first threshold; and wherein the processor is configured to generate a third unit based on a determination that the first size of the first metadata exceeds a second threshold, and the second threshold is greater than or equal to the first threshold.

[0005] On the other hand, this disclosure relates to an apparatus comprising: a first port configured to receive a first packet, the first packet including a first unit and a second unit; a processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and determine a first size of the first metadata, the first metadata including a first field indicating the first size of the first metadata; a buffer coupled to the processor, the buffer being configured to store the first packet and the first metadata; and a second port coupled to the buffer, the second port being configured to transmit the first packet based on the first metadata; wherein the processor is further configured to move a portion of the first packet from the first unit to the second unit based on a determination that the first size of the first metadata exceeds a first threshold.

[0006] On the other hand, this disclosure relates to an apparatus comprising: a first port configured to receive a first packet and a second packet; a processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and second metadata associated with the second packet; and a buffer coupled to the processor, the buffer being configured to store the first packet and the second packet; wherein the processor is further configured to determine a first size of the first metadata and a second size of the second metadata, the second size being different from the first size; wherein the first metadata includes a first field indicating the first size of the first metadata, and the second metadata includes a second field indicating the second size of the second metadata; and wherein the processor is further configured to move a portion of the first packet based on a determination that the first size of the first metadata exceeds a first threshold. Attached Figure Description

[0007] A further understanding of the nature and advantages of particular embodiments can be achieved by referring to the remainder of the specification and the drawings, wherein similar reference numerals are used to refer to similar components. In some examples, sublabels are associated with reference numerals to indicate one of a plurality of similar components. When reference is made to a reference numeral without specifying an existing sublabel, it is desirable to refer to all such plurality of similar components.

[0008] Figure 1 This is a schematic block diagram illustrating various embodiments of a group processing system according to the present technology.

[0009] Figure 2 This is a schematic diagram illustrating the structure of data grouping according to various embodiments of the present technology.

[0010] Figures 3A to 3B This is a schematic block diagram illustrating the structure of a group with metadata according to various embodiments of the present technology.

[0011] Figure 4 This is a schematic block diagram illustrating various embodiments of a group processing system according to the present technology.

[0012] Figure 5 This is a schematic block diagram illustrating various embodiments of a group processing system according to the present technology.

[0013] Figures 6A to 6C This is a schematic diagram illustrating instances of how variable metadata is packaged together with grouped data according to various embodiments of the present technology. Detailed Implementation

[0014] This technology relates to an apparatus for packet processing in a network. In one embodiment, the apparatus includes a first port configured to receive a first packet. The apparatus further includes a processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and determine a first size of the first metadata. The apparatus also includes a buffer coupled to the processor, configured to store the first packet and the first metadata. Based on the determination that the first size exceeds a predefined threshold, the processor is further configured to move a portion of the first packet to accommodate larger metadata. This configuration allows for dynamic adjustment of packet data and metadata storage, thereby optimizing the handling of packets with different metadata requirements. Other embodiments also exist.

[0015] To facilitate packet transmission and routing, metadata is typically used to provide basic information such as routing details, security labels, and priorities. Some methods for managing packet transmission may involve allocating a fixed size of metadata associated with each packet, regardless of actual data requirements. While simple, these methods can lead to inefficient memory utilization, as smaller packets waste valuable space while larger packets may lack the necessary metadata capacity. Furthermore, fixed-size methods can cause memory fragmentation and increased processing latency, as the system struggles to adapt to varying packet sizes and service conditions. Over time, these inefficiencies can lead to network bottlenecks and overall performance degradation.

[0016] One general aspect includes a device comprising a first port configured to receive a first packet, the first packet comprising a first unit and a second unit. The device further includes a processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and determine a first size of the first metadata, the first metadata including a first field indicating the first size of the first metadata. The device further includes a buffer coupled to the processor, the buffer being configured to store the first packet and the first metadata. The processor is configured to move a portion of the first packet from the first unit to the second unit based on a determination that the first size of the first metadata exceeds the first threshold. The processor is configured to generate a third unit based on a determination that the first size of the first metadata exceeds the second threshold, and the second threshold is greater than or equal to the first threshold.

[0017] The implementation may include one or more of the following features. The device further includes a controller coupled to the first port, the controller being configured to manage the transmission of the first packet. The device further includes a second port coupled to the buffer, the second port being configured to transmit the first packet. The first metadata includes a source address or a destination address. The first metadata includes a priority associated with the first packet. The processor is configured to send a first signal to the first port in response to generating the third unit. The first metadata is configured in the first unit. The first metadata is configured in the second unit. The first port is configured to receive a second packet, and the processor is configured to generate second metadata associated with the second packet and determine a second size of the second metadata, the second size being different from the first size.

[0018] According to another embodiment, the present technology provides an apparatus including a first port configured to receive a first packet, the first packet including a first unit and a second unit. The apparatus further includes a processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and determine a first size of the first metadata, the first metadata including a first field indicating the first size of the first metadata. The apparatus further includes a buffer coupled to the processor, the buffer being configured to store the first packet and the first metadata. The apparatus further includes a second port coupled to the buffer, the second port being configured to transmit the first packet based on the first metadata. The processor is further configured to move a portion of the first packet from the first unit to the second unit based on a determination that the first size of the first metadata exceeds a first threshold.

[0019] The implementation may include one or more of the following features. The device further includes a controller coupled to the first port, the controller being configured to manage the transmission of the first packet. The first metadata includes a source address or a destination address. The processor is further configured to generate a third unit based on a determination that the first size of the first metadata exceeds a second threshold, and the second threshold is greater than or equal to the first threshold. The first metadata is configured in the first unit. The first metadata includes at least one of a source address, a destination address, a priority, or a service type identifier. The first port is configured to receive a second packet, and the processor is configured to generate second metadata associated with the second packet and determine a second size of the second metadata, the second size being different from the first size.

[0020] According to another embodiment, the present technology provides an apparatus including a first port configured to receive a first packet and a second packet. The apparatus further includes a processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and second metadata associated with the second packet. The apparatus further includes a buffer coupled to the processor, the buffer being configured to store the first packet and the second packet. The processor is further configured to determine a first size of the first metadata and a second size of the second metadata, the second size being different from the first size. The first metadata includes a first field indicating the first size of the first metadata, and the second metadata includes a second field indicating the second size of the second metadata. The processor is further configured to move a portion of the first packet based on a determination that the first size of the first metadata exceeds a first threshold.

[0021] The implementation may include one or more of the following features: The first packet includes a first unit and a second unit, and the first metadata is configured in the first unit and the second unit. The device further includes a controller coupled to the first port, the controller being configured to manage the transmission of the first packet based on the first metadata. The processor is configured to generate a third unit in the first packet based on a determination that the first size of the first metadata exceeds a second threshold, the second threshold being greater than or equal to the first threshold.

[0022] The following description is presented to enable those skilled in the art to make and use the invention, and is incorporated into the context of a particular application. Various modifications and uses in different applications will be apparent to those skilled in the art, and the general principles defined herein can be applied to a wide range of embodiments. Therefore, the invention is not intended to be limited to the presented embodiments, but should be given the widest scope consistent with the principles and novel features disclosed herein.

[0023] The following detailed description elucidates numerous specific details to provide a more thorough understanding of the technology. However, it will be obvious to those skilled in the art that the technology can be practiced without being limited to these specific details. In other instances, well-known structures and devices are shown in block diagrams rather than in detail to avoid obscuring the technology.

[0024] Readers should note all papers and documents filed concurrently with and made publicly available for examination with this specification, and the contents of all such papers and documents are incorporated herein by reference. Unless otherwise expressly stated, all features disclosed in this specification (including any appended claims, abstracts, and figures) may be replaced by alternative features serving the same, equivalent, or similar purpose. Therefore, unless otherwise expressly stated, each disclosed feature is merely one example of a series of generally equivalent or similar features.

[0025] Furthermore, no element in the claims that is not expressly stated as a “means” or “step” for performing the specified function shall be construed as a “means” or “step” as referred to in paragraph 6 of section 112 of 35 USC. Specifically, the use of “step” or “action” in the claims herein is not intended to invoke paragraph 6 of 35 USC 112.

[0026] When an element is referred to herein as "connected" or "coupled" to another element, it should be understood that the element may be directly connected to the other element, or that there may be an intermediary element between the elements. In contrast, when an element is referred to herein as "directly connected" or "directly coupled" to another element, it should be understood that there is no intermediary element in the "direct" connection between the elements. However, the presence of a direct connection does not preclude the possibility of other connections with intermediary elements.

[0027] Furthermore, the terms left, right, front, back, top, bottom, forward, reverse, clockwise, and counterclockwise are used for interpretive purposes only and are not limited to any fixed direction or orientation. Rather, they are used only to indicate the relative position and / or orientation between the various parts of an object and / or component.

[0028] Furthermore, for ease of description, the methods and processes described herein may be described in a specific order. However, it should be understood that, unless the context otherwise indicates, intermediate processes may occur before and / or after any part of the described process, and various other procedures may be reordered, added, and / or omitted according to various embodiments.

[0029] Unless otherwise indicated, all figures used herein to indicate quantity, size, etc., shall be understood to be modified by the term “about” in all cases. In this application, unless otherwise specifically indicated, the use of the singular includes the plural, and unless otherwise indicated, the use of the terms “and” and “or” means “and / or”. Furthermore, the terms “including” and “having,” as well as other forms of use such as “includes,” “included,” “has,” “have,” and “had,” shall be considered non-exclusive. Additionally, terms such as “element” or “component” cover elements and components comprising one unit as well as elements and components comprising more than one unit, unless otherwise specifically stated.

[0030] As used herein, the phrase “at least one of…” preceding a series of items that use the terms “and” or “or” to separate any one of the items modifies a list as a whole, not each member of the list (i.e., each item). The phrase “at least one of…” does not require selection of at least one of each of the listed items; rather, it allows the meaning to include at least one of any of the items and / or at least one of any combination of items. By way of example, the phrases “at least one of A, B, and C” or “at least one of A, B, or C” each refer to only A, only B, or only C; and / or any combination of A, B, and C. This description is explicitly used where it is desired to select “at least one of each of A, B, and C” or alternatively, “at least one of A, at least one of B, and at least one of C.”

[0031] Figure 1 This is a schematic block diagram illustrating various embodiments of a packet processing system 100 according to the present technology. This diagram is merely illustrative and should not unduly limit the scope of the claims. Many variations, alternatives, and modifications will be recognized by those skilled in the art.

[0032] System 100 can be part of various types of network devices (e.g., switches, routers, gateways, or firewalls) designed to handle packet processing in a network infrastructure. It can also be integrated into network interface controllers (NICs), load balancers, or edge devices that manage data flow between different segments of a network. Depending on the application, System 100 can be used with various networking protocols, including but not limited to Ethernet, Internet Protocol (IP), Multiprotocol Label Switching (MPLS), Transmission Control Protocol / Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Wi-Fi, cellular network protocols (e.g., 4G, 5G), and / or similar protocols.

[0033] In some embodiments, system 100 is configured to receive input data packets. For example, the term "packet" or "data packet" may refer to a unit of data transmitted across a network. Input data packets may originate from various sources, such as client devices, remote servers, edge devices in a cloud computing environment, Internet of Things (IoT) networks, telecommunications systems, and / or the like. Input data packets may contain various types of information, including but not limited to user data, application data, multimedia streams, sensor data, and / or the like.

[0034] In various implementations, input data packets pass through ingress packet processing level 102, where metadata is generated and applied to the packets. The term "metadata" can refer to additional information associated with a packet that facilitates its processing, routing, or disposal across the network. Metadata may include, but is not limited to, routing information (e.g., source and destination addresses), priority, service type identifier, error correction codes, security information, and / or the like. Metadata plays a crucial role in helping system 100 apply the correct protocols and policies to ensure packets are disposed of according to network requirements.

[0035] Once metadata is generated in the ingress packet processing level 102, packets, along with their metadata, can be forwarded to the packet switching level 103. At the packet switching level 103, the metadata is used to make decisions about how packets should be routed across the network. This level ensures that packets are directed to their appropriate destinations while adhering to network protocols, security requirements, and prioritization rules.

[0036] After a packet switching decision is made, the packet proceeds to egress packet processing stage 104, where it is prepared for transmission from the system to its next destination. This may involve reformatting the packet to match the requirements of the outbound interface or applying additional security or Quality of Service (QoS) adjustments based on real-time network conditions.

[0037] In various implementations, the size of the metadata can vary depending on the complexity of the packet's processing requirements. For example, packets traveling through multiple network nodes or requiring enhanced security may generate a large amount of metadata, while simple packets with minimal routing or security requirements may require only a small amount of metadata.

[0038] As the complexity of networks and their associated characteristics increases, the size of metadata required for each packet processing event also increases. This increase in metadata size incurs overhead on the system's internal bandwidth, as both data paths and memory storage must allocate more resources to transmit and store larger metadata, leading to increased clock frequency requirements. Higher clock frequencies directly translate to higher power consumption, as the system must operate at faster rates to maintain line-speed performance, resulting in thermal management challenges and reduced overall efficiency.

[0039] In some cases, a system may attempt to compensate by increasing the width of the data path and memory storage to accommodate the extra bytes of metadata. However, this comes at a significant cost in terms of device area (e.g., memory and wiring) and power consumption, as larger memory buses and wider data paths consume more power and occupy more physical space.

[0040] Some approaches address this issue by establishing a fixed metadata size to account for the maximum possible metadata that any given packet might require. However, these approaches can lead to inefficient memory usage, as packets that don't require full metadata allocation waste valuable storage space. Furthermore, the need to maintain line-rate switching performance with a fixed metadata size increases overall power consumption because the system must operate at higher frequencies to accommodate the fixed overhead, further complicating power management and thermal performance. Therefore, handling packets with varying metadata sizes remains a significant challenge for ensuring efficient packet processing in modern network environments.

[0041] Figure 2 This is a schematic diagram illustrating the structure of a data packet 200 according to various embodiments of the present technology. This figure is merely illustrative and should not unduly limit the scope of the claims. Those skilled in the art will recognize many variations, alternatives, and modifications. As shown, packet 210 represents a complete data packet prior to any processing. It serves as the basic structure of the packet, containing data to be processed by a network device (e.g., Figure 1 The system 100 receives and processes raw data.

[0042] Packet 220 describes a processed packet divided into several units. For example, packet 220 may include units 221 and 222. For example, the term "unit" may refer to a segment of data within a packet. Units are used to segment packets into manageable portions for processing, routing, or storage within a network device. Units may contain portions of the packet data or additional control information (e.g., metadata). In some instances, unit 221 may represent the start of a packet (SOP), which may contain the initial segment of packet data. The SOP unit is the first in the sequence of units that make up the packet and can be used to indicate the start of the packet during processing and transmission. In some cases, unit 222 may represent the end of a packet (EOP), which may contain the final portion of the packet data (e.g., portion 223). In various instances, packet 220 may further include an unused portion 224, which represents additional space allocated within unit 222 that is not occupied by data.

[0043] As an example, packet 230 illustrates a scenario where packets are processed using standard metadata. For instance, packet 230 contains an SOP unit 231 and an EOP unit 232. Packet 230 may further contain metadata 233, which may be stored in the SOP unit 231. The actual packet data may begin at portion 234 after the metadata 233 and continue into subsequent units 232 (e.g., portion 235). In some cases, packet 230 may only require standard or a small amount of metadata (e.g., 16 bytes), which does not fully utilize the available space in the unit, leaving an unused portion 236. Examples of packet streams using standard metadata sizes may include unicast services, such as IPv4 or IPv6 unicast packets, and tunneling protocols, such as IP-in-IP, VXLAN, and Generic Routing Encapsulation (GRE).

[0044] In various implementations, packet 240 describes a packet that requires larger metadata (e.g., due to more complex processing or routing requirements). For example, packet 240 includes units 241, 242, and 243. Packet 240 may further include metadata 244, which may be stored in unit 241. Actual packet data may begin at portion 245 within unit 241 and continue into subsequent units 242. In some implementations, metadata 244 is larger than standard metadata, thus occupying a large portion of unit 241. Therefore, only a small portion of the actual packet data fits within unit 241, with the remainder shifted to subsequent units. Packet flows using larger metadata sizes may contain multicast or unicast services with instrumentation. For example, multicast services may include L2 multicast, IPv4, or IPv6 multicast, and instrumentation services may involve higher-level processes for monitoring network performance, reliability, and security.

[0045] In various embodiments, if the size of metadata 244 exceeds the available space within packet 240, a new unit 243 can be created to accommodate the excess data. This allows the system to efficiently handle the increased metadata size while maintaining packet integrity. Unused portions 246 in unit 243 represent additional unoccupied space when the packet size does not fully utilize the available unit capacity. Other packet flows that may require larger metadata sizes may include mirroring or replication to CPU flows. These flows involve creating packet copies that are switched to egress ports, where the copies are directed to “mirrored” ports or CPU ports. These copies are typically created to handle unknown protocol types or erroneous packets and are beneficial for network debugging and diagnostics.

[0046] As explained above, the amount of metadata required for each group is not fixed, but varies based on the complexity of the group and specific processing requirements. Figure 2The example demonstrates how the system dynamically adjusts the size of its metadata based on the individual processing needs of each packet. By efficiently distributing packet data across multiple units, the system can adapt to different metadata sizes, ensuring that both simple and complex packets are processed effectively without introducing unnecessary memory or bandwidth overhead.

[0047] Figures 3A to 3B These are schematic block diagrams illustrating the structure of grouping with metadata according to various embodiments of the present technology. These diagrams are merely illustrative and should not unduly limit the scope of the claims. Many variations, alternatives, and modifications will be recognized by those skilled in the art.

[0048] Depending on the implementation plan, metadata can be configured in different locations within the unit. For example, such as Figure 3A As shown, group 300 may contain multiple units, where unit 301 represents an SOP and unit 302 represents an EOP. Group 300 may contain metadata 303, which may be located at the end of the group (e.g., within EOP unit 302). In some instances, such as Figure 3B As shown, group 310 may contain multiple units, such as SOP unit 311, group intermediate (MOP) unit 312, and EOP unit 313. Group 310 may contain metadata 314, which may be configured in the middle portion of the group (e.g., within intermediate unit 312). The flexibility to configure metadata in various locations within the group ensures that the system can handle different metadata sizes while efficiently utilizing available memory. By allowing metadata to be placed in different units, the system can optimize resource allocation, minimize memory overhead, and ensure smooth processing of groups regardless of their complexity.

[0049] Figure 4 This is a schematic block diagram illustrating various embodiments of a packet processing system 400 according to the present technology. This diagram is merely illustrative and should not unduly limit the scope of the claims. Many variations, alternatives, and modifications will be recognized by those skilled in the art.

[0050] System 400 can be part of various types of network devices (such as switches, routers, gateways, or firewalls) designed to handle packet processing in network infrastructure. It can also be integrated into network interface controllers (NICs), load balancers, or edge devices that manage data flow between different segments of the network. Depending on the application, System 400 can be used with various networking protocols, including but not limited to Ethernet, Internet Protocol (IP), Multiprotocol Label Switching (MPLS), Transmission Control Protocol / Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Wi-Fi, cellular network protocols (e.g., 4G, 5G), and / or similar protocols. Additionally, System 400 can be implemented in various switching devices, such as enterprise networking rack top (TOR) switches or pizza box systems, and in data center CLOS topology networks where multi-tiered hierarchical switches are used. It can also be deployed in artificial intelligence (AI) systems, where switching chips interconnect processing units with their associated NIC devices to facilitate high-bandwidth communication for AI model operation.

[0051] In various implementations, system 400 includes one or more ports 401 configured to receive incoming data packets. As an example, the one or more ports 401 may include a first port 401a, a second port 402b, and a third port 401c. For example, the term "port" may refer to a physical or logical interface on a network device used to receive or transmit data packets. Examples of ports may include Ethernet ports, fiber optic interfaces, network interfaces, and / or the like. In some instances, the first port 401a is configured to receive a first packet, and may include a first unit and a second unit. In some cases, the first port 401a may also be configured to receive a second packet.

[0052] In some embodiments, system 400 further includes a scheduler 402 coupled to one or more ports 401 (e.g., a first port 401a). Scheduler 402 may be configured to manage the order in which packets are processed and transmitted across the system. For example, the term "scheduler" may refer to a hardware or software component responsible for organizing packet flows within a network device. Scheduler 402 determines the transmission order of packets based on various factors, such as packet priority, bandwidth allocation, queue status, or QoS policies. In some instances, scheduler 402 is configured to monitor incoming data traffic from one or more ports 401 and determine the order in which packets are delivered to subsequent processing levels. For example, scheduler 402 may be configured to manage the transmission of a first packet and / or a second packet.

[0053] In some instances, system 400 further includes a processor 408 coupled to scheduler 402 and / or one or more ports 401. For example, the term "processor" may refer to any hardware or software component configured to analyze, modify, or manage data packets. Examples of processors may include, but are not limited to, central processing units (CPUs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs), network processors, application-specific integrated circuits (ASICs), and / or the like.

[0054] In various implementations, processor 408 is configured to receive packets 403 from one or more ports 401 and generate associated metadata 406 for each packet. For example, received data packets may initially be stored in storage device 404, which is configured to temporarily hold packet data for further processing. Storage device 404 may include, but is not limited to, random access memory (RAM), dynamic RAM (DRAM), static RAM (SRAM), flash memory, solid-state drive (SSD), pseudo static random access memory (PSRAM), and / or the like.

[0055] In some embodiments, processor 408 includes packet processing unit 405, which can be configured to analyze data packets 403 (e.g., a first packet) and generate associated metadata 406 (e.g., first metadata). For example, packet processing unit 405 may determine relevant packet-specific information required to generate metadata, such as routing paths, security certificates, or priorities. During this time, while generating metadata, packet data may be stored in storage device 404. The generated metadata 406 provides basic information for processing and routing packets across the network. For example, metadata 406 may include, but is not limited to, routing information (e.g., source and destination addresses), priorities, service type identifiers, error correction codes, security information, and / or the like.

[0056] After packet processing and metadata generation are complete, the unit packing unit 407 retrieves the packet data from storage device 404 and combines it with the generated metadata 406. In various instances, the unit packing unit 407 may divide the packets and metadata into units (or cells) stored in buffer 409 for transmission. In various instances, buffer 409 is configured to temporarily hold packets until they are ready for transmission across the network. Buffer 409 may include, but is not limited to, shared memory buffers, first-in-first-out (FIFO) buffers, and / or similar devices. Buffer 409 helps regulate packet flow between different processing levels and can absorb latency, especially during network congestion or temporary bottlenecks.

[0057] In some instances, processor 408 is configured to generate first metadata associated with the first packet and determine a first size of the first metadata. For example, the size of the metadata may refer to the amount of information required to describe and process the packet. Depending on the implementation, the size of the metadata may vary based on the complexity and requirements of the packet. For example, packets requiring minimal processing or simple routing may have smaller metadata, while packets requiring more advanced handling—such as packets requiring security processing or QoS guarantees—may require larger metadata.

[0058] In some embodiments, the first metadata may include a first field indicating a first size of the first metadata. The first field can be used to inform downstream processing levels (e.g., the egress side) of the size of the metadata accompanying the packet. By using the first field, the egress processing pipeline is informed of the metadata size in advance, thereby allowing for efficient handling and appropriate resource allocation during egress transmission.

[0059] In various embodiments, processor 408 dynamically adjusts the metadata size based on the needs of each packet. For example, the system may define a standard metadata size (e.g., 16 bytes), which is sufficient for most packet types requiring basic processing. If the metadata size is less than or equal to the predefined standard size, the packet can be processed and stored in the allocated space without any modification. In this scenario, the space already allocated for the metadata is sufficient, and no additional resources are required. An example of a packet with standard metadata is... Figure 2 Group 230. As shown, group 230 contains metadata 233, which fits perfectly within the available space allocated for the metadata, ensuring that most of the data in the group remains intact and minimizing memory usage.

[0060] For packets requiring more complex processing (such as encryption, multi-hop routing, or priority management), the metadata size may exceed the standard size. In such cases, the space allocated for metadata can be increased to accommodate a larger size before the storable packet. An example of a packet with large metadata is... Figure 2 In the group 240. As shown, when metadata 244 exceeds the standard size, processor 408 can move a portion of the group data into a subsequent unit, thereby ensuring that there is sufficient space to store the expanded metadata within the group.

[0061] In some cases, metadata may require the creation of new units to accommodate a larger size, as illustrated in the additional units (e.g., unit 243) generated for packet 240. It should be understood that the increase in metadata space is applied only to the specific packets in which larger metadata is determined to be needed, thereby minimizing overall overhead and preventing unnecessary memory usage. In various implementations, when a new unit is generated, processor 408 may generate a first signal and send it to the transmitting module (e.g., port 401 or scheduler 402). The first signal notifies the transmitting module that a new unit has been generated due to the larger metadata size and serves to moderate the transmission of additional units as needed. Additionally, a compensation mechanism may be applied to the specific port where the new unit was generated, thereby ensuring a fair bandwidth distribution across all ports.

[0062] By adjusting metadata size only when necessary, System 400 avoids unnecessary memory usage and ensures efficient data storage without the risk of buffer overflows. Furthermore, System 400 maintains balanced traffic by ensuring the transmission of new generation units for larger metadata without disrupting cross-port bandwidth allocation or fairness. This dynamic adjustment helps optimize both power consumption and performance, while ensuring network resources are fairly shared across all packets and ports.

[0063] Figure 5 This is a schematic block diagram illustrating various embodiments of a packet processing system 500 according to the present technology. This diagram is merely illustrative and should not unduly limit the scope of the claims. Many variations, alternatives, and modifications will be recognized by those skilled in the art.

[0064] In various implementations, system 500 includes one or more ingress data paths and egress data paths connected via a central switching architecture. It can be deployed in various network devices (e.g., switches or routers) and can also be used in data center or cloud computing environments, where high-performance packet switching is beneficial in artificial intelligence and machine learning systems. System 500 processes packets arriving from one or more ingress ports and routes the packets through appropriate egress ports based on metadata generated for each packet.

[0065] As shown, system 500 includes one or more ingress ports 501, which may be coupled to one or more ingress processing units (e.g., 502a and 502b). In some instances, ingress processing units 502a and 502b may be configured to process incoming packets and generate associated metadata. These packets, along with their associated metadata, may then be forwarded to switching architecture 503, which is configured to route the packets to the appropriate egress path based on the routing and processing information provided in the metadata. This ensures that packets are routed efficiently while adhering to network protocols and prioritization rules.

[0066] After passing through switching architecture 503, the packet and its metadata may reach one or more egress processing units (e.g., 504a and 504b). Egress processing units 504a and 504b may be configured to prepare the packet for transmission from system 500 via one or more egress ports 505. This may involve additional formatting, such as adjusting the packet header or applying security features before the packet leaves the system.

[0067] According to the implementation plan, System 500 can be designed to accommodate variable metadata sizes. This ability to dynamically adjust metadata sizes allows System 500 to handle a wide range of packet types and processing scenarios, thereby optimizing memory usage and ensuring efficient power consumption while maintaining high throughput and low latency.

[0068] Figures 6A to 6C These are schematic diagrams illustrating how variable metadata is packaged together with grouped data according to various embodiments of the present technology, example 600. These figures are merely illustrative and should not unduly limit the scope of the claims. Many variations, alternatives, and modifications will be recognized by those skilled in the art.

[0069] like Figure 6A As shown, data packets from the storage device can be processed in the processing unit 601 (e.g., Figure 4 The data is processed in the cell packing unit 407, where metadata arrives during the cell packing process. The processing unit 601 may include a first-in, first-out (FIFO) structure for temporary storage and management of data packets. FIFO ensures that packet units are processed in the same order they were received, which helps maintain the integrity of the data stream and the order of packet transmission.

[0070] Metadata arriving during the packaging process adds additional information to the packets, such as routing paths, security certificates, and / or other processing instructions. Incoming data packets may contain one or more units, such as a start-of-packet (SOP) unit (e.g., "S"), an end-of-packet (EOP) unit (e.g., "E"), and one or more middle-of-packet (MOP) units (e.g., "1" and "2"). Metadata (e.g., MPB) can be configured at different locations within the packet. For example, it can be inserted into an SOP unit, or if more metadata space is needed, the system can create new units (e.g., unit "3") to accommodate larger metadata. The packet data is then shifted accordingly, with portions of the original data distributed across multiple units (e.g., SOP, MOP1, MOP2) to ensure that metadata is stored correctly without overflow or data loss.

[0071] like Figure 6BAs shown, data packets from the storage device can be processed in processing unit 602, which may include a FIFO structure to maintain the order of packet units. In various instances, a packet may contain one or more units (e.g., "S", "1", "2", "3"). For example, metadata may be inserted into an SOP unit (e.g., unit "S"). In some instances, inserting metadata may require moving portions of the packet data into existing units. In some cases, additional units (e.g., units "4" and "5") may be created to ensure that the remainder of the original packet data, as well as the extended metadata, can be correctly packaged and stored.

[0072] like Figure 6C As shown, data packets from the storage device can be processed in processing unit 603, which may include a FIFO structure to maintain the order of packet units. In some instances, data packets may contain one or more segments, each of which may contain one or more units. For example, a data packet may contain two repeating segments (e.g., the sequence "S12E"). The arrival of metadata during the unit packing process causes the packet to be repackaged for transmission. In some instances, metadata may be inserted into SOP units, and packets may be split into smaller segments, followed by the remainder of the original SOP and MOP units.

[0073] In various instances, packet expansion due to larger metadata can cause the original EOP unit to split into two parts (e.g., new units "3" and "E"). This ensures that the packet can accommodate the expanded metadata without losing data integrity. The redistribution of data across these expanded units can also affect subsequent packets, as illustrated in the figure. For example, when an EOP unit is split and a new unit is created, subsequent packets may be delayed because the expansion of the current packet requires more time to process and transmit. In some cases, this adjustment requires feedback to the port or scheduler to ensure that the expanded packet can be transmitted without interrupting the overall packet flow, as the additional time required for transmission must be accounted for.

[0074] While the foregoing is a complete description of specific embodiments, various modifications, alternative constructions, and equivalents may be used. Therefore, the foregoing description and illustrations should not be construed as limiting the scope of the technology as defined by the appended claims.

Claims

1. An apparatus comprising: A first port is configured to receive a first packet, the first packet comprising a first unit and a second unit; A processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and determine a first size of the first metadata, the first metadata including a first field indicating the first size of the first metadata; and A buffer coupled to the processor, the buffer being configured to store the first packet and the first metadata; The processor is configured to move a portion of the first packet from the first unit to the second unit based on a determination that the first size of the first metadata exceeds a first threshold; and The processor is configured to generate a third unit based on a determination that the first size of the first metadata exceeds a second threshold, and the second threshold is greater than or equal to the first threshold.

2. The device of claim 1, further comprising a controller coupled to the first port, the controller being configured to manage the transmission of the first packet.

3. The device of claim 1, further comprising a second port coupled to the buffer, the second port being configured to transmit the first packet.

4. The device according to claim 1, wherein the first metadata includes a source address or a destination address.

5. The device of claim 1, wherein the first metadata includes a priority associated with the first group.

6. The device of claim 5, wherein the processor is configured to send a first signal to the first port in response to generating the third unit.

7. The device of claim 1, wherein the first metadata is configured in the first unit.

8. The device of claim 1, wherein the first metadata is configured in the second unit.

9. The device of claim 1, wherein the first port is configured to receive a second packet, and the processor is configured to generate second metadata associated with the second packet and determine a second size of the second metadata, the second size being different from the first size.

10. An apparatus comprising: A first port is configured to receive a first packet, the first packet comprising a first unit and a second unit; A processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and determine a first size of the first metadata, the first metadata including a first field indicating the first size of the first metadata; A buffer coupled to the processor, the buffer being configured to store the first packet and the first metadata; and A second port, coupled to the buffer, is configured to transmit the first packet based on the first metadata; The processor is further configured to move a portion of the first group from the first unit to the second unit based on a determination that the first size of the first metadata exceeds a first threshold.

11. The device of claim 10, further comprising a controller coupled to the first port, the controller being configured to manage the transmission of the first packet.

12. The device of claim 10, wherein the first metadata is configured in the second unit.

13. The device of claim 10, wherein the processor is further configured to generate a third unit based on a determination that the first size of the first metadata exceeds a second threshold, and the second threshold is greater than or equal to the first threshold.

14. The device of claim 10, wherein the first metadata is configured in the first unit.

15. The device of claim 10, wherein the first metadata includes at least one of a source address, a destination address, a priority, or a service type identifier.

16. The device of claim 10, wherein the first port is configured to receive a second packet, and the processor is configured to generate second metadata associated with the second packet and determine a second size of the second metadata, the second size being different from the first size.

17. An apparatus comprising: The first port is configured to receive the first packet and the second packet; A processor coupled to the first port, the processor being configured to generate first metadata associated with the first packet and second metadata associated with the second packet; and A buffer coupled to the processor, the buffer being configured to store the first packet and the second packet; The processor is further configured to determine a first size of the first metadata and a second size of the second metadata, the second size being different from the first size; The first metadata includes a first field indicating the first size of the first metadata, and the second metadata includes a second field indicating the second size of the second metadata; and The processor is further configured to move a portion of the first packet based on a determination that the first size of the first metadata exceeds a first threshold.

18. The device of claim 17, wherein the first group comprises a first unit and a second unit, and the first metadata is configured in the first unit and the second unit.

19. The device of claim 17, further comprising a controller coupled to the first port, the controller being configured to manage the transmission of the first packet based on the first metadata.

20. The device of claim 17, wherein the processor is configured to generate a third unit in the first group based on a determination that the first size of the first metadata exceeds a second threshold, the second threshold being greater than or equal to the first threshold.