RU2710302C1 - Method of organizing operation of network equipment components for processing network packets (4 versions) - Google Patents

Method of organizing operation of network equipment components for processing network packets (4 versions) Download PDF

Info

Publication number
RU2710302C1
RU2710302C1 RU2018143014A RU2018143014A RU2710302C1 RU 2710302 C1 RU2710302 C1 RU 2710302C1 RU 2018143014 A RU2018143014 A RU 2018143014A RU 2018143014 A RU2018143014 A RU 2018143014A RU 2710302 C1 RU2710302 C1 RU 2710302C1
Authority
RU
Russia
Prior art keywords
rules
network
central processor
equipment
rule
Prior art date
Application number
RU2018143014A
Other languages
Russian (ru)
Inventor
Сергей Андреевич Львов
Original Assignee
Общество с ограниченной ответственностью "Траст Технолоджиз"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Общество с ограниченной ответственностью "Траст Технолоджиз" filed Critical Общество с ограниченной ответственностью "Траст Технолоджиз"
Priority to RU2018143014A priority Critical patent/RU2710302C1/en
Application granted granted Critical
Publication of RU2710302C1 publication Critical patent/RU2710302C1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

FIELD: wireless communication equipment.
SUBSTANCE: invention relates to network communication technologies. Method for a given network packet excludes loading into processor those rules, under which this packet can not approach, and provide loading only those rules, under which this packet is suitable, minimizing the number of data transfers between the central processor and other components of the system. That is, significant increase in network equipment throughput with a given configuration, which is located at the boundary of network segments. Method characterizes interaction of the processor with other components of the system, which leads to an increase in the number of network packets, which can be transmitted from one segment of the network to the other per a unit of time, while observing the security policy established by the network administrator.
EFFECT: high efficiency of network equipment for processing network packets in accordance with a given configuration, which is achieved by implementing a method of interacting components of network equipment.
23 cl, 10 dwg

Description

Область техники, к которой относится изобретениеFIELD OF THE INVENTION

Изобретение относится к технологиям сетевой связи, в частности, к способам эффективного решения задач обработки сетевых пакетов, таких как маршрутизация (routing), фильтрация (filtering), маршрутизация на основе политик (policy based routing - PBR), трансляция сетевых адресов (network address translation - NAT) и т.д., а также любой комбинации указанных задач.The invention relates to network communication technologies, in particular, to methods for effectively solving network packet processing problems, such as routing, filtering, policy based routing (PBR), network address translation - NAT), etc., as well as any combination of these tasks.

Уровень техникиState of the art

В настоящее время широкое распространение получил подход, при котором современное сетевое оборудование строится на основе универсальных аппаратных компонентов. Это вызвано тем, что процесс производства таких компонентов хорошо налажен, вследствие чего их стоимость достаточно мала по сравнению со специализированным оборудованием. Примером универсальных аппаратных компонентов оборудования могут служить х86 и х64 совместимые центральные процессоры (CPU) общего назначения, оперативная память (RAM), сетевые платы (NIC) и т.п.Currently, an approach is widely used in which modern network equipment is built on the basis of universal hardware components. This is due to the fact that the production process of such components is well established, as a result of which their cost is quite small compared to specialized equipment. An example of universal hardware hardware components is x86 and x64 general purpose compatible central processing units (CPUs), random access memory (RAM), network cards (NICs), etc.

При этом настройка сетевого оборудования осуществляется администратором сети с использованием высокоуровневого языка конфигурирования путем написания набора правил, в соответствии с которыми сетевое оборудование организует свою деятельность. Набор таких правил далее будет упоминаться как конфигурация сетевого оборудования. Примером конфигурации сетевого оборудования может служить таблица маршрутизации для сетей, работающих на основе протоколов IPv4/IPv6, список контроля доступа (access control list - ACL) и т.д.In this case, network equipment is configured by the network administrator using a high-level configuration language by writing a set of rules in accordance with which the network equipment organizes its activities. A set of such rules will hereinafter be referred to as network equipment configuration. An example of a network equipment configuration is a routing table for networks operating on the basis of IPv4 / IPv6 protocols, access control list (ACL), etc.

Универсальные аппаратные компоненты имеют стандартизированные интерфейсы для взаимодействия между собой, поэтому они являются легко взаимозаменяемыми. При необходимости можно заменить какой-то имеющийся компонент на более новый, и тем самым улучшить производительность всей системы в целом. Однако, в последнее время наблюдается многократный рост пропускной способности сетевых адаптеров, в то время как рост производительности центральных процессоров и оперативной памяти переживает стагнацию. Вследствие этого становится невозможным увеличить производительность сетевого оборудования путем простой замены аппаратных компонентов.Universal hardware components have standardized interfaces for interacting with each other, so they are easily interchangeable. If necessary, you can replace some existing component with a newer one, and thereby improve the performance of the entire system. However, in recent years there has been a multiple increase in the bandwidth of network adapters, while the increase in the performance of central processors and RAM is undergoing stagnation. As a result, it becomes impossible to increase the performance of network equipment by simply replacing hardware components.

Поэтому, в сложившихся условиях, на первый план выходит задача оптимизации издержек, возникающих при взаимодействии разных аппаратных компонентов, а не задача ускорения отдельно взятого аппаратного компонента. Указанная задача связана с максимально эффективным использованием вычислительных мощностей, доступных в настоящее время.Therefore, under the current conditions, the task of optimizing the costs arising from the interaction of different hardware components comes to the fore, and not the task of accelerating a single hardware component. This task is associated with the most efficient use of computing power available at present.

Одной из важных проблем, препятствующих эффективному использованию вычислительных мощностей сетевого оборудования, является медленная скорость передачи данных между центральным процессором и оперативной памятью. По сути, процессор простаивает весь промежуток времени между моментом отправки запроса на очередной блок данных и моментом получения запрошенного блока данных.One of the important problems hindering the efficient use of the computing power of network equipment is the slow data transfer speed between the central processor and RAM. In fact, the processor is idle for the entire time interval between the moment of sending the request for the next data block and the moment of receiving the requested data block.

При обработке сетевых пакетов значительная часть запросов к оперативной памяти связана с необходимостью загрузки правил в центральный процессор. С ростом количества правил увеличивается количество запросов к оперативной памяти, соответственно растут и издержки, возникающие при обработке каждого сетевого пакета. Вследствие чего при большом количестве правил время обработки сетевых пакетов становится недопустимо большим.When processing network packets, a significant part of requests for RAM is associated with the need to load rules into the central processor. With an increase in the number of rules, the number of queries to RAM increases, and the costs associated with processing each network packet increase accordingly. As a result, with a large number of rules, the processing time of network packets becomes unacceptably long.

Несмотря на то, что оборудование на основе универсальных аппаратных компонентов не ориентировано на выполнение задач по обработке сетевых пакетов, тем не менее, оно вполне способно эффективно решать подобные задачи. Однако для этого требуется разработать такой подход к обработке сетевых пакетов, который бы минимизировал издержки, возникающие при взаимодействии аппаратных компонентов этого оборудования.Despite the fact that equipment based on universal hardware components is not oriented toward the fulfillment of network packet processing tasks, nevertheless, it is quite capable of effectively solving such problems. However, this requires the development of such an approach to processing network packets that would minimize the costs associated with the interaction of the hardware components of this equipment.

Существующий уровень техники предоставляет различные способы организации работы компонентов сетевого оборудования для обработки данных.The current level of technology provides various ways of organizing the operation of network equipment components for data processing.

В качестве патентов-аналогов выбраны патенты, которые основаны на эксплуатации так называемого OpenFlow-совместимого оборудования, а именно следующие изобретения:Patents that are based on the operation of the so-called OpenFlow-compatible equipment, namely the following inventions, are selected as patent patents:

1. Патент RU 2 589 340 С2, МПК H04L 12/70, 10.07.2016. - Сетевая система и способ получения данных тега VLAN.1. Patent RU 2 589 340 C2, IPC H04L 12/70, 07/10/2016. - Network system and method for obtaining VLAN tag data.

2. Патент RU 2 628 476 С1, МПК H04L 12/70, 17.08.2017. - Коммутирующее устройство, контроллер, способ конфигурирования коммутирующего устройства и способ и система для обработки пакета.2. Patent RU 2 628 476 C1, IPC H04L 12/70, 08/17/2017. A switching device, a controller, a method for configuring a switching device, and a method and system for processing a packet.

3. Патент RU 2 609 086 С2, МПК H04L 12/70, 30.01.2017. - Сетевое устройство пересылки пакетов (варианты), способ настройки сетевого устройства пересылки пакетов (варианты) и способ пересылки пакета.3. Patent RU 2 609 086 C2, IPC H04L 12/70, 01/30/2017. - Network packet forwarding device (options), a method for configuring a network packet forwarding device (options), and a packet forwarding method.

4. Патент RU 2 554 543 С2, МПК H04L 12/00, H04L 12/70, 27.06.2015. -Блок связи, система связи, способ связи и носитель записи.4. Patent RU 2 554 543 C2, IPC H04L 12/00, H04L 12/70, 06/27/2015. - Communication unit, communication system, communication method and recording medium.

Согласно описанию из Патента RU 2 628 476 «Коммутирующее устройство, контроллер, способ конфигурирования коммутирующего устройства и способ и система для обработки пакета» OpenFlow является протоколом управления между контроллером OpenFlow (OpenFlow Controller, для краткости - контроллер) и коммутатором OpenFlow (OpenFlow Switch, для краткости -коммутатор).As described in Patent RU 2 628 476, “Switching device, controller, method for configuring a switching device and method and system for processing a packet”, OpenFlow is a control protocol between an OpenFlow controller (OpenFlow Controller, for short, a controller) and an OpenFlow switch (OpenFlow Switch, for brevity is a switch).

Контроллер управляет поведениями коммутатора предпочтительно с использованием таблицы потоков (Flow Table). Таблица потоков хранится в коммутаторе и формируется из множества записей о потоках (Flow Entry). Каждая запись о потоке включает в себя, как правило, поля соответствия (Match Fields) и команды (Instructions).The controller controls the behavior of the switch, preferably using a flow table. The table of flows is stored in the switch and is formed from a set of records about flows (Flow Entry). Each stream record includes, as a rule, Match Fields and Instructions.

Как правило, поле соответствия указывает информацию, которую нужно сопоставить (которая может быть такой информацией, как различные поля заголовка пакета или ID порта, из которого коммутатор принимает пакет), и обеспечивает присвоенное значение информации, которую нужно сопоставить, причем присвоенное значение используется для сравнения с фактическим значением информации, которая относится к пакету и которую нужно сопоставить, а команды включают в себя множество типов команд, которые включают в себя действие (Action), используемое для указания выполнения некой операции над пакетом."Typically, the correspondence field indicates the information that needs to be matched (which can be information such as various header fields of the packet or the port ID from which the switch receives the packet) and provides the assigned value of the information that needs to be matched, and the assigned value is used for comparison with the actual value of the information that pertains to the package and which needs to be matched, and the commands include many types of commands, which include the Action used to indicate to perform some operation on the package. "

Таким образом, все указанные выше патенты-аналоги имеют тот общий признак с заявленным изобретением, что пакеты обрабатываются в соответствии с набором правил (в OpenFlow это называется Flow Table), где каждое правило (в OpenFlow это называется Flow Entry) в наборе состоит из полей пакетов (в OpenFlow это называется Match Fields) и действий (в OpenFlow это называется Instructions).Thus, all the above patent analogues have the same attribute with the claimed invention that packets are processed in accordance with a set of rules (in OpenFlow it is called Flow Table), where each rule (in OpenFlow it is called Flow Entry) in a set consists of fields packages (in OpenFlow it is called Match Fields) and actions (in OpenFlow it is called Instructions).

Как следует из описания протокола OpenFlow - это протокол управления между контроллером и коммутатором, описывающий возможности коммутатора по обработке сетевых пакетов. При этом реализация таких возможностей в конкретных программно-аппаратных комплексах может быть различна и допускает оптимизацию в соответствии с характеристиками конкретного оборудования. Таким образом, патенты-аналоги направлены на решение проблем, возникающих при эксплуатации уже реализованных OpenFlow-совместимых программно-аппаратных комплексов.As follows from the protocol description, OpenFlow is a control protocol between the controller and the switch that describes the switch's capabilities for processing network packets. Moreover, the implementation of such capabilities in specific software and hardware systems can be different and can be optimized in accordance with the characteristics of a particular equipment. Thus, patents-analogues are aimed at solving problems arising from the operation of already implemented OpenFlow-compatible software and hardware systems.

В отличие от патентов-аналогов заявленное изобретение описывает новые способы реализации программно-аппаратных комплексов для обработки сетевых пакетов, в том числе и OpenFlow-совместимых комплексов. Таким образом, патенты-аналоги и заявленное изобретение направлены на решение разных задач. В этом заключается новизна предлагаемого изобретения, в отличие от существующих изобретений.Unlike analog patents, the claimed invention describes new methods for implementing software and hardware systems for processing network packets, including OpenFlow-compatible complexes. Thus, patents-analogues and the claimed invention are aimed at solving various problems. This is the novelty of the invention, in contrast to existing inventions.

Наиболее близким к заявленному техническому решению является Патент RU 2 609 086 С2, МПК H04L 12/70, 30.01.2017. - Сетевое устройство пересылки пакетов (варианты), способ настройки сетевого устройства пересылки пакетов (варианты) и способ пересылки пакета. Это техническое решение принято за прототип.Closest to the claimed technical solution is Patent RU 2 609 086 C2, IPC H04L 12/70, 01/30/2017. - Network packet forwarding device (options), a method for configuring a network packet forwarding device (options), and a packet forwarding method. This technical solution is taken as a prototype.

Патент-прототип описывает способ исправления недостатка стандарта OpenFlow версии 1.0, а именно невозможность использования нескольких таблиц (Flow Table). В качестве решения предлагается прогонять сетевой пакет через одну и ту же таблицу несколько раз, но при этом каждый раз с разными значениями полей (Match Fields), конкретно - с разным значением поля "ID порта, из которого коммутатор принимает пакет". Значение этого поля меняется путем отправки пакета в аппаратную петлю. Пакет отправляется в сеть и сразу же возвращается, но уже через другой порт. Таким образом, патент-прототип позволяет имитировать несколько таблиц с помощью одной, путем разбиения записей (Flow Entry) в ней на группы, при этом каждая группа записей реагирует только на пакеты, принятые из определенного порта коммутатора.The patent prototype describes a way to correct a flaw in the OpenFlow standard version 1.0, namely the inability to use multiple tables (Flow Table). As a solution, it is proposed to run the network packet through the same table several times, but each time with different field values (Match Fields), specifically with a different value for the "Port ID from which the switch receives the packet" field. The value of this field is changed by sending the packet to the hardware loop. The packet is sent to the network and immediately returned, but through a different port. Thus, the patent prototype allows you to simulate several tables using one, by splitting the entries (Flow Entry) in it into groups, with each group of entries responding only to packets received from a specific port on the switch.

