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

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

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

The identifiers in a prototype’s typevariable list are available as valid types for the parameters in the prototype’s signature.These type variables provide a mechanism for architectures to pass user-defined types11817.7 Addendum for Version 1.1.017 APPENDICESof header instances between P4 code blocks without mandating ahead of time whatthose structs are.A target architecture may specify several prototypes for identical underlying resources(such as n prototypes for n separately programmable yet functionally identical hardware parsers). A program may use different instances of the same programmable blockto satisfy all of the identical prototypes expected by the architecture.While not explicitly disallowed, P4 programmers are unlikely to find much benefit fromwriting their own prototypes.

Their utility is in target architecture specification only.17.7.6 Standard LibraryThe P4 portion of a target architecture description provides definitions of its extern object types. To promote portability of P4 programs, alongside the standard set of primitive actions, there is a standard library of extern object types for common packet processing operations. While targets may provide target-specific libraries that offer morespecific and finely-tuned functionality, this library provides more generalized functionality that all targets should be able to support.In addition, the definition of a standard library of extern object types assists in simplifying the P4 language, since the function of many constructs currently in the language canbe delegated to extern objects, thus simplifying the core P4 language significantly.Primitive Actions.

The primitive actions are standard and expected to be supportedby all targets, regardless of the target architecture being used. The list of library actionsmay be a subset of the current P4 list which is given in Section 10.1:Nameadd_headercopy_headerremove_headermodify_fieldno_oppushpopSummaryAdd a header to the packet’s Parsed RepresentationCopy one header instance to another.Mark a header instance as invalid.Set the value of a field in the packet’s ParsedRepresentation.Placeholder action with no effect.Push all header instances in an array downand add a new header at the top.Pop header instances from the top of an array, moving all subsequent array elementsup.Table 18: Standard Primitive Actions11917.7 Addendum for Version 1.1.017 APPENDICESParser Exceptions. The parser exceptions are standard, regardless of target architecture. The prefix "pe" stands for parser exception.

The list of parser exceptions may be asuperset of the current P4 list which is given in Section 5.6:Identifierp4_pe_index_out_of_boundsp4_pe_out_of_packetp4_pe_header_too_longp4_pe_header_too_shortp4_pe_unhandled_selectp4_pe_data_overwrittenp4_pe_checksump4_pe_defaultException EventA header stack array index exceeded the declaredbound.There were not enough bytes in the packet to complete an extraction operation.A calculated header length exceeded the declaredmaximum value.A calculated header length was less than the minimum length of the fixed length portion of theheader.A select statement had no default specified but theexpression value was not in the case list.A given header instance was extracted multipletimes.A checksum error was detected.This is not an exception itself, but allows the programmer to define a handler to specify the defaultbehavior if no handler for the condition exists.Table 19: Standard Parser ExceptionsStateful Objects.

Counters, meters and registers maintain state for longer than onepacket. Together they are called stateful memories. These are described in Section 8.They are accessed via respective extern object types in the standard library. Genericmethod calls on these objects replace the earlier custom P4 syntax.Checksums and Calculations. Checksums and hash value generators are examples offunctions that operate on a stream of bytes from a packet to produce an integer.

Theseare described in Section 4. They are accessed via respective extern object types in thestandard library. Generic method calls on these objects replace the earlier custom P4syntax.Action profiles. In some instances, action parameter values are not specific to a matchentry but could be shared between different entries. Some tables might even want toshare the same set of action parameter values. This can be expressed in P4 with actionprofiles. These are described in Section 11. They are accessed via an extern object typein the standard library. Generic method calls on these objects replace the earlier customP4 syntax.

Action profiles are an example of a table modifier extern object type.12017.7 Addendum for Version 1.1.017 APPENDICESDigests. Digests serve as a generic mechanism to send data from the middle of aP4 block to an external non-P4 receiver. This receiver can be anything from a fixedfunction piece of hardware to a control-plane function. The generate_digest primitiveaction is described in Section 10.1. This is accessed via an extern object type in thestandard library.

A generic method call on such objects replaces the earlier custom P4action.17.7.7 Standard Switch ArchitectureThe Standard Switch Architecture defines a highly abstract packet forwarding architecture geared towards packet switching. It serves as:• An example P4 target architecture specification; and• A widely supported architecture for simple yet portable P4 programsWhile this architecture is designed primarily to allow the expression of packet switchingprograms, it is flexible enough to implement more advanced behavior. Other simple architectures geared towards different environments, such as NICs, could also be defined.The architecture is described in Section 1.1.

As for all targets, there is an associatedStandard Switch Library, containing extern type objects.Programmable regions. The Standard Switch Architecture has three P4-programmableregions: parser, ingress, and egress. It provides prototypes for these. Note that this givesa more explicit meaning to the blocks declared in traditional P4 programs. A draft formof the intrinsic metadata associated with the various interfaces to these regions is givennext, to give more detail on how this works.

The metadata is defined using standard P4header_type ojects.Intrinsic Metadata. All three blocks receive a read-only metadata header containingbasic information about the packet:header_type packet_metadata_t {fields {bit<16> ingress_port; // The port on which the packet arrived.bit<16> length;// The number of bytes in the packet.// For Ethernet, does not include the CRC.// Cannot be used if the switch is in// ’cut-through’ mode.bit<8>type;// Represents the type of instance of// the packet://- PACKET_TYPE_NORMAL//- PACKET_TYPE_INGRESS_CLONE//- PACKET_TYPE_EGRESS_CLONE12117.7 Addendum for Version 1.1.017 APPENDICES//- PACKET_TYPE_RECIRCULATED// Specific compilers will provide macros// to give the above identifiers the// appropriate values}}The ingress block also receives the exit result of the parser:header_type parser_status_t {fields {bit<16> return_code;// The final status of the parser.// 0 if parser returned ’accept’// TODO: Define other valuesbit<8>user_error_data;// An opaque value written by// user-defined parser exceptions}}The ingress block’s output intrinsic metadata controls how the packet will be forwarded,and possibly replicated:header_type ingress_pipe_controls_t {fields {bit<16> egress_spec;// Specification of an egress.// This is the ’intended’ egress as// opposed to the committed physical// port(s).//// May be a physical port, a logical// interface (such as a tunnel, a LAG,// a route, or a VLAN flood group) or// a multicast group.bitdrop;// Do not send the packet on to the// queueing system.

Other functions// like copy-to-cpu and clone will// still occur.bitcopy_to_cpu;// Send a copy of the packet to the// slow path.bit<8>cpu_code;// Opaque identifier packaged with// the packet, when sending to the// slow path.12217.7 Addendum for Version 1.1.017 APPENDICES}}The egress block receives further read-only information about the packet determinedwhile it was in the queueing system:header_type egress_aux_packet_metadata_t {fields {bit<16> egress_port;// The physical port to which this// packet instance is committed.bit<16> egress_instance;// An opaque identifier differentiating// instances of a replicated packet.}}The egress block’s output intrinsic metadata no longer has access to the egress spec forwriting, since the packet has already been committed to a physical port:header_type egress_pipe_controls_t {fields {bitdrop;// Do not send the packet out of its// egress port.

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

Тип файла
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
Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6510
Авторов
на СтудИзбе
302
Средний доход
с одного платного файла
Обучение Подробнее