p4 spec v1.1 (1185620), страница 18

Файл №1185620 p4 spec v1.1 (Домашнее задание) 18 страницаp4 spec v1.1 (1185620) страница 182020-08-25СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 18)

Instead, the intent is to allow target providers to introducedifferent target architectures (which are heterogeneous compositions of programmableand non-programmable regions) for their targets, while allowing the users of the targets to program any of the programmable regions in the targets in P4. In doing this,an important goal is to make it possible to write portable P4 code, with ways to easily combine that portable code into programs for specific architectures. While targetspecific extensions will be allowed, the mission is to encourage portable programs andportable implementations.

To ensure portability, the P4 working groups will define oneor more standard architecture(s). A P4 program written for a standard architecture will11517.7 Addendum for Version 1.1.017 APPENDICESbe portable across all the targets conforming to the standard architecture. It is expectedthat target vendors will implement extensions with the expectation of (some of) thoseextensions may make their way into future versions of the standard architecture.17.7.2 TargetsA machine that can run a P4 program is called target. While P4 provides a standardlanguage for describing the logic within programmable regions of a forwarding element, the programmable regions that are actually available and the data flow betweenthose regions can vary from target to target. For example, one target may consist of aparser, ingress match+action pipeline and egress match+action pipeline, connected insequence.

Another target may consist of several parser-pipeline pairs, which the packetmay flow through in any order by setting appropriate control signals.With architecture-language separation, the P4 language itself would address only thecontents of each programmable region. Then the overall P4 framework would providethe setting for target providers and standards bodies to define architectures that complement the standard architecture(s). To accomplish this, each target would conformto a Target Architecture, specified partially as a collection of P4 code, and partially as aset of specifications that describe the P4-programmable regions of the target and howthose regions interact with each other.

The latter specifications may involve non-P4(or possibly extended P4 in the future) rigorous written descriptions and/or simulationmodels. Examples of programmable regions would be packet parsers, and pipelines oftables and actions. The existing P4 abstract forwarding model would be one example ofa standard architecture.In addition to the Target Architecture specification, there is a Target-Specific Libraryspecification. This provides definitions of available P4 extern object types (Section 16),which represent the processing capabilities of the target beyond the standard P4 primitive actions.

The functional specifications of these objects may involve non-P4 (or possibly extended P4 in the future) rigorous written descriptions and/or simulation models. Examples of these capabilities could include arithmetic functions and checksumgenerators.17.7.3 Target Architecture StructureThe P4 portion of a target architecture description provides prototypes for the programmable regions of the target. These prototypes specify the input and output interfaces to each region, including the format of metadata passed across each interface.These interfaces form the connection between the region of P4 code in question andthe surrounding non-P4-programmable regions. For instance, a region of code may11617.7 Addendum for Version 1.1.017 APPENDICESreceive intrinsic metadata reporting a packet’s ingress port and length, and may writeintrinsic metadata controlling the packet’s egress port and queue priority.Together with this P4-described portion, the additional non-P4 specification clarifiesthe meaning of the context for the P4 portion of the architecture and explains howthese portions fit together.

Initially, this is envisaged to be mostly human-languagedocumentation and visual diagrams to show the flow of data between programmableregions, though it may also contain pseudocode or simulation models to specify rigorously the behavior of logic not expressible in P4. Looking further out, there has alreadybeen experimentation with some extension of P4 itself, to allow rigorous specificationof the interaction between regions in terms of established P4 mindset and terminology.17.7.4 Target Architecture SelectionA program’s target architecture is selected by including that architecture’s P4 prototypesin the source code, and then writing structures that conform to the prototypes it specifies. These structures can make use of the extern object types that are provided in theaccompanying target-specific library.No one architecture is mandated by the P4 spec, and a given physical target may support multiple architectures.

Some architectures may be written by a target provider andhighly specialized to the underlying machinary, while others may be standardized andintentionally abstract to allow greater portability and ease-of-use. A particular exampleof the latter is that a standard architecture will be defined based on the existing abstractforwarding model.An important aspect is that all P4 programs written for a given architecture are portableacross all targets that faithfully implement that architecture (assuming that enough resources are available). P4 conformance of a target is defined as follows: if a specifictarget supports a given target architecture, then a program written to that architectureand executed on the target must provide exactly the same behavior as the same program executed on an abstract machine with infinite resources.In general, P4 programs are not expected to be portable across different architectures.For example, executing a P4 program that controls packet broadcast by writing specialintrinsic metadata will not work on a target that provides no such intrinsic metadata.Further, particular targets may not support fully some P4 language constructs (for example, some targets may not support features necessary for IPv4 options processing orarbitrary-length stacked protocol headers).

Ideally any restrictions on the P4 languageimposed by a specific target should be clearly documented by the target architecture.At the very least, restrictions have to be conveyed to P4 programmers using clear compiler error messages when attempting to compile programs that use unsupported fea-11717.7 Addendum for Version 1.1.017 APPENDICEStures.17.7.5 Programmable blocksProgrammable blocks are user-defined blocks of P4 code that can be instantiated multiple times within a program, and interact with the enclosing target architecture by occupying its programmable regions. Each instance of a programmable block matches aP4-described prototype in the architecture specification.Programmable block types. A programmable block type is comprised of a signatureand code body.

The body forms a new scope that can contain any normal P4 declaration. The enclosed code is lexically scoped and additionally has access to the externalmetadata parameters declared by its input-output signature.Similarly to header types for example, the objects declared inside a programmable blocktype do not actually "exist" inside the program until the block is instantiated. In thissense, a programmable block type is declaring a "template" of P4 code that can bestamped down into the program.Programmable block instances. An instance of a programmable block type represents concrete resource declarations of the contents of the block. Because of this, blockscannot be instantiated dynamically at run time: they are static, compile-time declarations.When creating an instance, the programmer must bind all of the input-output parameters in the type’s signature either to constants or other object names that are currentlyin scope.Multiple instances of the same block type create completely separate instances of thetype’s component objects which the surrounding architecture and/or a runtime API canrefer to using dotted notation.Programmable block prototypes.

Target architectures use programmable blocks tosegment P4 code into the various programmable regions of the underlying target. Thearchitecture specifies the prototypes of the blocks it expects to be filled in by the program. These prototypes specify the signature of a block but leave its implementationundefined. They are expected to be paired with a concrete programmable block declaration that has a matching signature.Prototypes may also include type variables, which are resolved to concrete types whenthe prototype is paired with its implementation.

Характеристики

Тип файла
PDF-файл
Размер
1,13 Mb
Тип материала
Высшее учебное заведение

Список файлов курсовой работы

Домашнее задание
VasilenkoAE_521 (switch openflow start)
staticNAT
p4factory
mininet
lvk_demo.py
targets
lvk_task
openflow_mapping
l2.py
l2.pyc
mapping_common.py
mapping_common.pyc
p4src
includes
headers.p4
parser.p4
lvk_task.p4
targets
libpd_thrift
libtbl_packing
tests
pd_thrift
conn_mgr_pd_rpc
__init__.py
__init__.pyc
conn_mgr-remote.
conn_mgr.py
conn_mgr.pyc
constants.py
ttypes.py
ttypes.pyc
devport_mgr_pd_rpc
Свежие статьи
Популярно сейчас
А знаете ли Вы, что из года в год задания практически не меняются? Математика, преподаваемая в учебных заведениях, никак не менялась минимум 30 лет. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6510
Авторов
на СтудИзбе
302
Средний доход
с одного платного файла
Обучение Подробнее