Несмотря на достоинства, прототип имеет недостатки. Количество имитируемых таким образом таблиц ограничено количеством портов в коммутаторе. Это существенно ограничивает возможности администратора по конфигурации коммутатора. Кроме того, многократный прогон одних и тех же сетевых пакетов через одну и ту же таблицу негативно сказывается на пропускной способности коммутатора, в худшем случае при имитации N таблиц пропускная способность коммутатора будет падать в N раз.Despite the advantages, the prototype has disadvantages. The number of tables simulated in this way is limited by the number of ports in the switch. This significantly limits the administrator’s ability to configure the switch. In addition, multiple runs of the same network packets through the same table negatively affect the bandwidth of the switch, in the worst case, when simulating N tables, the bandwidth of the switch will drop N times.

В отличие от патента-прототипа, заявленное изобретение предлагает администратору более гибкие инструменты для конфигурации сетевого оборудования, при этом пропускная способность сетевого оборудования, независимо от его конфигурации, будет оставаться всегда высокой.Unlike the prototype patent, the claimed invention offers the administrator more flexible tools for configuring network equipment, while the throughput of network equipment, regardless of its configuration, will always remain high.

В качестве примера возьмем ту же задачу, которая решалась в патенте-прототипе, но переформулированную в терминах нашего патента, а именно: организация правил в виде нескольких наборов правил.As an example, we take the same problem that was solved in the prototype patent, but reformulated in terms of our patent, namely: the organization of rules in the form of several sets of rules.

В патенте-прототипе для того, чтобы отправить сетевой пакет на обработку в следующую таблицу использовалась аппаратная петля. В нашем патенте для того, чтобы отправить сетевой пакет на обработку в следующий набор правил достаточно создать нетерминальное правило с действием, например, JUMP (см. пример 2 и таблицы 6, 7), которое выполнит переход к первому правилу из следующего набора, то есть изменит порядок применения правил к пакету. Отметим, что нетерминальные правила используются только на этапе конфигурирования сетевого оборудования.In the prototype patent, a hardware loop was used to send the network packet for processing to the following table. In our patent, in order to send a network packet for processing to the next set of rules, it is enough to create a nonterminal rule with an action, for example, JUMP (see example 2 and tables 6, 7), which will go to the first rule from the next set, i.e. Change the order in which rules are applied to the package. Note that non-terminal rules are used only at the stage of configuring network equipment.

Предлагаемое изобретение позволяет преобразовать все исходные наборы правил в один набор примитивных терминальных правил и построить индекс этих правил. На этапе обработки пакетов уже используются преобразованные правила, и, как показано в разделе "Раскрытие изобретения", при этом пропускная способность оборудования не зависит ни от количества исходных правил, ни от количества наборов исходных правил.The present invention allows you to convert all the original rule sets into one set of primitive terminal rules and build an index of these rules. At the stage of processing packets, the converted rules are already used, and, as shown in the “Disclosure of the Invention” section, the equipment throughput does not depend on the number of source rules or the number of sets of source rules.

Таким образом, предлагаемое изобретение применимо, в том числе, для создания OpenFlow-совместимого оборудования, поддерживающего работу с несколькими таблицами (Flow Table) и обеспечивающего при этом не меньшую (возможно - большую) производительность, чем аналогичное оборудование, поддерживающее работу только с одной таблицей.Thus, the present invention is applicable, inter alia, to create OpenFlow-compatible equipment that supports work with multiple tables (Flow Table) and provides at the same time no less (possibly more) performance than similar equipment that supports work with only one table .

Помимо этого, предлагаемое изобретение применимо для создания и других программно-аппаратных комплексов, выполняющих обработку сетевых пакетов в соответствии с заданным набором правил.In addition, the present invention is applicable to the creation of other software and hardware systems that process network packets in accordance with a given set of rules.

Техническая цель заявленного изобретения заключается в увеличении количества сетевых пакетов, которые возможно передать из одного сегмента в сети в другой за единицу времени, соблюдая при этом политику безопасности, установленную администратором сети. То есть целью является увеличение пропускной способности сетевого оборудования с заданной конфигурацией, которое находится на границе сегментов сети.The technical goal of the claimed invention is to increase the number of network packets that can be transferred from one segment in the network to another in a unit of time, while observing the security policy established by the network administrator. That is, the goal is to increase the throughput of network equipment with a given configuration, which is located on the border of network segments.

Классическим подходом достижения этой цели является наращивание количества экземпляров сетевого оборудования и организация балансировки трафика между этими экземплярами. Например, вместо одного межсетевого экрана может использоваться два сетевых экрана и балансировщик трафика, равномерно распределяющий поток сетевых пакетов между межсетевыми экранами, что, в лучшем случае, двукратно увеличит пропускную способность системы в целом. Очевидно, недостатком такого подхода является его высокая стоимость: оборудование необходимо закупить, под него необходимо выделить место в серверном помещении, подвести электроснабжение, организовать его охлаждение и так далее.The classic approach to achieving this goal is to increase the number of instances of network equipment and organize the balancing of traffic between these instances. For example, instead of a single firewall, two firewalls and a traffic balancer can be used to evenly distribute the flow of network packets between firewalls, which, at best, will double the throughput of the entire system. Obviously, the disadvantage of this approach is its high cost: equipment must be purchased, it is necessary to allocate a place in the server room for it, bring power supply, organize its cooling, and so on.

Поэтому, целью заявленного изобретения является увеличение пропускной способности оборудования без увеличения количества его экземпляров. Это равнозначно увеличению количества сетевых пакетов, обрабатываемых за единицу времени единицей сетевого оборудования. Такую величину будем называть эффективностью сетевого оборудования.Therefore, the aim of the claimed invention is to increase the throughput of the equipment without increasing the number of copies. This is equivalent to an increase in the number of network packets processed per unit of time by a unit of network equipment. This value will be called the efficiency of network equipment.

Таким образом, технический результат, достигаемый при использовании заявленного изобретения, заключается в повышении эффективности сетевого оборудования по обработке сетевых пакетов в соответствии с заданной конфигурацией.Thus, the technical result achieved by using the claimed invention is to increase the efficiency of network equipment for processing network packets in accordance with a given configuration.

В результате реализации предлагаемого способа организации взаимодействия компонентов сетевого оборудования решаются следующие задачи:As a result of the implementation of the proposed method for organizing the interaction of network equipment components, the following tasks are solved:

1) минимизируется количество пересылок данных между центральным процессором и другими компонентами системы;1) the number of data transfers between the central processor and other components of the system is minimized;

2) не требуется использования новых инструментов настройки от администратора сетевого оборудования;2) it is not required to use new configuration tools from the network equipment administrator;

3) не требуется замены и модификации существующих компонентов системы.3) no replacement or modification of existing system components is required.

Технический результат достигается за счет реализации способа организации взаимодействия компонентов сетевого оборудования, который характеризуется следующими существенными признаками:The technical result is achieved through the implementation of the method of organizing the interaction of components of network equipment, which is characterized by the following essential features:

1) (наличие действия или совокупности действий) Способ предполагает наличие предварительного подготовительного этапа работы оборудования. Этот этап заключается в имитации обработки тех пакетов, которые теоретически могли бы прийти на сетевое оборудование с заданной конфигурацией. В процессе этой имитации становится известно, через какие правила пройдет сетевой пакет при попадании в сетевое оборудование. Объединение вместе правил, принадлежащих одному и тому же пути сетевого пакета, позволяет получить набор преобразованных правил, которые с одной стороны эквивалентны исходным, а с другой стороны - являются более простыми, что позволяет построить их индекс и выполнять эффективный поиск по ним.1) (the presence of an action or set of actions) The method involves the presence of a preliminary preparatory stage of the equipment. This stage consists in simulating the processing of those packets that could theoretically come to network equipment with a given configuration. During this simulation, it becomes known through which rules a network packet will go through when it enters network equipment. Combining together the rules that belong to the same network packet path allows you to get a set of converted rules that are on the one hand equivalent to the original ones and, on the other hand, are simpler, which allows you to build their index and perform an efficient search on them.

2) (порядок выполнения действий во времени) Способ предполагает, что подготовительный этап выполняется еще до начала приема первого пакета из сети. Это означает, что между моментом, когда администратор задает новую конфигурацию для оборудования, и моментом, когда оборудование на самом деле начинает работать в соответствии с новой конфигурацией, проходит некоторое время, на практике - до нескольких секунд. Очевидно, что в некоторых случаях это является недостатком, поскольку не позволяет менять конфигурацию оборудования очень часто (несколько раз в секунду). Однако, следует отметить, что затраты на подготовительный этап единовременны, в то время как положительный эффект от выполнения этого этапа длится все время работы оборудования вплоть до применения новой конфигурации. Поэтому, если конфигурация оборудования меняется относительно редко, то предлагаемый способ вполне оправдан.2) (the procedure for performing actions in time) The method assumes that the preparatory stage is carried out before the first packet is received from the network. This means that between the moment when the administrator sets a new configuration for the equipment and the moment when the equipment actually starts working in accordance with the new configuration, some time passes, in practice, up to several seconds. Obviously, in some cases this is a drawback, because it does not allow you to change the configuration of the equipment very often (several times per second). However, it should be noted that the costs of the preparatory phase are one-time, while the positive effect of this stage lasts all the time the equipment is in operation until the new configuration is applied. Therefore, if the configuration of the equipment changes relatively rarely, the proposed method is fully justified.

3) (условия осуществления действий; режим; использование устройств) Способ предполагает возможность подключения дополнительного аппаратного компонента к существующему сетевому оборудованию на основе универсальных аппаратных компонентов. В рамках заявленного изобретения описывается принцип работы дополнительного устройства, способного эффективно преобразовывать набор произвольных правил в набор терминальных примитивных правил. Это дополнительное устройство может использоваться для минимизации времени, необходимого на выполнение подготовительного этапа, что расширяет область применимости заявленного изобретения. В случае, если использование дополнительного устройства затруднено или нецелесообразно, способ предполагает возможность выполнения подготовительного этапа с помощью только имеющихся аппаратных компонентов.3) (conditions for the implementation of actions; mode; use of devices) The method involves the possibility of connecting an additional hardware component to existing network equipment based on universal hardware components. In the framework of the claimed invention describes the principle of operation of an additional device that can effectively convert a set of arbitrary rules into a set of terminal primitive rules. This additional device can be used to minimize the time required to complete the preparatory phase, which expands the scope of applicability of the claimed invention. In the event that the use of an additional device is difficult or impractical, the method involves the possibility of performing the preparatory phase using only the available hardware components.

Изобретение иллюстрируется следующими рисунками.The invention is illustrated by the following figures.

Фиг. 1 - блок-схема архитектуры современной вычислительной системы на базе х86 или х64 совместимого процессора общего назначения;FIG. 1 is a block diagram of the architecture of a modern computing system based on an x86 or x64 compatible general-purpose processor;

Фиг. 2 - блок-схема последовательности операций в сетевом оборудовании при обработке сетевого пакета;FIG. 2 is a flowchart of network equipment in processing a network packet;

Фиг. 3 - блок-схема последовательности операций в сетевом оборудовании при обработке сетевого пакета, иллюстрирующая работу изобретения согласно варианту осуществления «полностью аппаратное решение»;FIG. 3 is a flowchart of network equipment in processing a network packet, illustrating the operation of the invention according to an “fully hardware solution” embodiment;

Фиг. 4 - блок-схема архитектуры современной вычислительной системы на базе х86 или х64 совместимого процессора общего назначения, иллюстрирующая реализацию изобретения согласно варианту осуществления «полностью аппаратное решение»;FIG. 4 is a block diagram of the architecture of a modern computing system based on an x86 or x64 compatible general-purpose processor, illustrating the implementation of the invention according to a fully hardware solution embodiment;

Фиг. 5 - блок-схема преобразователя правил в предлагаемом способе;FIG. 5 is a block diagram of a rule converter in the proposed method;

Фиг. 6 - блок-схема модуля объединения правил в преобразователе правил;FIG. 6 is a block diagram of a rule combining module in a rule converter;

Фиг. 7 - блок-схема реализации способа с помощью полностью аппаратного решения, выполняющего функции преобразования, хранения и поиска правил (вариант 1);FIG. 7 is a flowchart of a method using a fully hardware solution that performs the functions of converting, storing, and searching for rules (option 1);

Фиг. 8 - блок-схема реализации способа с помощью аппаратного решения, выполняющего функции преобразования и поиска правил, с хранением исходных и примитивных терминальных правил в оперативной памяти (вариантFIG. 8 is a flowchart of a method using a hardware solution that performs the functions of converting and searching for rules, with the storage of the original and primitive terminal rules in RAM (option

2);2);

Фиг. 9 - блок-схема реализации способа с помощью аппаратного решения, выполняющего функции только преобразования правил (вариант 3);FIG. 9 is a flowchart of a method using a hardware solution that performs the functions of only transforming rules (option 3);

Фиг. 10 - блок-схема реализации способа, предполагающего снижение количества дополнительных подключаемых аппаратных компонентов (вариант 4).FIG. 10 is a flow chart of a method involving a reduction in the number of additional plug-in hardware components (option 4).

Раскрытие изобретенияDisclosure of invention

Для раскрытия заявленного изобретения используются следующие термины и определения.To disclose the claimed invention, the following terms and definitions are used.

Поле - значение некоторого свойства или атрибута, представленное в числовой форме.Field - the value of a property or attribute, represented in numerical form.

Пакет - специальным образом оформленное сообщение, передаваемое по линиям связи.Package - a specially designed message transmitted over communication lines.

Поля пакета - совокупность всех полей, каким-либо образом имеющих отношение к пакету в процессе его обработки. Поле пакета не обязательно является информацией, хранящейся в самом пакете, такой как, например, номер сетевого протокола. Полем пакета может быть информация, необходимая для обработки пакета и хранящаяся в сетевом оборудовании, такая как, например, временная метка приема пакета или номер правила, применяемого к пакету в данный момент времени.Package fields - a set of all fields that are in any way related to the package in the process of processing it. A packet field is not necessarily information stored in the packet itself, such as, for example, the network protocol number. The packet field may be the information necessary for processing the packet and stored in the network equipment, such as, for example, the timestamp of receiving the packet or the number of the rule applied to the packet at a given time.

Правило - совокупность набора проверок и упорядоченного набора действий, выполняемых по отношению к полям пакета.A rule is a collection of checks and an ordered set of actions performed in relation to the fields of a package.

Проверка (правила) - предикат, принимающий один или несколько полей пакета и возвращающий булево значение (1 (проверка пройдена) или 0 (проверка не пройдена)). Примером проверки может служить проверка того, что сумма всех полей пакета является четным числом.Validation (rules) - a predicate that takes one or more fields of a packet and returns a Boolean value (1 (validation passed) or 0 (validation failed)). An example of verification is the verification that the sum of all fields in a packet is an even number.

Говорят, что пакет подходит под правило, если все проверки правила, примененные к полям пакета, возвращают положительный результат.It is said that a package matches a rule if all rule checks applied to the fields of the package return a positive result.

Действие (правила) - операция, выполняемая над полями пакета. Примером действия может служить запись некоторых полей пакета в журнал.An action (rules) is an operation performed on the fields of a package. An example of an action is to write some fields of a package to a log.

Следующие проверки называются примитивными:The following checks are called primitive:

1. Проверка на то, что поле пакета равно заданному значению.1. Check that the packet field is equal to the specified value.

2. Проверка на то, что поле пакета имеет заданный префикс.2. Checking that the packet field has the specified prefix.

3. Проверка на то, что поле пакета находится в заданном диапазоне.3. Check that the packet field is in the specified range.

Правило называется примитивным, если все его проверки являются примитивными.A rule is called primitive if all of its checks are primitive.

Вердикт - действие, изменяющее порядок применения правил к пакету.Verdict - an action that changes the order in which rules are applied to a package.

Вердикт называется терминальным, если он завершает процесс применения правил к пакету.A verdict is called terminal if it completes the process of applying rules to a package.

Правило называется терминальным, если оно содержит терминальный вердикт.A rule is called terminal if it contains a terminal verdict.

Конфигурация (сетевого оборудования) - упорядоченный набор правил, определяющих алгоритм обработки сетевых пакетов.Configuration (network equipment) - an ordered set of rules that determine the algorithm for processing network packets.

Две конфигурации являются эквивалентными друг другу, если при применении этих наборов к любому пакету, они оказывают на него одинаковое воздействие.Two configurations are equivalent to each other if, when applying these sets to any package, they have the same effect on it.

Путем пакета будем называть упорядоченный в хронологическом порядке набор правил, под которые подошел пакет в процессе его обработки сетевым оборудованием.By a packet we will call a set of rules ordered in chronological order, under which a packet came up during its processing by network equipment.

Общие основные признаки предлагаемого способа организации работы компонентов сетевого оборудования для обработки сетевых пакетов заключаются в следующем.The general main features of the proposed method for organizing the operation of network equipment components for processing network packets are as follows.

Современные вычислительные системы на базе х86 и х64 совместимых процессоров устроены следующим образом (фиг. 1):Modern computing systems based on x86 and x64 compatible processors are arranged as follows (Fig. 1):

- центральный процессор 100 имеет встроенный контроллер памяти 101, поэтому соединен непосредственно со слотами оперативной памяти RAM 102 посредством соответствующей шины 103;- the central processor 100 has an integrated memory controller 101, therefore, is connected directly to the RAM slots RAM 102 via the corresponding bus 103;

- чипсет 104 через различные типы шин 105 соединяется со слотами для периферийных устройств 106, в том числе и для сетевых адаптеров NIC 107;- the chipset 104 is connected through various types of buses 105 to the slots for peripheral devices 106, including NIC 107 network adapters;

- центральный процессор CPU 100 и чипсет 104 соединяются друг с другом внутренней шиной 108.- a central processing unit CPU 100 and a chipset 104 are connected to each other by an internal bus 108.

Когда сетевой пакет 109 приходит в сетевой адаптер NIC 107, он пересылается в оперативную память RAM 102 посредством механизма DMA 110 (Direct Memory Access - прямой доступ к памяти).When the network packet 109 arrives at the NIC 107, it is forwarded to the RAM 102 via the DMA 110 (Direct Memory Access) mechanism.

Схема на фиг. 2 демонстрирует, что при большом количестве правил обработка сетевого пакета может занять значительное время.The circuit of FIG. Figure 2 shows that with a large number of rules, processing a network packet can take considerable time.

Механизм DMA 200 позволяет передавать данные между оперативной памятью RAM 202 и периферийными устройствами NIC 201 без участия центрального процессора CPU 203, позволяя ему заниматься в это время другими задачами. Таким образом, центральный процессор CPU 203 приступает к обработке сетевого пакета 204, когда сетевой пакет 204 уже находится в оперативной памяти RAM 202.The DMA 200 mechanism allows you to transfer data between RAM 202 and peripheral devices NIC 201 without the participation of the CPU 203, allowing him to engage in other tasks at this time. Thus, the central processing unit CPU 203 starts processing the network packet 204 when the network packet 204 is already in the RAM 202.

При этом значительная часть времени при обработке сетевого пакета 204 тратится на загрузку правил 205 из оперативной памяти RAM 202 в центральный процессор CPU 203. Это вызвано тем, что процессору CPU 203 заранее неизвестно, какие правила необходимо применить к сетевому пакету 204. Поэтому центральный процессор CPU 203 запрашивает из оперативной памяти RAM 202 по одному все правила от 1 до N, где N - количество правил, до тех пор, пока не найдется терминальное правило, под которое подойдет сетевой пакет 204.In this case, a significant part of the time when processing the network packet 204 is spent on loading the rules 205 from the RAM 202 into the CPU 203. This is because the CPU 203 does not know in advance which rules should be applied to the network packet 204. Therefore, the CPU 203 requests from the RAM 202 one by one all the rules from 1 to N, where N is the number of rules, until there is a terminal rule under which the network packet 204 will fit.

С увеличением количества правил N в конфигурации сетевого оборудования увеличивается количество загрузок правил из оперативной памяти. Это имеет за собой негативные последствия, в частности, возникают многочисленные простои 206, препятствующие эффективному использованию процессора, во время которых процессор ожидает получения данных из памяти, а также существенно возрастает нагрузка на шину памяти, препятствуя тем самым работе других процессов в системе, поскольку многоядерный процессор может выполнять несколько задач одновременно. Таким образом, пропускная способность сетевого оборудования сильно зависит от того, сколько правил находится в его конфигурации.With an increase in the number of rules N in the configuration of network equipment, the number of rule downloads from RAM increases. This has negative consequences, in particular, there are numerous downtimes 206 that prevent the efficient use of the processor, during which the processor expects to receive data from the memory, and also significantly increases the load on the memory bus, thereby interfering with the work of other processes in the system, since it is multi-core a processor can perform several tasks at once. Thus, the throughput of network equipment is highly dependent on how many rules are in its configuration.

Задача, на решение которой направлено данное изобретение, заключается в разработке способа взаимодействия процессора с другими компонентами системы, приводящего к увеличению количества сетевых пакетов, которые возможно передать из одного сегмента в сети в другой за единицу времени, соблюдая при этом политику безопасности, установленную администратором сети.The problem to which this invention is directed is to develop a method for the processor to interact with other system components, leading to an increase in the number of network packets that can be transferred from one segment in the network to another per unit of time, while observing the security policy established by the network administrator .

Заявленное изобретение осуществляется с использованием устройства, подключаемого к процессору, либо реализуемого полностью или частично программным образом, и выполняющего обработку запросов, поступающих от процессора. Оно позволяет за относительно короткий фиксированный промежуток времени по заданному набору полей пакета определить, под какие правила подходит сетевой пакет, то есть определить те правила, которые должны быть загружены в процессор для применения их к сетевому пакету. Заявленное изобретение дополняет существующие программно-аппаратные комплексы, позволяя их компонентам выполнять свои задачи более эффективно.The claimed invention is carried out using a device connected to the processor, or implemented in whole or in part in software, and performing processing of requests from the processor. It allows for a relatively short fixed period of time from a given set of packet fields to determine which rules a network packet is suitable for, that is, to determine those rules that must be loaded into the processor to apply them to a network packet. The claimed invention complements the existing hardware and software systems, allowing their components to perform their tasks more efficiently.

Схема на фиг. 3 демонстрирует, как устройство для реализации способа позволяет значительно сократить время обработки сетевого пакета согласно одному из вариантов осуществления изобретения - «полностью аппаратное решение» (см. фиг. 7). Механизм приема пакетов из сетевой платы 301 в оперативную память 303 осуществляется по-прежнему с помощью прямого доступа к памяти 300. Однако, в этом варианте осуществления изобретения процессор 304 не обращается к оперативной памяти 303 с целью поиска подходящих правил. Вместо этого процессор отправляет запрос в устройство 302 в виде полей пакета 306. Устройство 302 с помощью внутренних модулей выполняет быстрый поиск тех правил из конфигурации сетевого оборудования, под которое подходит сетевой пакет 305. Отметим, что в это время правила к пакету не применяются, однако, поиск правил происходит с учетом тех изменений, которые могли бы происходить, если бы применение правил имело место быть. Найдя необходимые правила, устройство 302 формирует и отправляет процессору 304 набор действий 307, которые тот выполняет по отношению к сетевому пакету 305. Один простой 308, который является временем обработки запроса процессора 304 устройством 302, значительно меньше многочисленных простоев (см. блок 206 на фиг. 2), которые являются временем получения нескольких правил из оперативной памяти 303. Кроме того, в таком варианте осуществления изобретения, шина памяти не задействуется для передачи правил, и поэтому она может быть использована для передачи другой информации. Таким образом, устройство для реализации способа позволяет существенно увеличить пропускную способность сетевого оборудования, и при этом пропускная способность становится уже независимой от количества правил в конфигурации сетевого оборудования.The circuit of FIG. 3 shows how a device for implementing the method can significantly reduce the processing time of a network packet according to one embodiment of the invention — a “fully hardware solution” (see Fig. 7). The mechanism for receiving packets from the network card 301 into the RAM 303 is still carried out using direct access to the memory 300. However, in this embodiment, the processor 304 does not access the RAM 303 in order to find suitable rules. Instead, the processor sends a request to device 302 in the form of fields in packet 306. Device 302, using internal modules, quickly searches for those rules from the network equipment configuration for which network packet 305 is suitable. Note that at this time, the rules do not apply to the packet, however , the search for rules takes into account those changes that could occur if the application of the rules took place. Having found the necessary rules, the device 302 generates and sends to the processor 304 a set of actions 307 that it performs with respect to the network packet 305. One idle 308, which is the processing time of the request of the processor 304 by the device 302, is much less than numerous downtimes (see block 206 in FIG. .2), which is the time for receiving several rules from the main memory 303. In addition, in such an embodiment of the invention, the memory bus is not used for transmitting the rules, and therefore, it can be used for transmitting other information. Thus, the device for implementing the method can significantly increase the throughput of network equipment, and at the same time, throughput becomes already independent of the number of rules in the configuration of network equipment.

На фиг. 4 приведена блок-схема, иллюстрирующая устройство для реализации изобретения.In FIG. 4 is a block diagram illustrating an apparatus for implementing the invention.

Само устройство для реализации способа в данном случае представляет собой отдельную РCI-плату 400, подключаемую непосредственно к процессору 407 (если такая возможность есть), либо к чипсету 408 (в противном случае) посредством PCIe шины 406.The device for implementing the method in this case is a separate PCI board 400 connected directly to the processor 407 (if this is possible), or to the chipset 408 (otherwise) via the PCIe bus 406.

Перед началом использования устройства 400 для реализации способа, необходимо провести процедуру его настройки, которая выглядит следующим образом:Before using the device 400 to implement the method, it is necessary to carry out the procedure for its configuration, which is as follows:

1. Преобразователю правил 404 передается заранее сформированный набор исходных правил посредством DMA-пересылки, который сохраняется в соответствующий буфер 401.1. A rule generator 404 is transmitted a pre-formed set of source rules by means of a DMA transfer, which is stored in the corresponding buffer 401.

2. Преобразователь правил 404 преобразует набор исходных правил в набор примитивных терминальных правил, который сохраняется в соответствующий буфер 402.2. The rule converter 404 converts the set of source rules into a set of primitive terminal rules, which is stored in the corresponding buffer 402.

3. Классификатор пакетов 405 на основе терминальных примитивных правил строит индекс правил 403.3. A packet classifier 405, based on terminal primitive rules, builds an index of rules 403.

В случае изменения набора исходных правил может быть проведена процедура повторной настройки устройства 400 для реализации способа. При этом во время повторной настройки устройство продолжает свою работу в штатном режиме.In the event of a change in the set of source rules, a procedure for reconfiguring the device 400 for implementing the method may be performed. At the same time, during the reconfiguration, the device continues to operate normally.

После успешного завершения настройки, устройство для реализации способа может быть использовано для того, чтобы выполнять поиск правил, необходимых для обработки сетевых пакетов. Для этого процессор 407 отправляет в классификатор пакетов 405 наборов полей пакета, который предварительно был принят из сетевого адаптера 410 и помещен в оперативную память 409. Классификатор пакетов 405 использует индекс правил 403, построенный им же на этапе настройки устройства, для того, чтобы определить позицию искомого правила в буфере терминальных примитивных правил 402. Передавать проверки найденного правила процессору не требуется, поскольку проверки используются только для поиска правил. Поэтому классификатор пакетов 405 передает процессору лишь действия найденного правила.After the successful completion of the setup, the device for implementing the method can be used to search for the rules necessary for processing network packets. For this, the processor 407 sends to the packet classifier 405 sets of field fields of a packet that was previously received from the network adapter 410 and placed in the RAM 409. The packet classifier 405 uses the rule index 403, which he constructed at the device setup stage, in order to determine the position the desired rule in the buffer of terminal primitive rules 402. The processor does not need to pass checks of the found rule to the processor, since the checks are used only to find the rules. Therefore, the packet classifier 405 transfers to the processor only the actions of the found rule.

Возможность построения индекса правил из набора терминальных примитивных правил неоднократно описывалась в открытых источниках, например, в [1,2]. Отметим, что время поиска в таком индексе не зависит от количества правил в конфигурации сетевого оборудования, а зависит только от числа инспектируемых полей сетевого пакета. Поскольку это число является константой на всем протяжении работы сетевого оборудования, время поиска в индексе правил ограничено сверху относительно небольшим фиксированным временем.The possibility of constructing an index of rules from a set of terminal primitive rules has been repeatedly described in open sources, for example, in [1,2]. Note that the search time in such an index does not depend on the number of rules in the configuration of network equipment, but depends only on the number of inspected fields of the network packet. Since this number is a constant throughout the operation of the network equipment, the search time in the index of rules is limited from above by a relatively small fixed time.

Однако возможность преобразования набора произвольных правил в эквивалентный ему набор терминальных примитивных правил нигде раньше не описывалась. Вместе с тем, терминальность и примитивность всех правил в наборе является необходимым условием для построения индекса правил и, соответственно, для работы всего устройства для реализации способа. Поэтому именно преобразователь правил 404 является основным источником новизны заявленного изобретения.However, the possibility of transforming a set of arbitrary rules into an equivalent set of terminal primitive rules has never been described before. However, the terminality and primitiveness of all the rules in the set is a prerequisite for constructing an index of rules and, accordingly, for the operation of the entire device for implementing the method. Therefore, it is the rule converter 404 that is the main source of novelty of the claimed invention.

На фиг. 5 представлена блок-схема преобразователя правил в составе устройства для реализации способа на фиг. 4.In FIG. 5 is a block diagram of a rule converter as part of a device for implementing the method of FIG. 4.

Общее описание атрибутов преобразователя правил.A general description of the attributes of a rule converter.

Являющийся одним из основных компонентов устройства для реализации способа преобразователь правил обладает рядом важных свойств.Being one of the main components of the device for implementing the method, the rule converter has a number of important properties.

Разработанный преобразователь правил (фиг. 5) позволяет имитировать процесс применения исходного набора правил ко всем сетевым пакетам, которые теоретически могут попасть в сетевое оборудование. Это позволяет определить пути различных пакетов еще до их попадания в систему.The developed rule converter (Fig. 5) allows you to simulate the process of applying the original set of rules to all network packets that theoretically can get into the network equipment. This allows you to determine the paths of various packages even before they get into the system.

Путь пакета нетрудно преобразовать в примитивное терминальное правило. Для этого в качестве проверок правила используются проверки на равенство полей пакета тем значениям, которые привели к формированию пути пакета. А в качестве действий правила используется конкатенация всех действий из пути пакета.The package path can easily be converted into a primitive terminal rule. To do this, checks for the equality of packet fields to those values that led to the formation of the packet path are used as rule checks. And as the actions of the rule, the concatenation of all actions from the package path is used.

Формально, поиска всех путей пакетов с последующим их преобразованием в примитивные терминальные правила достаточно для реализации преобразователя для реализации способа. Но на практике такой подход неосуществим, поскольку количество различных пакетов, которые теоретически могут попасть в сетевое оборудование, слишком велико.Formally, searching for all paths of packets with their subsequent transformation into primitive terminal rules is enough to implement a converter for implementing the method. But in practice, this approach is not feasible, since the number of different packets that theoretically can get into the network equipment is too large.

Поэтому, важным свойством разработанного преобразователя является возможность группировки сетевых пакетов, имеющих одинаковые пути, в множества, которые можно описать с помощью примитивных предикатов. Таким образом, количество итоговых примитивных терминальных правил будет зависеть уже не от количества возможных пакетов, а от количества возможных путей пакетов, число которых значительно меньше.Therefore, an important property of the developed converter is the ability to group network packets that have the same path into sets that can be described using primitive predicates. Thus, the number of final primitive terminal rules will no longer depend on the number of possible packets, but on the number of possible packet paths, the number of which is much smaller.

Наконец, разработанный преобразователь позволяет оптимизировать действия, входящие в правила из пути пакета. Если несколько действий изменяют одно и то же поле пакета, то, в некоторых случаях, их можно заменить эквивалентным действием. Например, пару действий "прибавление числа 1" и "вычитание числа 6" можно заменить одним действием "вычитание числа 5". Это позволяет сократить количество действий в результирующих примитивных терминальных правилах.Finally, the developed converter allows you to optimize the actions included in the rules from the package path. If several actions change the same field of the package, then, in some cases, they can be replaced by an equivalent action. For example, a pair of actions “adding the number 1” and “subtracting the number 6” can be replaced with one action “subtracting the number 5”. This reduces the number of actions in the resulting primitive terminal rules.

Преобразователь на фиг. 5 работает следующим образом.The converter of FIG. 5 works as follows.

Входными данными для преобразователя правил являются исходные правила, помещаемые в буфер 500. Выходными данными преобразователя являются терминальные примитивные правила, сохраняемые в буфер 510.The input to the rule converter is the original rules that are placed in the buffer 500. The output of the converter is the terminal primitive rules stored in the buffer 510.

Перед началом преобразования контроллер порядка вычислений 505 инициализирует регистры начальными значениями. Регистр базового правила 508 инициализируется правилом, под которое подходит любой пакет, и которое не выполняет над пакетом никаких действий. Регистр селектора правила 502 инициализируется значением, указывающим на первое правило из набора исходных правил 500. Регистр текущего пути 504 инициализируется пустым путем. Эти три регистра полностью описывают текущее состояние контроллера порядка вычислений 505 и могут в произвольный момент времени быть сохранены в хранилище состояний контроллера 507 или извлечены из него. Регистр текущего правила (503) не входит в состояние контроллера. Перед началом преобразования хранилище состояний контроллера 507 не содержит ни одного состояния.Before starting the conversion, the calculation order controller 505 initializes the registers with initial values. The register of the base rule 508 is initialized by a rule that matches any packet, and which does not perform any actions on the packet. The register of the rule 502 selector is initialized with a value indicating the first rule from the set of source rules 500. The register of the current path 504 is initialized empty way. These three registers fully describe the current state of the calculation order controller 505 and can be stored at any time in the state store of the controller 507 or retrieved from it. The current rule register (503) is not in the controller state. Before starting the conversion, the state store of the controller 507 does not contain any states.

Работа преобразователя правил основана на итеративном принципе. В начале каждой итерации декодер правил 501 извлекает из буфера исходных правил 500 правило, на которое указывает регистр селектора правил 502, преобразует его в форму, удобную для последующих вычислений и помещает его в регистр текущего правила 503. Дальнейшие действия зависят от вердикта текущего правила.The rule converter is based on an iterative principle. At the beginning of each iteration, rule decoder 501 extracts a rule from the source rule buffer 500 that is indicated by the register of rule selector 502, converts it into a form suitable for subsequent calculations and places it in the register of the current rule 503. Further actions depend on the verdict of the current rule.

В случае, если текущее правило является терминальным, то результат работы модуля объединения правил 506 передается модулю оптимизации и компрессии правил 509. Модуль оптимизации и компрессии правил 509 может отбросить новое правило, в случае, если это правило никогда не сможет сработать, например, если оно описывает пустое множество пакетов. Также модуль оптимизации и компрессии правил 509 может объединить новое правило с одним из имеющихся терминальных примитивных правил. Наконец, новое правило может быть добавлено в конец буфера терминальных примитивных правил 510.If the current rule is terminal, then the result of the rule combining module 506 is passed to the optimization and compression module of the rules 509. The optimization and compression module of the rules 509 can discard the new rule if this rule can never work, for example, if it describes an empty set of packages. Also, the module for optimization and compression of rules 509 can combine the new rule with one of the available terminal primitive rules. Finally, a new rule can be added to the end of the terminal primitive rule 510 buffer.

В случае, если же текущее правило не является терминальным, то происходит следующее. Состояние контроллера помещается в хранилище состояний контроллера 507 для того, чтобы позже иметь возможность продолжить вычисления того пути пакетов, которое не содержит текущего правила. Значение регистра базового правила 508 замещается результатом работы модуля объединения правил 506, регистр текущего пути 504 дополняется значением регистра селектора правил 502, а регистр селектора правил 502 модифицируется в соответствии с вердиктом текущего правила. На этом итерация заканчивается.If the current rule is not terminal, then the following occurs. The state of the controller is placed in the state store of the controller 507 in order to later be able to continue calculating the packet path that does not contain the current rule. The value of the register of the basic rule 508 is replaced by the result of the operation of the module combining the rules 506, the register of the current path 504 is supplemented by the value of the register of the selector of rules 502, and the register of the selector of rules 502 is modified in accordance with the verdict of the current rule. This ends the iteration.

Обработка текущего пути пакетов заканчивается при наступлении одного из событий:Processing of the current packet path ends when one of the events occurs:

1. Регистр селектора правила 502 указывает на конец буфера исходных правил 500.1. The register of the rule 502 selector points to the end of the source rule buffer 500.

2. Регистр базового правила 508 содержит правило, под которое не может попасть ни один пакет.2. The register of the basic rule 508 contains a rule under which no packet can fall.

После этого состояние всех регистров замещается теми значениями, которые были ранее сохранены в хранилище состояний контроллера 507 и контроллер продолжает обработку того пути пакетов, которое не содержит нетерминального пути, вызвавшего смену состояний контроллера.After that, the state of all registers is replaced by those values that were previously stored in the state store of the controller 507 and the controller continues processing the packet path that does not contain a nonterminal path that caused the controller to change states.

Работа преобразователя правил заканчивается после обработки всех возможных путей пакетов.The rule converter ends after processing all possible packet paths.

Из всех модулей преобразователя правил наиболее сложным является модуль объединения правил 506. Он позволяет на основе пары упорядоченных правил А и В сформировать правило С, которое имеет следующие свойства. Во-первых, под правило С подходят только те пакеты, которые подходят под правила А и В одновременно, причем с учетом тех изменений, которые оказывают действия правила А на поля пакета. Во-вторых, действия правила С, эквиваленты тем действиям, которые содержатся одновременно в правилах А и В.Of all the modules of the rule converter, the most complex is the module for combining rules 506. It allows, on the basis of a pair of ordered rules A and B, to form rule C, which has the following properties. Firstly, only packets that fit rules A and B at the same time are suitable for rule C, taking into account the changes that rule A exerts on the packet fields. Secondly, the actions of rule C are equivalent to those actions that are contained simultaneously in rules A and B.

На фиг. 6 представлена схема работы модуля объединения правил 506 в преобразователе правил, который представлен на фиг. 5.In FIG. 6 is a flow diagram of a rule combining module 506 in a rule converter, which is shown in FIG. 5.

На фиг. 6 представлены проверки базового правила 600 и действия базового правила 602, которые соответствуют значениям в регистре базового правила 508 на фиг. 5. Проверки текущего правила 601 и действия текущего правила 603 соответствуют значениям в регистре текущего правила 503 на фиг. 5.In FIG. 6 shows checks of the base rule 600 and the actions of the base rule 602, which correspond to the values in the register of the base rule 508 in FIG. 5. Checks of the current rule 601 and the actions of the current rule 603 correspond to the values in the register of the current rule 503 in FIG. 5.

Модуль объединения правил применяет действия базового правила к проверкам текущего правила 601 в обратном порядке в соответствующем модуле 604, что позволяет получить набор проверок 606, описывающих множество пакетов, которые теоретически могли бы дойти до текущего правила по тому пути, из которого было образовано базовое правило. Полученный набор проверок 606 затем объединяется с проверками базового правила 600 в соответствующем модуле 607 для того, чтобы получить результирующий набор проверок 608.The rule combining module applies the actions of the basic rule to the checks of the current rule 601 in the reverse order in the corresponding module 604, which allows one to obtain a set of checks 606 that describe the set of packets that could theoretically reach the current rule along the path from which the basic rule was generated. The obtained set of checks 606 is then combined with the checks of the base rule 600 in the corresponding module 607 in order to obtain the resulting set of checks 608.

Для вычисления итогового набора действий 609 достаточно объединить набор действий базового и текущего правил, и, по возможности, его оптимизировать. Эта работа происходит в соответствующем модуле 605.To calculate the final set of actions 609, it is sufficient to combine the set of actions of the basic and current rules, and, if possible, optimize it. This work takes place in the corresponding module 605.

Пример полей пакета и соответствующего набора проверок и действий.An example of package fields and a corresponding set of checks and actions.

Без ограничения общности будем считать, что пакет имеет только одно поле (таблица 1). На практике, полями пакета являются такие атрибуты, как адреса сетевого уровня отправителя и получателя, номер протокола транспортного уровня, адреса транспортного уровня (порты) отправителя и получателя, и другие атрибуты.Without loss of generality, we assume that a packet has only one field (table 1). In practice, the packet fields are attributes such as the network layer addresses of the sender and receiver, the protocol number of the transport layer, the addresses of the transport layer (ports) of the sender and receiver, and other attributes.

Figure 00000001
Figure 00000001

В таблице 2 представлен вариант списка проверок, которые используются в дальнейших примерах реализации изобретения. На практике в качестве проверок могут использоваться более сложные логические выражения, содержащие арифметические, битовые и другие операции, выполняемые над несколькими полями пакета.

Figure 00000002
Table 2 presents a variant of the list of checks that are used in further examples of the invention. In practice, more complex logical expressions containing arithmetic, bit, and other operations performed on several fields of a packet can be used as checks.
Figure 00000002

В таблице 3 представлен вариант списка действий, которые используются в дальнейших примерах реализации изобретения. На практике в качестве действий могут использоваться более сложные операции, например, инициализация поля пакета случайным числом.Table 3 presents a variant of the list of actions that are used in further examples of the invention. In practice, more complex operations can be used as actions, for example, initializing a packet field with a random number.

Figure 00000003
Figure 00000003

Рассмотрим варианты осуществления заявленного изобретения в соответствии с изложенными выше условиями. Построим примеры преобразования исходных произвольных правил в эквивалентные им наборы примитивных терминальных правил. Примеры демонстрируют принципы, на которых основана работа преобразователя для реализации способа.Consider embodiments of the claimed invention in accordance with the above conditions. Let us construct examples of the transformation of initial arbitrary rules into sets of primitive terminal rules equivalent to them. The examples demonstrate the principles on which the operation of the converter for implementing the method is based.

Пример 1 (таблицы 4 и 5) - набор исходных правил содержит одно нетерминальное правило (с действием LOG).Example 1 (tables 4 and 5) - a set of source rules contains one nonterminal rule (with the LOG action).

Figure 00000004
Figure 00000004

Нетрудно заметить, что правило №1 из таблицы 4 было преобразовано в правила №1 и 2 в таблице 5. При этом правило №1 из таблицы 5 является комбинацией правил №1 и 2 из таблицы 4, а правило №2 из таблицы 5 является комбинацией правил №1 и 3 из таблицы 5.It is easy to see that rule No. 1 from table 4 was converted into rules No. 1 and 2 in table 5. Moreover, rule No. 1 from table 5 is a combination of rules No. 1 and 2 from table 4, and rule No. 2 from table 5 is a combination rules No. 1 and 3 from table 5.

Пример 2 (таблицы 6 и 7) - набор исходных правил содержит одно нетерминальное правило, изменяющее порядок применения правил к пакету (с действием JUMP), и одно нетерминальное правило, изменяющее значение поля пакета (с действием MARK=MARK+X). Вместе эти правила образуют управляющую конструкцию, называемую в высокоуровневых языках программирования циклом.

Figure 00000005
Example 2 (tables 6 and 7) - a set of source rules contains one nonterminal rule that changes the order of applying the rules to a package (with the JUMP action), and one nonterminal rule that changes the value of the package field (with the action MARK = MARK + X). Together, these rules form a control construct called a loop in high-level programming languages.
Figure 00000005

Figure 00000006
Figure 00000006

Условием выхода из цикла является значение метки меньшее, чем 100. При этом каждую итерацию цикла метка увеличивается на 50. Поэтому пакет не может провести в цикле более двух итераций.The condition for exiting the loop is a label value less than 100. In this case, each iteration of the loop, the label is increased by 50. Therefore, a packet cannot perform more than two iterations in a loop.

Таблица 7 - Эквивалентный набор примитивных терминальных правилTable 7 - An equivalent set of primitive terminal rules

Figure 00000007
Figure 00000007

Анализируя пути прохождения пакетов можно выяснить, что, например, пакет с меткой 11 имеет путь, состоящий из правил №1, 2, 1, 2, 3 из таблицы 6. Преобразование этого пути в примитивное терминальное правило дает правило №1 из таблицы 7.Analyzing the paths of the packets, it can be found that, for example, a packet with label 11 has a path consisting of rules No. 1, 2, 1, 2, 3 from table 6. Converting this path to a primitive terminal rule gives rule No. 1 from table 7.

Пример 3 (таблицы 8 и 9) - исходный набор правил содержит непримитивное нетерминальное правило (с проверкой MARK % X=Y и действием LOG).

Figure 00000008
Example 3 (tables 8 and 9) - the initial set of rules contains a non-primitive nonterminal rule (with the MARK% X = Y check and the LOG action).
Figure 00000008

Figure 00000009
Figure 00000009

Поскольку метка может принимать значения только из диапазона от 0 до 255, очевидно, что дать число 5 в результате деления на 100 могут только три метки, а именно метки со значениями 5, 105 и 205. Соответственно, правило №1 из таблицы 8 преобразуется в три правила №1, 2, 3 из таблицы 9.Since the label can take values only from the range from 0 to 255, it is obvious that only three labels can give the number 5 as a result of dividing by 100, namely the labels with the values 5, 105 and 205. Accordingly, rule No. 1 from table 8 is converted to three rules No. 1, 2, 3 from table 9.

Таким образом, на основании вышеизложенного для реализации способа организации работы компонентов сетевого оборудования для обработки сетевых пакетов в данном техническом решении предлагаются следующие 4 варианта осуществления изобретения.Thus, based on the foregoing, for implementing the method of organizing the operation of network equipment components for processing network packets, the following 4 embodiments of the invention are proposed in this technical solution.

Основной вариант осуществления заявленного изобретения использует отдельный аппаратный компонент - аппаратный ускоритель, выполняющий функции преобразования, хранения и поиска правил (Вариант 1). Аппаратный компонент может быть реализован программным образом.The main embodiment of the claimed invention uses a separate hardware component - a hardware accelerator that performs the functions of conversion, storage and search of rules (Option 1). The hardware component may be implemented in software.

Эмуляция аппаратного компонента, с одной стороны, сводит к минимуму затраты на внедрение заявленного изобретения в существующее сетевое оборудование, но, с другой стороны, программная реализация имеет более низкую производительность по сравнению с аппаратной. В качестве компромисса может использоваться одно из нижеследующих вариантов осуществления изобретения, который предполагает реализацию части функционала аппаратным образом, а оставшейся части - программным образом.Emulation of a hardware component, on the one hand, minimizes the cost of introducing the claimed invention into existing network equipment, but, on the other hand, the software implementation has lower performance than hardware. As a compromise, one of the following embodiments of the invention can be used, which involves the implementation of part of the functionality in hardware, and the remaining part in software.

Схема на фиг. 7 иллюстрирует способ, для реализации которого используется полностью аппаратное решение, выполняющее функции преобразования, хранения и поиска правил (Вариант 1).The circuit of FIG. 7 illustrates a method for the implementation of which a fully hardware solution is used that performs the functions of transforming, storing and searching for rules (Option 1).

Вариант осуществления предполагает наличие дополнительного подключаемого компонента - аппаратного ускорителя 703, который берет на себя часть задач, связанных с принятием решений о дальнейших действиях, применяемых к сетевому пакету 709, тем самым снимая нагрузку с других компонентов системы, таких как центральный процессор 705, оперативная память 704, системные шины и так далее, в частности, аппаратный ускоритель 703 берет на себя задачу по преобразованию набора исходных правил 706 в набор примитивных терминальных правил, задачу построения индекса на основе преобразованных правил, задачу хранения преобразованных правил и индекса правил, задачу обработки запросов, поступающих от процессора 705, по поиску правил, под которые подходит заданный сетевой пакет 709, принятый из сетевого адаптера 702.An embodiment involves the presence of an additional plug-in component - hardware accelerator 703, which takes on some of the tasks associated with making decisions on further actions applied to network packet 709, thereby relieving the load from other system components, such as central processor 705, RAM 704, system buses, and so on, in particular, hardware accelerator 703 takes on the task of transforming a set of source rules 706 into a set of primitive terminal rules, the task of constructing ind KSA based on the converted rules, the task store the converted rules and regulations of the index, the query processing tasks received from the processor 705, to find the rules under which suits a given network packet 709 received from the NIC 702.

- Вариант осуществления предполагает наличие предварительного подготовительного этапа 700 работы оборудования. Этот этап заключается в преобразовании правил администратора к тому виду, который наилучшим образом подходит для обработки сетевых пакетов 709, поступивших на сетевую плату 702. Во время предварительного этапа 700 работы сетевого оборудования центральный процессор 705 инициирует DMA-пересылку исходных правил 706 из оперативной памяти 704 в аппаратный ускоритель 703. Аппаратный ускоритель 703 преобразует эти правила к примитивной терминальной форме и строит на их основе индекс. Блок-схема устройства для реализации способа приведена на фиг. 4. По завершении этого процесса аппаратный ускоритель 703 уведомляет центральный процессор 705 посредством аппаратного прерывания о своей готовности к обработке запросов.- The implementation option requires a preliminary preparatory stage 700 of the equipment. This step consists in converting the administrator’s rules to the one that is best suited for processing network packets 709 received on the network card 702. During the preliminary stage 700 of the operation of the network equipment, the central processor 705 initiates a DMA transfer of the original rules 706 from the main memory 704 to hardware accelerator 703. Hardware accelerator 703 converts these rules to a primitive terminal form and builds an index on their basis. A block diagram of a device for implementing the method is shown in FIG. 4. Upon completion of this process, hardware accelerator 703 notifies the central processor 705 by means of a hardware interrupt that it is ready to process requests.

- Вариант осуществления предполагает, что подготовительный этап 700 выполняется заблаговременно, до начала основного этапа 701 работы оборудования. Это означает, что сетевое оборудование не может приступить к обработке сетевых пакетов 709 в соответствии с заданным набором правил до тех пор, пока аппаратный ускоритель 703 не выполнит необходимые подготовительные действия и не сообщит об этом центральному процессору 705. Такая задержка необходима, так как именно за счет выполнения подготовительного этапа 700 сетевое оборудование способно впоследствии на основном этапе 701 работы значительно быстрее обрабатывать сетевые пакеты.- The implementation option assumes that the preparatory step 700 is carried out in advance, before the start of the main stage 701 of the equipment. This means that the network equipment cannot start processing network packets 709 in accordance with a given set of rules until the hardware accelerator 703 performs the necessary preparatory steps and notifies the central processor 705 of this. Such a delay is necessary, since it is for by completing the preparatory step 700, the network equipment is subsequently capable of processing network packets much faster in the main operation step 701.

- Вариант осуществления предполагает, что поиск правил, под которые подходит сетевой пакет 709, осуществляется в аппаратном ускорителе 703. Для этого центральный процессор 705 формирует и отправляет запрос на поиск правил для аппаратного ускорителя 703. Запрос состоит только из набора полей 707 обрабатываемых пакетов 709, которые встречаются в наборах проверок исходных правил. Аппаратный ускоритель 703 выполняет поиск правил, под которые подходит сетевой пакет 709, используя полученные от центрального процессора 705 наборы полей 707 и индекс правил, построенный на подготовительном этапе 700 работы оборудования.- The embodiment assumes that the search for the rules for which the network packet 709 is suitable is carried out in the hardware accelerator 703. For this, the central processor 705 generates and sends a search request for the rules for the hardware accelerator 703. The request consists only of a set of fields 707 of the processed packets 709, which are found in sets of checks of the original rules. The hardware accelerator 703 searches for the rules for which the network packet 709 is suitable, using the sets of fields 707 received from the central processor 705 and the rule index constructed at the preparatory stage 700 of the equipment.

- Вариант осуществления предполагает, что во время основного этапа 701 работы оборудования из аппаратного ускорителя 703 в центральный процессор 705 передаются наборы действий 708, ассоциированные с найденными примитивными терминальными правилами. Поскольку набор действий 708 терминального примитивного правила содержит в себе все действия исходных правил из пути пакета 709, то центральный процессор 705 может сразу же обработать сетевой пакет 709, не обращаясь к другим компонентам системы, получая при этом обработанный сетевой пакет 710, который может быть передан обратно в сеть с помощью сетевого адаптера 702.- The implementation option assumes that during the main stage 701 of the equipment from the hardware accelerator 703 to the Central processor 705 are transferred sets of actions 708 associated with the found primitive terminal rules. Since the set of actions 708 of the terminal primitive rule contains all the actions of the original rules from the path of the packet 709, the central processor 705 can immediately process the network packet 709 without accessing other components of the system, while receiving a processed network packet 710, which can be transmitted back to the network using the network adapter 702.

- Вариант осуществления предполагает, что оперативная память 704 используется процессором 705 для хранения правил только на предварительном этапе 700 работы оборудования. Во время предварительного этапа 700 хранение правил 706 в оперативной памяти 704 необходимо для организации их DMA-пересылки в аппаратный ускоритель 703. Во время основного этапа 701 работы сетевого оборудования хранение правил 706 в оперативной памяти 704 не требуется, поскольку процессор 705 получает всю необходимую информацию для обработки сетевых пакетов 709 непосредственно от аппаратного ускорителя 703.- The implementation option assumes that the RAM 704 is used by the processor 705 to store the rules only at a preliminary stage 700 of the equipment. During the preliminary step 700, the storage of the rules 706 in the RAM 704 is necessary for organizing their DMA transfer to the hardware accelerator 703. During the main stage 701 of the operation of the network equipment, the storage of the rules 706 in the RAM 704 is not required, since the processor 705 receives all the necessary information for processing network packets 709 directly from hardware accelerator 703.

Таким образом, повышение эффективности сетевого оборудования по обработке сетевых пакетов в соответствии с заданной конфигурацией достигается за счет построенного на подготовительном этапе 700 индекса правил. Индекс правил является более удобной формой представления терминальных правил для более эффективного поиска, время поиска в индексе правил ограничено сверху относительно небольшим фиксированным временем. Увеличение пропускной способности сетевого оборудования происходит за счет того, что время поиска в построенном индексе не зависит от количества правил в конфигурации сетевого оборудования. Учитываются только инспектируемые поля сетевого пакета, число которых является константой на всем протяжении работы сетевого оборудования.Thus, increasing the efficiency of network equipment for processing network packets in accordance with a given configuration is achieved due to the rule index constructed at the preparatory stage 700. The rule index is a more convenient form of representing terminal rules for a more efficient search; the search time in the rule index is limited from above by a relatively small fixed time. An increase in the throughput of network equipment is due to the fact that the search time in the constructed index does not depend on the number of rules in the configuration of network equipment. Only the inspected fields of the network packet are taken into account, the number of which is constant throughout the operation of the network equipment.

Схема на фиг. 8 иллюстрирует способ, для реализации которого используется аппаратное решение, выполняющее функции преобразования и поиска правил, с хранением исходных и примитивных терминальных правил в оперативной памяти (Вариант 2).The circuit of FIG. 8 illustrates a method for the implementation of which a hardware solution is used that performs the functions of transforming and searching for rules, storing the source and primitive terminal rules in RAM (Option 2).

Вариант осуществления предполагает наличие дополнительного подключаемого компонента - аппаратного ускорителя 803. Аппаратный ускоритель 803 берет на себя часть задач, связанных с обработкой сетевых пакетов 811, тем самым снимая нагрузку с других компонентов системы, таких как центральный процессор 805, оперативная память 804, системные шины и так далее. В частности, аппаратный ускоритель 803 берет на себя задачу по преобразованию набора исходных правил 806 в набор примитивных терминальных правил 807, задачу построения индекса на основе преобразованных правил, задачу хранения индекса правил, задачу обработки запросов, поступающих от процессора 805, по поиску правил, под которые подходит заданный сетевой пакет 811.An embodiment involves the presence of an additional plug-in component - hardware accelerator 803. Hardware accelerator 803 takes on some of the tasks associated with processing network packets 811, thereby relieving the load from other system components, such as central processor 805, RAM 804, system buses, and etc. In particular, hardware accelerator 803 takes on the task of transforming the set of source rules 806 into a set of primitive terminal rules 807, the task of constructing an index based on the converted rules, the task of storing the index of rules, the task of processing requests from the processor 805, to find the rules under which matches the given network packet 811.

- Вариант осуществления предполагает наличие предварительного подготовительного этапа 800 работы оборудования. Этот этап заключается в преобразовании правил администратора к тому виду, который наилучшим образом подходит для обработки сетевых пакетов 811, поступивших на сетевую плату 802. Во время подготовительного этапа 800 работы сетевого оборудования центральный процессор 805 инициирует DMA-пересылку исходных правил 806 из оперативной памяти 804 в аппаратный ускоритель 803. Аппаратный ускоритель 803 преобразует эти правила 806 к примитивной терминальной форме и строит на их основе индекс.По завершении этого процесса аппаратный ускоритель 803 уведомляет центральный процессор 805 посредством аппаратного прерывания о своей готовности к обработке запросов. Центральный процессор 805 инициирует обратную DMA-пересылку уже преобразованных к примитивной терминальной форме правил 807 из аппаратного ускорителя 803 в оперативную память 804.- The implementation option requires a preliminary preparatory stage 800 of the equipment. This step consists in converting the administrator rules to the type that is best suited for processing network packets 811 received on the network card 802. During the preparatory stage 800 of the network equipment, the central processor 805 initiates a DMA transfer of the original rules 806 from the main memory 804 to hardware accelerator 803. Hardware accelerator 803 converts these rules 806 to a primitive terminal form and builds an index on their basis. Upon completion of this process, hardware accelerator 803 notifies prices 805-sectoral processor through hardware interrupt its willingness to process requests. The central processor 805 initiates the reverse DMA transfer of the rules 807, already converted to the primitive terminal form, from the hardware accelerator 803 to the RAM 804.

- Вариант осуществления предполагает, что подготовительный этап 800 выполняется заблаговременно, до начала основного этапа 801 работы оборудования. Это означает, что сетевое оборудование не может приступить к обработке сетевых пакетов 811 в соответствии с заданным набором правил до тех пор, пока аппаратный ускоритель 803 не выполнит необходимые подготовительные действия и не сообщит об этом центральному процессору 805. Такая задержка необходима, так как именно за счет выполнения подготовительного этапа 800 сетевое оборудование способно впоследствии на основном этапе 801 работы значительно быстрее обрабатывать сетевые пакеты 811.- The implementation option assumes that the preparatory stage 800 is carried out in advance, before the start of the main stage 801 of the equipment. This means that the network equipment cannot start processing network packets 811 in accordance with a given set of rules until the hardware accelerator 803 performs the necessary preparatory actions and notifies the central processor 805 of this. Such a delay is necessary, since it is for by completing the preparatory step 800, the network equipment is subsequently capable of processing network packets 811 much faster in the main operation step 801.

- Вариант осуществления предполагает, что поиск правил, под которые подходит сетевой пакет 811, осуществляется в аппаратном ускорителе 803. Для этого центральный процессор 805 формирует запрос на поиск правил для аппаратного ускорителя 803. Запрос состоит только из набора полей 808 обрабатываемых пакетов 811, которые встречаются в наборах проверок исходных правил 806. Аппаратный ускоритель 803 выполняет поиск правил, под которые подходит сетевой пакет 811, используя полученные наборы полей 808 и индекс правил, построенный на подготовительном этапе 800 работы оборудования.- The embodiment assumes that the search for the rules for which the network packet 811 is suitable is carried out in the hardware accelerator 803. For this, the central processor 805 generates a search request for the rules for the hardware accelerator 803. The request consists of only a set of fields 808 of the processed packets 811 that are encountered in the sets of checks of the initial rules 806. The hardware accelerator 803 searches for the rules for which the network packet 811 is suitable, using the obtained sets of fields 808 and the rule index constructed at the preparatory stage 800 r bots equipment.

- Вариант осуществления предполагает, что во время основного этапа 801 работы оборудования из аппаратного ускорителя 803 в центральный процессор 805 передаются только номера 809 примитивных терминальных правил, под которые подошли обрабатываемые пакеты 811. Используя эти номера правил 809, центральный процессор 805 вычисляет позиции наборов действий 810, ассоциированных с найденными примитивными терминальными правилами в оперативной памяти 804 и запрашивает их. Получив наборы действий 810, центральный процессор 805 применяет их к сетевым пакетам 811, получая при этом обработанные сетевые пакеты 812, которые затем отправляются в сеть сетевым адаптером 802.- The embodiment assumes that during the main operation stage 801, from the hardware accelerator 803, only the numbers 809 of the primitive terminal rules are passed to the processed packets 811. Using these rule numbers 809, the central processor 805 calculates the positions of the action sets 810 associated with the found primitive terminal rules in random access memory 804 and requests them. Having received the action sets 810, the central processor 805 applies them to the network packets 811, while receiving processed network packets 812, which are then sent to the network by the network adapter 802.

- Вариант осуществления предполагает, что оперативная память 804 используется процессором 805 для хранения как исходных 806, так и примитивных терминальных правил 807. Хранение правил в оперативной памяти 804 позволяет упростить конструкцию аппаратного ускорителя 803, однако требует дополнительного обращения, связанного с передачей наборов действий 810 на каждый сетевой пакет 811 к оперативной памяти 804 со стороны центрального процессора 805 во время основного этапа работы 801.- The embodiment assumes that the RAM 804 is used by the processor 805 to store both the original 806 and the primitive terminal rules 807. Storing the rules in the RAM 804 allows you to simplify the design of the hardware accelerator 803, however, it requires additional treatment associated with transferring the action sets 810 to each network packet 811 to RAM 804 from the central processor 805 during the main operation 801.

Таким образом, повышение эффективности сетевого оборудования по обработке сетевых пакетов в соответствии с заданной конфигурацией достигается за счет построенного на подготовительном этапе 800 индекса правил. Индекс правил является более удобной формой представления терминальных правил для более эффективного поиска, время поиска в индексе правил ограничено сверху относительно небольшим фиксированным временем. Увеличение пропускной способности сетевого оборудования происходит за счет того, что время поиска в построенном индексе не зависит от количества правил в конфигурации сетевого оборудования. Учитываются только инспектируемые поля сетевого пакета, число которых является константой на всем протяжении работы сетевого оборудования.Thus, increasing the efficiency of network equipment for processing network packets in accordance with a given configuration is achieved due to the rule index constructed at the preparatory stage 800. The rule index is a more convenient form of representing terminal rules for a more efficient search; the search time in the rule index is limited from above by a relatively small fixed time. An increase in the throughput of network equipment is due to the fact that the search time in the constructed index does not depend on the number of rules in the configuration of network equipment. Only the inspected fields of the network packet are taken into account, the number of which is constant throughout the operation of the network equipment.

Схема на фиг. 9 иллюстрирует способ, для реализации которого используется аппаратное решение, выполняющее функции только преобразования правил (Вариант 3).The circuit of FIG. 9 illustrates a method for the implementation of which a hardware solution is used that performs the functions of only rule translation (Option 3).

- Вариант осуществления предполагает наличие дополнительного подключаемого компонента - аппаратного ускорителя 903. Аппаратный ускоритель 903 берет на себя часть задач, связанных с обработкой сетевых пакетов 906, тем самым снимая нагрузку с других компонентов системы, таких как центральный процессор 905, оперативная память 904, системные шины и так далее. В частности, аппаратный ускоритель 903 берет на себя задачу по преобразованию набора исходных правил 907 в набор примитивных терминальных правил 908.- The implementation option involves the presence of an additional plug-in component - hardware accelerator 903. Hardware accelerator 903 takes on some of the tasks associated with processing network packets 906, thereby relieving the load from other system components, such as central processor 905, random access memory 904, system buses etc. In particular, hardware accelerator 903 takes on the task of transforming a set of source rules 907 into a set of primitive terminal rules 908.

- Вариант осуществления предполагает наличие предварительного подготовительного этапа 900 работы оборудования. Этот этап заключается в преобразовании правил администратора к тому виду, который наилучшим образом подходит для обработки сетевых пакетов 906. Во время предварительного подготовительного этапа 900 работы сетевого оборудования центральный процессор 905 инициирует DMA - пересылку исходных правил 907 из оперативной памяти 904 в аппаратный ускоритель 903. Аппаратный ускоритель 903 преобразует эти правила к примитивной терминальной форме 908 и уведомляет центральный процессор 905 посредством аппаратного прерывания об этом. Центральный процессор 905 инициирует обратную DMA-пересылку уже преобразованных правил 908 из аппаратного ускорителя 903 в оперативную память 904. Затем центральный процессор 905 строит в оперативной памяти 904 индекс 909 терминальных примитивных правил 908.- The implementation option requires a preliminary preparatory stage 900 of the equipment. This stage consists in converting the administrator rules to the type that is best suited for processing network packets 906. During the preliminary preparatory stage 900 for the operation of network equipment, the central processor 905 initiates DMA — the transfer of the original rules 907 from random access memory 904 to hardware accelerator 903. Hardware the accelerator 903 converts these rules to a primitive terminal form 908 and notifies the central processor 905 through a hardware interrupt. The central processor 905 initiates a DMA reverse transfer of the already converted rules 908 from the hardware accelerator 903 to the main memory 904. Then, the central processor 905 constructs an index 909 of terminal primitive rules 908 in the main memory 904.

- Вариант осуществления предполагает, что подготовительный этап 900 выполняется заблаговременно, до начала основного этапа 901 работы оборудования. Это означает, что сетевое оборудование не может приступить к обработке сетевых пакетов 906 в соответствии с заданным набором правил 907 до тех пор, пока аппаратный ускоритель 903 не выполнит необходимые подготовительные действия и не сообщит об этом центральному процессору 905. Такая задержка необходима, так как именно за счет выполнения подготовительного этапа 900 сетевое оборудование способно впоследствии на основном этапе 901 работы значительно быстрее обрабатывать сетевые пакеты 906.- The implementation option assumes that the preparatory phase 900 is carried out in advance, before the start of the main stage 901 of the equipment. This means that the network equipment cannot start processing network packets 906 in accordance with a given set of rules 907 until the hardware accelerator 903 performs the necessary preparatory actions and notifies the central processor 905 of this. Such a delay is necessary, since due to the implementation of the preparatory stage 900, the network equipment is subsequently capable of processing network packets 906 much faster at the main operation stage 901.

- Вариант осуществления предполагает, что поиск правил, под которые подходит сетевой пакет 906, осуществляется путем взаимодействия процессора 905 и оперативной памяти 904. Для этого центральный процессор 905 формирует набор полей 910 обрабатываемых пакетов 906 и использует их в качестве ключа для индекса правил 909, построенного на подготовительном этапе 900 работы оборудования и хранящийся в оперативной памяти 904.- The embodiment assumes that the search for the rules for which the network packet 906 is suitable is carried out by the interaction of the processor 905 and the RAM 904. For this, the central processor 905 forms a set of fields 910 of the processed packets 906 and uses them as a key for the rule index 909 constructed at the preparatory stage 900 equipment operation and stored in random access memory 904.

- Вариант осуществления предполагает, что во время основного этапа 901 работы оборудования между аппаратным ускорителем 903 и оперативной памятью 904 передача данных отсутствует. Поскольку индекс правил 909 хранится в оперативной памяти 904, то номера найденных правил 911 центральный процессор 905 получает также из оперативной памяти 904. Используя эти номера правил 911, центральный процессор 905 вычисляет позиции наборов действий 912, ассоциированных с найденными примитивными терминальными правилами 908 в оперативной памяти 904 и запрашивает их. Получив наборы действий 912, центральный процессор 905 применяет их к сетевым пакетам 906, получая при этом обработанные сетевые пакеты 913, которые затем отправляются в сеть сетевым адаптером 902.- The implementation option assumes that during the main stage 901 of the equipment between the hardware accelerator 903 and RAM 904 data transfer is absent. Since the rule index 909 is stored in RAM 904, the central processor 905 also obtains the numbers of the found rules 911 from the RAM 904. Using these 911 rule numbers, the CPU 905 calculates the positions of the action sets 912 associated with the found primitive terminal rules 908 in the RAM 904 and asks for them. After receiving the action sets 912, the central processor 905 applies them to the network packets 906, while receiving processed network packets 913, which are then sent to the network by the network adapter 902.

- Вариант осуществления предполагает, что оперативная память 904 используется процессором 905 для хранения исходных правил 907, преобразованных правил 908 и для хранения индекса правил 909. Хранение правил в оперативной памяти 904 позволяет упростить конструкцию аппаратного ускорителя 903, однако требует нескольких дополнительных обращений на каждый сетевой пакет 906 к оперативной памяти 904 со стороны центрального процессора 905 во время основного этапа работы 901.- The embodiment assumes that the RAM 904 is used by the processor 905 to store the original rules 907, the converted rules 908, and to store the index of the rules 909. Storing the rules in the RAM 904 simplifies the design of the hardware accelerator 903, however, it requires several additional calls for each network packet 906 to RAM 904 from the side of the central processor 905 during a milestone 901.

Таким образом, повышение эффективности сетевого оборудования по обработке сетевых пакетов в соответствии с заданной конфигурацией достигается за счет построенного на подготовительном этапе 900 индекса правил 909. Индекс правил 909 является более удобной формой представления терминальных правил для более эффективного поиска, время поиска в индексе правил ограничено сверху относительно небольшим фиксированным временем. Увеличение пропускной способности сетевого оборудования происходит за счет того, что время поиска в построенном индексе не зависит от количества правил в конфигурации сетевого оборудования. Учитываются только инспектируемые поля сетевого пакета, число которых является константой на всем протяжении работы сетевого оборудования.Thus, an increase in the efficiency of network equipment for processing network packets in accordance with a given configuration is achieved due to the rule index 909 constructed at the preparatory stage 900. The rule index 909 is a more convenient form of representing terminal rules for more efficient search, the search time in the rule index is limited from above relatively short fixed time. An increase in the throughput of network equipment is due to the fact that the search time in the constructed index does not depend on the number of rules in the configuration of network equipment. Only the inspected fields of the network packet are taken into account, the number of which is constant throughout the operation of the network equipment.

Схема на фиг. 10 иллюстрирует способ, в котором используется полностью программное решение (Вариант 4).The circuit of FIG. 10 illustrates a method in which a fully software solution is used (Option 4).

Вариант осуществления предполагает снижение количества дополнительных подключаемых аппаратных компонентов.An embodiment involves reducing the number of additional plug-in hardware components.

- Вариант осуществления предполагает наличие предварительного подготовительного этапа 1000 работы оборудования. Этот этап заключается в преобразовании правил администратора к тому виду, который наилучшим образом подходит для обработки сетевых пакетов 1005 сетевым адаптером 1002. Во время предварительного подготовительного этапа 1000 работы сетевого оборудования центральный процессор 1004 преобразует исходные правила 1006 к примитивной терминальной форме и строит в оперативной памяти 1003 индекс 1008 терминальных примитивных правил 1007.- An implementation option involves the presence of a preliminary preparatory stage 1000 of equipment operation. This step consists in converting the administrator’s rules to the type that is best suited for processing network packets 1005 by the network adapter 1002. During the preliminary preparatory stage 1000 of the operation of the network equipment, the central processor 1004 converts the original rules 1006 to a primitive terminal form and builds in random access memory 1003 index 1008 of terminal primitive rules 1007.

- Вариант осуществления предполагает, что подготовительный этап 1000 выполняется заблаговременно, до начала основного этапа 1001 работы оборудования. Это означает, что сетевое оборудование не может приступить к обработке сетевых пакетов 1005 в соответствии с заданным набором правил 1006 до тех пор, пока центральный процессор 1004 не выполнит необходимые подготовительные действия. Такая задержка необходима, так как именно за счет выполнения подготовительного этапа 1000 сетевое оборудование способно впоследствии на основном этапе 1001 работы значительно быстрее обрабатывать сетевые пакеты 1005.- The implementation option assumes that the preparatory stage 1000 is carried out in advance, before the start of the main stage 1001 of the equipment. This means that the network equipment cannot begin processing network packets 1005 in accordance with a predetermined set of rules 1006 until the central processor 1004 performs the necessary preparatory steps. Such a delay is necessary, since it is precisely due to the implementation of the preparatory stage 1000 that the network equipment is capable of subsequently processing network packets 1005 much faster at the main operation stage 1001.

- Вариант осуществления предполагает, что поиск правил, под которые подходит сетевой пакет 1005, осуществляется путем взаимодействия процессора 1004 и оперативной памяти 1003. Для этого центральный процессор 1004 формирует набор полей 1009 обрабатываемых пакетов и использует их в качестве ключа для индекса правил 1008, построенный на подготовительном этапе 1000 работы оборудования и хранящийся в оперативной памяти 1003.- The embodiment assumes that the search for the rules for which the network packet 1005 fits is carried out by the interaction of the processor 1004 and RAM 1003. For this, the central processor 1004 forms a set of fields 1009 of the processed packets and uses them as a key for the rule index 1008, built on preparatory stage 1000 of the equipment and stored in RAM 1003.

- Вариант осуществления предполагает, что во время основного этапа 1001 работы оборудования передача данных осуществляется только между центральным процессором 1004 и оперативной памятью 1003. Поскольку индекс правил 1008 хранится в оперативной памяти 1003, то номера найденных правил 1010 центральный процессор 1004 получает также из оперативной памяти 1003. Используя эти номера правил 1010, центральный процессор 1004 вычисляет позиции наборов действий 1011, ассоциированных с найденными примитивными терминальными правилами 1007 в оперативной памяти 1003 и запрашивает их. Получив наборы действий 1011, центральный процессор 1004 применяет их к сетевым пакетам 1005, получая при этом обработанные сетевые пакеты 1012, которые затем отправляются в сеть сетевым адаптером 1002.- The embodiment assumes that during the main operation stage 1001 of the equipment, data is transferred only between the central processor 1004 and the main memory 1003. Since the index of rules 1008 is stored in the main memory 1003, the numbers of the found rules 1010 are also received by the central processor 1004 from the main memory 1003 Using these rule numbers 1010, the CPU 1004 calculates the positions of the action sets 1011 associated with the found primitive terminal rules 1007 in the RAM 1003 and the Shiva them. Having received the action sets 1011, the central processor 1004 applies them to the network packets 1005, while receiving processed network packets 1012, which are then sent to the network by the network adapter 1002.

- Вариант осуществления предполагает, что оперативная память 1003 используется процессором 1004 для хранения исходных правил 1006, преобразованных правил 1007 и для хранения индекса правил 1008. Хранение правил 1006 и 1007 и индекса правил 1008 в оперативной памяти 1003 и преобразование исходных правил 1006 к примитивной терминальной форме с помощью центрального процессора 1004 позволяет полностью убрать необходимость в аппаратном ускорителе, однако увеличивает время, затрачиваемое на выполнение подготовительного этапа 1000 работы оборудования, и требует нескольких дополнительных обращений на каждый сетевой пакет 1005 к оперативной памяти 1003 со стороны центрального процессора 1004 во время основного этапа работы 1001.- An embodiment assumes that the RAM 1003 is used by the processor 1004 to store the original rules 1006, the converted rules 1007 and to store the index of the rules 1008. Storing the rules 1006 and 1007 and the index of the rules 1008 in RAM 1003 and the conversion of the original rules 1006 to a primitive terminal form using the central processor 1004 allows you to completely remove the need for a hardware accelerator, however, it increases the time taken to complete the preparatory stage 1000 of equipment operation, and requires no waged on additional requests for each network packet 1005 to the RAM 1003 by the CPU 1004 during the main stage of operation in 1001.

Таким образом, повышение эффективности сетевого оборудования по обработке сетевых пакетов в соответствии с заданной конфигурацией достигается за счет построенного на подготовительном этапе 1000 индекса правил 1008. Индекс правил 1008 является более удобной формой представления терминальных правил для более эффективного поиска, время поиска в индексе правил ограничено сверху относительно небольшим фиксированным временем. Увеличение пропускной способности сетевого оборудования происходит за счет того, что время поиска в построенном индексе не зависит от количества правил в конфигурации сетевого оборудования. Учитываются только инспектируемые поля сетевого пакета, число которых является константой на всем протяжении работы сетевого оборудования.Thus, an increase in the efficiency of network equipment for processing network packets in accordance with a given configuration is achieved due to the rule index 1008 constructed at the preparatory stage 1000. The rule index 1008 is a more convenient form of representing terminal rules for more efficient search, the search time in the rule index is limited from above relatively short fixed time. An increase in the throughput of network equipment is due to the fact that the search time in the constructed index does not depend on the number of rules in the configuration of network equipment. Only the inspected fields of the network packet are taken into account, the number of which is constant throughout the operation of the network equipment.

Таким образом, с помощью данного изобретения обеспечивается решение задачи, которая заключается в разработке способа взаимодействия процессора с другими компонентами системы, приводящего к увеличению количества сетевых пакетов, которые возможно передать из одного сегмента в сети в другой за единицу времени, соблюдая при этом политику безопасности, установленную администратором сети.Thus, with the help of this invention, it is possible to solve the problem, which consists in developing a method for the processor to interact with other system components, leading to an increase in the number of network packets that can be transferred from one segment of the network to another in a unit of time, while observing the security policy, set by the network administrator.

При этом способ не требует использования новых инструментов настройки от администратора сетевого оборудования и не требует замены и модификации существующих компонентов системы.Moreover, the method does not require the use of new configuration tools from the network equipment administrator and does not require replacement or modification of existing system components.

Технический результат достигается за счет реализации способа организации взаимодействия компонентов сетевого оборудования, который для заданного сетевого пакета исключает загрузку в процессор тех правил, под которые этот пакет не может подойти, и обеспечивает загрузку только тех правил, под которые этот пакет подходит, сводя к минимуму количество пересылок данных между центральным процессором и другими компонентами системы. То есть обеспечивается существенное увеличение пропускной способности сетевого оборудования с заданной конфигурацией, которое находится на границе сегментов сети.The technical result is achieved through the implementation of a method for organizing the interaction of network equipment components, which for a given network packet eliminates loading into the processor those rules that this package cannot match, and ensures that only the rules that this package is suitable for are downloaded, minimizing the number of data transfers between the central processor and other components of the system. That is, a significant increase in the throughput of network equipment with a given configuration, which is located at the boundary of network segments, is provided.

Источники информацииSources of information

1. Madhi D., Ramasamy К., 2007, "Network routing algorithms, protocols, and architectures", Morgan Kaufmann, USA, стр. 1-957.1. Madhi D., Ramasamy K., 2007, "Network routing algorithms, protocols, and architectures", Morgan Kaufmann, USA, pp. 1-957.

2. Varghese G., 2005, "Network Algorithmics An Interdisciplinary Approach to Designing Fast Networked Devices ", Morgan Kaufmann, USA. стр. 1-491.2. Varghese G., 2005, "Network Algorithmics An Interdisciplinary Approach to Designing Fast Networked Devices", Morgan Kaufmann, USA. p. 1-491.

3. Патент RU 2 589 340 C2, МПК H04L 12/70, 10.07.2016. - Сетевая система и способ получения данных тега VLAN.3. Patent RU 2 589 340 C2, IPC H04L 12/70, 07/10/2016. - Network system and method for obtaining VLAN tag data.

4. Патент RU 2 628 476 С1, МПК H04L 12/70, 17.08.2017. - Коммутирующее устройство, контроллер, способ конфигурирования коммутирующего устройства и способ и система для обработки пакета.4. Patent RU 2 628 476 C1, IPC H04L 12/70, 08/17/2017. A switching device, a controller, a method for configuring a switching device, and a method and system for processing a packet.

5. Патент RU 2 609 086 С2, МПК H04L 12/70, 30.01.2017. - Сетевое устройство пересылки пакетов (варианты), способ настройки сетевого устройства пересылки пакетов (варианты) и способ пересылки пакета.5. Patent RU 2 609 086 C2, IPC H04L 12/70, 01/30/2017. - Network packet forwarding device (options), a method for configuring a network packet forwarding device (options), and a packet forwarding method.

6. Патент RU 2 554 543 С2, МПК H04L 12/00, H04L 12/70, 27.06.2015. - Блок связи, система связи, способ связи и носитель записи.6. Patent RU 2 554 543 C2, IPC H04L 12/00, H04L 12/70, 06/27/2015. - Communication unit, communication system, communication method and recording medium.

Claims (23)

1. Способ организации работы компонентов сетевого оборудования для обработки сетевых пакетов, реализуемый с помощью полностью аппаратного решения, выполняющего функции преобразования, хранения и поиска правил, необходимых для обработки сетевых пакетов по заданному набору полей пакета, при этом способ включает в себя следующие действия: аппаратный ускоритель 703 преобразует набор исходных правил 706 в набор примитивных терминальных правил, выполняет построение индекса правил для определения позиции искомого правила в буфере примитивных терминальных правил, хранение преобразованных правил и индекса правил, обработку запросов, поступающих от процессора 705, по поиску правил, под которые подходит заданный сетевой пакет 709, при этом в качестве запроса используются набор полей 707 обрабатываемых пакетов, в качестве ответа на запрос используется набор действий 708, ассоциированный с найденными примитивными терминальными правилами, применение которого к пакету дает обработанный сетевой пакет 710.1. The method of organizing the operation of network equipment components for processing network packets, implemented using a fully hardware solution that performs the functions of converting, storing and searching for the rules necessary for processing network packets according to a given set of packet fields, the method includes the following: hardware the accelerator 703 converts the set of source rules 706 into a set of primitive terminal rules, builds an index of rules to determine the position of the desired rule in the buffer of primitive terminal rules, storing the transformed rules and the index of rules, processing requests from the processor 705 to find the rules for which the given network packet 709 is suitable, while the request uses a set of fields 707 of the processed packets, a set of actions is used as the response to the request 708, associated with the found primitive terminal rules, the application of which to the packet gives a processed network packet 710. 2. Способ по п. 1, в котором: осуществляется предварительный подготовительный этап 700 работы сетевого оборудования преобразования правил администратора, при этом центральный процессор 705 инициирует DMA-пересылку исходных правил 706 из оперативной памяти 704 в аппаратный ускоритель 703, аппаратный ускоритель 703 преобразует эти правила к примитивной терминальной форме и строит на их основе индекс и уведомляет центральный процессор 705 посредством аппаратного прерывания о своей готовности к обработке запросов.2. The method according to claim 1, in which: a preliminary preparatory step 700 of the network equipment for converting administrator rules is performed, the central processor 705 initiates a DMA transfer of the original rules 706 from the RAM 704 to the hardware accelerator 703, the hardware accelerator 703 converts these rules to a primitive terminal form and builds an index on their basis and notifies the central processor 705 by means of a hardware interrupt about its readiness to process requests. 3. Способ по п. 1, в котором: подготовительный этап 700 выполняется заблаговременно, до начала основного этапа 701 работы оборудования, при этом сетевое оборудование выполняет обработку сетевых пакетов 709 в соответствии с заданным набором правил после того, как аппаратный ускоритель 703 выполняет необходимые подготовительные действия и сообщает об этом центральному процессору 705.3. The method according to p. 1, in which: the preparatory step 700 is performed in advance, before the main stage 701 of the equipment, the network equipment performs processing of network packets 709 in accordance with a given set of rules after the hardware accelerator 703 performs the necessary preparatory action and reports this to the central processor 705. 4. Способ по п. 1, в котором: поиск правил, под которые подходит сетевой пакет 709, осуществляется в аппаратном ускорителе 703, для этого центральный процессор 705 формирует и отправляет запрос на поиск правил для аппаратного ускорителя 703, запрос состоит только из набора полей 707 обрабатываемых пакетов 709, которые встречаются в наборах проверок исходных правил, аппаратный ускоритель 703 выполняет поиск правил, под которые подходит сетевой пакет 709, используя полученные от центрального процессора 705 наборы полей 707 и индекс правил, построенный на подготовительном этапе 700 работы оборудования.4. The method according to claim 1, in which: the search for the rules for which the network packet 709 is suitable is carried out in the hardware accelerator 703, for this the central processor 705 generates and sends a search request for the rules for the hardware accelerator 703, the request consists only of a set of fields 707 processed packets 709, which are found in sets of checks of the original rules, hardware accelerator 703 searches for the rules for which the network packet 709 fits, using the sets of fields 707 received from the central processor 705 and the rule index built on preparatory phase 700 equipment operation. 5. Способ по п. 1, в котором: во время основного этапа 701 работы оборудования из аппаратного ускорителя 703 в центральный процессор 705 передаются наборы действий 708, ассоциированные с найденными примитивными терминальными правилами, поскольку набор действий 708 терминального примитивного правила содержит в себе все действия исходных правил из пути пакета 709, то центральный процессор 705 может сразу же обработать сетевой пакет 709, не обращаясь к другим компонентам системы, получая при этом обработанный сетевой пакет 710, который может быть передан обратно в сеть с помощью сетевого адаптера 702.5. The method according to p. 1, in which: during the main stage 701 of operation of the equipment, sets of actions 708 associated with the found primitive terminal rules are transferred from the hardware accelerator 703 to the central processor 705, since the set of actions 708 of the terminal primitive rule contains all the actions the original rules from the packet path 709, the central processor 705 can immediately process the network packet 709 without resorting to other components of the system, while receiving a processed network packet 710, which can be transmitted of inverse to the network using a network adapter 702. 6. Способ по п. 1, в котором: оперативная память 704 используется процессором 705 для хранения правил только на предварительном этапе 700 работы оборудования, во время предварительного этапа 700 хранение правил 706 в оперативной памяти 704 необходимо для организации их DMA-пересылки в аппаратный ускоритель 703, во время основного этапа 701 работы сетевого оборудования хранение правил 706 в оперативной памяти 704 не требуется, поскольку процессор 705 получает всю необходимую информацию для обработки сетевых пакетов 709 непосредственно от аппаратного ускорителя 703.6. The method according to p. 1, in which: the RAM 704 is used by the processor 705 to store the rules only at the preliminary stage 700 of equipment operation, during the preliminary stage 700 the storage of the rules 706 in the RAM 704 is necessary for organizing their DMA transfer to the hardware accelerator 703, during the main stage 701 of the operation of network equipment, the storage of rules 706 in RAM 704 is not required, since the processor 705 receives all the necessary information for processing network packets 709 directly from the hardware will accelerate A 703. 7. Способ организации работы компонентов сетевого оборудования для обработки сетевых пакетов, реализуемый с помощью аппаратного решения, выполняющего функции преобразования и поиска правил, с хранением в оперативной памяти исходных и примитивных терминальных правил, необходимых для обработки сетевых пакетов по заданному набору полей пакета, в котором дополнительный подключаемый компонент - аппаратный ускоритель 803 осуществляет преобразование набора исходных правил в набор примитивных терминальных правил, построение индекса правил для определения позиции искомого правила в буфере примитивных терминальных правил, хранение индекса правил, обработку запросов, поступающих от процессора 805, поиск правил, которые выполняет заданный сетевой пакет 811, при этом в качестве запроса используется набор полей 808 обрабатываемых пакетов, в качестве ответа на запрос используются номера правил 809, которые могут использоваться для получения набора действий 810, применение которого к пакету дает обработанный сетевой пакет 812.7. A method of organizing the operation of components of network equipment for processing network packets, implemented using a hardware solution that performs the functions of converting and searching for rules, storing in RAM the original and primitive terminal rules necessary for processing network packets according to a given set of packet fields, in which an additional plug-in component - hardware accelerator 803 converts a set of source rules into a set of primitive terminal rules, constructs an index of rules for To determine the position of the desired rule in the buffer of primitive terminal rules, store the rule index, process requests received from the processor 805, search for the rules that the given network packet 811 executes, while the query uses a set of fields 808 of the processed packets as a response to the request the rule numbers 809 are used, which can be used to obtain a set of actions 810, the application of which to the packet gives a processed network packet 812. 8. Способ по п. 7, в котором предполагается наличие предварительного подготовительного этапа 800 работы оборудования, который заключается в преобразовании правил администратора, при этом во время подготовительного этапа 800 работы сетевого оборудования центральный процессор 805 инициирует DMA-пересылку исходных правил 806 из оперативной памяти 804 в аппаратный ускоритель 803, который преобразует эти правила 806 к примитивной терминальной форме и строит на их основе индекс, по завершении этого процесса аппаратный ускоритель 803 уведомляет центральный процессор 805 посредством аппаратного прерывания о своей готовности к обработке запросов, центральный процессор 805 инициирует обратную DMA-пересылку уже преобразованных к примитивной терминальной форме правил 807 из аппаратного ускорителя 803 в оперативную память 804.8. The method according to claim 7, in which it is assumed that there is a preliminary preparatory stage 800 for the operation of the equipment, which consists in converting administrator rules, while during the preparatory stage 800 for the operation of network equipment, the central processor 805 initiates a DMA transfer of the original rules 806 from the RAM 804 into hardware accelerator 803, which converts these rules 806 to a primitive terminal form and builds an index on their basis, upon completion of this process, hardware accelerator 803 notifies the central second processor 805 through a hardware interrupt its willingness to process requests, the CPU 805 initiates reverse DMA-forwarding is already converted to a primitive form of the terminal 807 of the rules of the hardware accelerator 803 into the RAM 804. 9. Способ по п. 7, в котором подготовительный этап 800 выполняется заблаговременно, до начала основного этапа 801 работы оборудования, это означает, что сетевое оборудование приступает к обработке сетевых пакетов 811 в соответствии с заданным набором правил после того, как аппаратный ускоритель 803 выполнит необходимые подготовительные действия и сообщит об этом центральному процессору 805.9. The method of claim 7, wherein the preparatory step 800 is performed well in advance of the start of the main operation step 801 of the equipment, which means that the network equipment starts processing network packets 811 in accordance with a predetermined set of rules after the hardware accelerator 803 executes necessary preparatory actions and will notify the central processor 805 of this. 10. Способ по п. 7, в котором поиск правил, под которые подходит сетевой пакет 811, осуществляется в аппаратном ускорителе 803, для этого центральный процессор 805 формирует запрос на поиск правил для аппаратного ускорителя 803, запрос состоит только из набора полей 808 обрабатываемых пакетов 811, которые встречаются в наборах проверок исходных правил 806, аппаратный ускоритель 803 выполняет поиск правил, под которые подходит сетевой пакет 811, используя полученные наборы полей 808 и индекс правил, построенный на подготовительном этапе 800 работы оборудования.10. The method according to claim 7, in which the search for the rules for which the network packet 811 is suitable is carried out in the hardware accelerator 803, for this the central processor 805 generates a search request for the rules for the hardware accelerator 803, the request consists only of a set of fields 808 of the processed packets 811, which are found in the sets of checks of the original rules 806, the hardware accelerator 803 searches for the rules for which the network packet 811 fits, using the obtained sets of fields 808 and the rule index built at the preparatory stage 800 is equipped and I. 11. Способ по п. 7, в котором во время основного этапа 801 работы оборудования из аппаратного ускорителя 803 в центральный процессор 805 передаются только номера 809 примитивных терминальных правил, под которые подошли обрабатываемые пакеты 811, используя эти номера правил 809, центральный процессор 805 вычисляет позиции наборов действий 810, ассоциированных с найденными примитивными терминальными правилами в оперативной памяти 804, и запрашивает их, получив наборы действий 810, центральный процессор 805 применяет их к сетевым пакетам 811, получая при этом обработанные сетевые пакеты 812, которые затем отправляются в сеть сетевым адаптером 802.11. The method according to claim 7, in which during the main operation stage 801 the hardware from the hardware accelerator 803 are transmitted to the central processor 805 only the numbers 809 of the primitive terminal rules, which processed packets 811 came up using these rule numbers 809, the central processor 805 calculates the position of the action sets 810 associated with the found primitive terminal rules in the RAM 804, and requests them, having received the action sets 810, the central processor 805 applies them to the network packets 811, receiving brabotannye network packets 812, which are then sent to the network the network adapter 802. 12. Способ по п. 7, в котором оперативная память 804 используется процессором 805 для хранения как исходных 806, так и примитивных терминальных правил 807.12. The method of claim 7, wherein the RAM 804 is used by the processor 805 to store both the source 806 and the primitive terminal rules 807. 13. Способ организации работы компонентов сетевого оборудования для обработки сетевых пакетов, реализуемый с помощью аппаратного решения, выполняющего функции только преобразования правил, с хранением в оперативной памяти исходных и примитивных терминальных правил, необходимых для обработки сетевых пакетов по заданному набору полей пакета, и выполнением поиска правил путем взаимодействия центрального процессора и оперативной памяти, в котором дополнительный подключаемый компонент - аппаратный ускоритель 903 во время подготовительного этапа осуществляет преобразование набора исходных правил 907 в набор примитивных терминальных правил 908.13. A method of organizing the operation of components of network equipment for processing network packets, implemented using a hardware solution that performs the function of only converting rules, storing in RAM the original and primitive terminal rules necessary for processing network packets according to a given set of packet fields, and performing a search rules through the interaction of the central processor and RAM, in which an additional plug-in component - hardware accelerator 903 during preparatory About the stage carries out the transformation of the set of source rules 907 into a set of primitive terminal rules 908. 14. Способ по п. 13, в котором предполагается наличие предварительного подготовительного этапа 900 работы оборудования, который заключается в преобразовании правил администратора, при этом во время предварительного подготовительного этапа 900 работы сетевого оборудования центральный процессор 905 инициирует DMA-пересылку исходных правил 907 из оперативной памяти 904 в аппаратный ускоритель 903, который преобразует эти правила к примитивной терминальной форме 908 и уведомляет центральный процессор 905 посредством аппаратного прерывания об этом, центральный процессор 905 инициирует обратную DMA-пересылку уже преобразованных правил 908 из аппаратного ускорителя 903 в оперативную память 904, затем центральный процессор 905 строит в оперативной памяти 904 индекс 909 терминальных примитивных правил 908, предназначенный для быстрого определения позиции искомого правила в буфере преобразованных правил.14. The method according to p. 13, in which it is assumed that there is a preliminary preparatory stage 900 for the operation of the equipment, which consists in converting the rules of the administrator, while during the preliminary preparatory stage 900 for the operation of the network equipment, the central processor 905 initiates a DMA transfer of the original rules 907 from the RAM 904 into a hardware accelerator 903, which converts these rules to a primitive terminal form 908 and notifies the central processor 905 by hardware interrupt, the trailing processor 905 initiates the reverse DMA transfer of the already transformed rules 908 from the hardware accelerator 903 to the main memory 904, then the central processor 905 builds in the main memory 904 an index 909 of terminal primitive rules 908, designed to quickly determine the position of the desired rule in the transformed rules buffer. 15. Способ по п. 13, в котором подготовительный этап 900 выполняется заблаговременно, до начала основного этапа 901 работы оборудования, при этом сетевое оборудование приступает к обработке сетевых пакетов 906 в соответствии с заданным набором правил 907 после того, как аппаратный ускоритель 903 выполнит необходимые подготовительные действия и сообщит об этом центральному процессору 905.15. The method according to p. 13, in which the preparatory step 900 is performed in advance, before the start of the main stage 901 of the equipment, while the network equipment starts processing network packets 906 in accordance with a given set of rules 907 after the hardware accelerator 903 performs the necessary preparatory actions and will inform the central processor 905 about this. 16. Способ по п. 13, в котором поиск правил, под которые подходит сетевой пакет 906, осуществляется путем взаимодействия процессора 905 и оперативной памяти 904, для этого центральный процессор 905 формирует набор полей 910 обрабатываемых пакетов 906 и использует их в качестве ключа для индекса правил 909, построенного на подготовительном этапе 900 работы оборудования и хранящегося в оперативной памяти 904.16. The method according to p. 13, in which the search for the rules for which the network packet 906 is suitable is carried out by the interaction of the processor 905 and RAM 904, for this the central processor 905 generates a set of fields 910 of the processed packets 906 and uses them as a key for the index rule 909, built at the preparatory stage 900 of the equipment and stored in random access memory 904. 17. Способ по п. 13, в котором во время основного этапа 901 работы оборудования между аппаратным ускорителем 903 и оперативной памятью 904 передача данных отсутствует, поскольку индекс правил 909 хранится в оперативной памяти 904, то номера найденных правил 911 центральный процессор 905 получает также из оперативной памяти 904, используя эти номера правил 911, центральный процессор 905 вычисляет позиции наборов действий 912, ассоциированных с найденными примитивными терминальными правилами 908 в оперативной памяти 904, и запрашивает их, получив наборы действий 912, центральный процессор 905 применяет их к сетевым пакетам 906, получая при этом обработанные сетевые пакеты 913, которые затем отправляются в сеть сетевым адаптером 902.17. The method according to p. 13, in which during the main stage 901 of operation of the equipment between the hardware accelerator 903 and the random access memory 904 there is no data transfer, since the rule index 909 is stored in the random access memory 904, the central processor 905 also obtains the numbers of the found rules 911 from RAM 904, using these rule numbers 911, the central processor 905 calculates the positions of the action sets 912 associated with the found primitive terminal rules 908 in the RAM 904, and queries them for the action sets 912, the central processor 905 applies them to the network packets 906, while receiving processed network packets 913, which are then sent to the network by the network adapter 902. 18. Способ по п. 13, в котором оперативная память 904 используется процессором 905 для хранения исходных правил 907, преобразованных правил 908 и для хранения индекса правил 909, при этом осуществляется хранение правил в оперативной памяти 904 и дополнительные обращения к оперативной памяти 904 со стороны центрального процессора 905 во время основного этапа работы 901.18. The method according to p. 13, in which the RAM 904 is used by the processor 905 to store the original rules 907, the converted rules 908 and to store the index of the rules 909, while the rules are stored in RAM 904 and additional access to the RAM 904 from CPU 905 during milestone 901. 19. Способ организации работы компонентов сетевого оборудования для обработки сетевых пакетов без использования аппаратного ускорителя, в котором выполняется предварительный подготовительный этап 1000 работы оборудования, выполняется преобразование правил администратора и обработка сетевых пакетов 1005 сетевым адаптером 1002, во время предварительного подготовительного этапа 1000 работы сетевого оборудования центральный процессор 1004 преобразует исходные правила 1006 к примитивной терминальной форме и строит в оперативной памяти 1003 индекс 1008 терминальных примитивных правил 1007, предназначенный для быстрого определения позиции искомого правила в буфере примитивных терминальных правил.19. A method of organizing the operation of network equipment components for processing network packets without using a hardware accelerator in which the preliminary preparatory stage 1000 of the equipment is performed, administrator rules are converted and network packets 1005 are processed by the network adapter 1002, during the preliminary preparatory stage 1000 of the network equipment operation processor 1004 converts the original rules 1006 to a primitive terminal form and builds index 1 in RAM 1003 008 terminal primitive rules 1007, designed to quickly determine the position of the desired rule in the buffer of primitive terminal rules. 20. Способ по п. 19, в котором подготовительный этап 1000 выполняется заблаговременно, до начала основного этапа 1001 работы оборудования, при этом сетевое оборудование приступает к обработке сетевых пакетов 1005 в соответствии с заданным набором правил 1006 после того, как центральный процессор 1004 выполнит необходимые подготовительные действия.20. The method according to p. 19, in which the preparatory stage 1000 is performed in advance, before the main stage 1001 of the equipment, and the network equipment starts processing network packets 1005 in accordance with a given set of rules 1006 after the central processor 1004 performs the necessary preparatory actions. 21. Способ по п. 19, в котором поиск правил, под которые подходит сетевой пакет 1005, осуществляется путем взаимодействия процессора 1004 и оперативной памяти 1003, для этого центральный процессор 1004 формирует набор полей 1009 обрабатываемых пакетов и использует их в качестве ключа для индекса правил 1008, построенного на подготовительном этапе 1000 работы оборудования и хранящегося в оперативной памяти 1003.21. The method according to p. 19, in which the search for the rules for which the network packet 1005 is suitable is carried out by the interaction of the processor 1004 and RAM 1003, for this the central processor 1004 forms a set of fields 1009 of the processed packets and uses them as a key for the rule index 1008, built at the preparatory stage 1000 of the equipment and stored in random access memory 1003. 22. Способ по п. 19, в котором во время основного этапа 1001 работы оборудования передача данных осуществляется только между центральным процессором 1004 и оперативной памятью 1003, поскольку индекс правил 1008 хранится в оперативной памяти 1003, то номера найденных правил 1010 центральный процессор 1004 получает также из оперативной памяти 1003, используя эти номера правил 1010, центральный процессор 1004 вычисляет позиции наборов действий 1011, ассоциированных с найденными примитивными терминальными правилами 1007 в оперативной памяти 1003, и запрашивает их, получив наборы действий 1011, центральный процессор 1004 применяет их к сетевым пакетам 1005, получая при этом обработанные сетевые пакеты 1012, которые затем отправляются в сеть сетевым адаптером 1002.22. The method according to p. 19, in which during the main stage 1001 of operation of the equipment, data is transferred only between the central processor 1004 and the main memory 1003, since the index of rules 1008 is stored in the main memory 1003, the central processor 1004 also receives the numbers of the found rules 1010 from random access memory 1003, using these rule numbers 1010, the central processor 1004 calculates the positions of the action sets 1011 associated with the found primitive terminal rules 1007 in the random access memory 1003 and requests them, semi Having completed the action sets 1011, the central processor 1004 applies them to the network packets 1005, while receiving processed network packets 1012, which are then sent to the network by the network adapter 1002. 23. Способ по п. 19, в котором оперативная память 1003 используется процессором 1004 для хранения исходных правил 1006, преобразованных правил 1007 и для хранения индекса правил 1008 и преобразование исходных правил 1006 к примитивной терминальной форме происходит с помощью центрального процессора 1004.23. The method according to p. 19, in which the RAM 1003 is used by the processor 1004 to store the original rules 1006, the converted rules 1007 and to store the index of the rules 1008 and the conversion of the original rules 1006 to a primitive terminal form is performed using the central processor 1004.
RU2018143014A 2018-12-05 2018-12-05 Method of organizing operation of network equipment components for processing network packets (4 versions) RU2710302C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2018143014A RU2710302C1 (en) 2018-12-05 2018-12-05 Method of organizing operation of network equipment components for processing network packets (4 versions)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2018143014A RU2710302C1 (en) 2018-12-05 2018-12-05 Method of organizing operation of network equipment components for processing network packets (4 versions)

Publications (1)

Publication Number Publication Date
RU2710302C1 true RU2710302C1 (en) 2019-12-25

Family

ID=69023052

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2018143014A RU2710302C1 (en) 2018-12-05 2018-12-05 Method of organizing operation of network equipment components for processing network packets (4 versions)

Country Status (1)

Country Link
RU (1) RU2710302C1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050201273A1 (en) * 2004-03-09 2005-09-15 Nec Corporation Label-switched path network with alternate routing control
CN103428771A (en) * 2013-09-05 2013-12-04 迈普通信技术股份有限公司 Communication method, software defined network SDN switch and communication system
RU2602333C2 (en) * 2011-03-04 2016-11-20 Нек Корпорейшн Network system, packet processing method and storage medium
RU2609086C2 (en) * 2014-05-07 2017-01-30 Общество С Ограниченной Ответственностью "Яндекс" Network device for forwarding packets (versions), method of setting up network device for forwarding packets (versions) and method for forwarding packet
RU2668394C2 (en) * 2014-06-25 2018-09-28 ЗетТиИ Корпорейшн Packet collection method and system, network device and network management centre

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050201273A1 (en) * 2004-03-09 2005-09-15 Nec Corporation Label-switched path network with alternate routing control
RU2602333C2 (en) * 2011-03-04 2016-11-20 Нек Корпорейшн Network system, packet processing method and storage medium
CN103428771A (en) * 2013-09-05 2013-12-04 迈普通信技术股份有限公司 Communication method, software defined network SDN switch and communication system
RU2609086C2 (en) * 2014-05-07 2017-01-30 Общество С Ограниченной Ответственностью "Яндекс" Network device for forwarding packets (versions), method of setting up network device for forwarding packets (versions) and method for forwarding packet
RU2668394C2 (en) * 2014-06-25 2018-09-28 ЗетТиИ Корпорейшн Packet collection method and system, network device and network management centre

Similar Documents

Publication Publication Date Title
US9397901B2 (en) Methods, systems, and computer readable media for classifying application traffic received at a network traffic emulation device that emulates multiple application servers
US7583673B2 (en) Network processor for forwarding packets in an IP network
US20100050177A1 (en) Method and apparatus for content based searching
US9864606B2 (en) Methods for configurable hardware logic device reloading and devices thereof
US10621124B2 (en) Method, device and computer program product for enabling SR-IOV functions in endpoint device
US7937495B2 (en) System and method for modifying data transferred from a source to a destination
US11182150B2 (en) Zero packet loss upgrade of an IO device
Gao et al. OVS-CAB: Efficient rule-caching for Open vSwitch hardware offloading
CN116599892B (en) Server system, routing method, routing device, electronic equipment and storage medium
US20220166718A1 (en) Systems and methods to prevent packet reordering when establishing a flow entry
RU2710302C1 (en) Method of organizing operation of network equipment components for processing network packets (4 versions)
US10339091B2 (en) Packet data processing method, apparatus, and system
US9736080B2 (en) Determination method, device and storage medium
CN113347100B (en) Data stream transmission method and device, computer equipment and storage medium
EP3136251B1 (en) Flit transmission method and device of network on chip
JP2020524445A (en) Parallel information processing on multi-core computing platform
US20160364244A1 (en) Method or Apparatus for Flexible Firmware Image Management in Microserver
US10484304B2 (en) Determining actions to be immediately performed on a network packet with an application specific integrated circuit
CN111240845A (en) Data processing method, device and storage medium
CN117714398B (en) Data transmission system, method, electronic equipment and storage medium
JPH09224066A (en) Communication protocol parallel processor
Pacífico et al. eBPFlow: A Hardware/Software Platform to Seamlessly Offload Network Functions Leveraging eBPF
US20230185624A1 (en) Adaptive framework to manage workload execution by computing device including one or more accelerators
US20230176932A1 (en) Processor, information processing apparatus, and information processing method
US20230043461A1 (en) Packet processing configurations

Legal Events

Date Code Title Description
QB4A Licence on use of patent

Free format text: LICENCE FORMERLY AGREED ON 20200723

Effective date: 20200723

QZ41 Official registration of changes to a registered agreement (patent)

Free format text: LICENCE FORMERLY AGREED ON 20200723

Effective date: 20210830