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

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

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

An element at index N will be moved to index N-1, and the element at index 0 will be lost. The bottom-most elements that had nothing shifted into them are invalidated.If a count is specified, elements will be shifted by count instead of 1.Popping from an empty array (or popping more elements than are in thearray) results in an empty array.count(counter_ref, index)SummaryUpdate a counter.Parameterscounter_refindex(C-REF) The name of the counter array.(VAL) The offset in the array to get a counter reference.DescriptionThe given counter is incremented by 1, if it is a packet counter, or by thepacket length, if it is a byte counter.

The counter array is determined atcompile time. The index may be a table entry parameter or determinedat compile time. It is an error to reference a direct-mapped counter array from this action.5910.1 Primitive Actions10 ACTIONSexecute_meter(meter_ref, index, field)SummaryExecute a meter operation.Parametersmeter_ref(M-REF) The name of the meter array.index(VAL) The offset in the array to get a meter reference.Applicable only if the meter type is indirect.field(FLD) A field reference to store the meter state.DescriptionThe given meter, determined by meter_ref and index, is executed. Ifthe meter is direct, then index is ignored as the table entry determineswhich cell to reference.

The length of the packet is passed to the meter. The state of meter is updated and the meter returns information(a "color") which is stored in field. If the parent header of field is notvalid, the meter state is updated, but the color of the packet is discarded.generate_digest(receiver, field_list)SummaryGenerate a digest of a packet and send to a receiver.Parametersreceiver(VAL) An opaque value identifying the receiver.field_list(FLDLIST) A list of field references.DescriptionThe indicated field list is populated with the packet’s data and sent bya target-specific mechanism to an agent capable of processing the object.

The specification of receivers is outside of the scope of P4. Examplereceivers might be the CPU through a channel parallel to that for transferring packets, or a co-processor connected by a bus dedicated to thisoperation.This function might also be used to represent a self-updating operationsuch as address learning.6010.1 Primitive Actions10 ACTIONSresubmit( [ field_list ] )SummaryApplied in the ingress pipeline, mark the packet to be resubmitted to theparser.Parametersfield_list(FLDLIST) An optional list of metadata field references.DescriptionOnly valid on the ingress pipeline.The packet is marked for resubmission. It will complete the ingresspipeline to generate any necessary metadata values. Then, the originalpacket data will be resubmitted to the parser with values of the fieldsin field_list from the ingress processing on the packet.

These valuesreplace the normal initial values of the metadata fields indicated in theinitializer of the instance declaration.If multiple resubmit actions get executed on one packet, the union of allthe fields in the field lists should be resubmitted with the packet.See Section 15 for more details.recirculate( [ field_list ] )SummaryOn egress, mark the packet to be resubmitted to the parser.Parametersfield_list(FLDLIST) An optional list of metadata field references.DescriptionOnly valid on the egress pipeline.The packet is marked for resubmission. It will complete the egresspipeline and be deparsed.

This version of the packet is then resubmittedto the parser with values of the fields in field_list from the processing on the packet. These values replace the normal initial values of themetadata fields indicated in the initializer of the instance declaration.See Section 15 for more details.6110.1 Primitive Actions10 ACTIONSclone_ingress_pkt_to_ingress(clone_spec, [ field_list ] )SummaryGenerate a copy of the original packet and submit it to the ingressparser.Parametersclone_spec(VAL) An opaque identifier indicating additional runtime characteristics of the clone operation.field_list(FLDLIST) An optional list of metadata field references.DescriptionThis action indicates that the switch should generate a copy of the original packet (prior to any modifications from match+action) and submitit to the parser as an independent packet instance. This may occur immediately when the action executes or be deferred until the the originalpacket is buffered.The original packet continues to be processed as though the clone hadnot been produced.The clone_spec is used to allow the configuration of other target specific characteristics of the clone operation.

It may be a simple identifier indicating a session. For instance, the clone operation may supporttruncating the cloned instance. The truncation length would be a property of the session. The concept of session is optional and the parametermay be ignored on some targets.The cloned instance will have instance_type set to indicate that it is aningress clone.The fields indicated in field_list are copied to the Parsed Representation of the clone instance.

These values replace the normal initial valuesof the metadata fields indicated in the initializer of the instance declaration (which occurs before parsing).The function may also be referred to as clone_i2i.See the Section 15 for more details.6210.1 Primitive Actions10 ACTIONSclone_egress_pkt_to_ingress(clone_spec [ , field_list])SummaryGenerate a duplicate of the egress packet and submit it to the parser.Parametersclone_spec(VAL) An opaque identifier indicating additional runtime characteristics of the clone operation.field_list(FLDLIST) An optional list of metadata field references.DescriptionThe packet is marked for cloning at egress.

Once the original packetcompletes the egress pipeline, a copy of the deparsed packet (includingall modifications due to match+action) is passed to the parser as an independent packet instance. The original packet is forwarded as normal.The clone_spec is used to allow the configuration of other target specificcharacteristics of the clone operation as described in clone_ingress_pkt_to_ingress.The fields indicated in field_list are copied to the clone instance.These values replace the normal initial values of the metadata fields indicated in the initializer of the instance declaration.The cloned instance will have instance_type set to indicate that it is aningress clone.The function may also be referred to as clone_e2i.See the Section 15 for more details.6310.1 Primitive Actions10 ACTIONSclone_ingress_pkt_to_egress(clone_spec [ , field_list ] )SummaryGenerate a copy of the original packet and submit it to the BufferingMechanism.Parametersclone_spec(VAL) An opaque identifier indicating additional runtime characteristics of the clone operation.field_list(FLDLIST) An optional list of metadata field references.DescriptionThis action indicates that the switch should generate a copy of the original packet.

The clone’s Parsed Representation will match the original’simmediately after parsing, with the exception that the fields listed infield_list are replaced with the original packet’s values after beingprocessed by the ingress pipeline.The clone of the packet is submitted directly to the Buffering Mechanism as an independent packet instance. It does not go through ingressmatch+action processing.The original packet continues to be processed as though the clone hadnot been produced.The clone_spec is used to allow the configuration of other target specificcharacteristics of the clone operation as described in clone_ingress_pkt_to_ingress. In addition to other session attributes, clone_spec determines the egress specification (standard metadata egress_spec) thatis presented to the Buffering Mechanism.The cloned instance will have instance_type set to indicate that it is anegress clone.The function may also be referred to as clone_i2e.See the Section 15 for more details.6410.1 Primitive Actions10 ACTIONSclone_egress_pkt_to_egress(clone_spec [ , field_list ] )SummaryDuplicate the egress version of the packet and submit it to the BufferingMechanism.Parametersclone_spec(VAL) An opaque identifier indicating additional runtime characteristics of the clone operation.field_list(FLDLIST) An optional list of metadata field references.DescriptionThe packet is marked for cloning at egress.

Once the original packetcompletes the egress pipeline, the packet and its Parsed Representation of packet headers (including all modifications due to match+action)along with the metadata fields specified in field_listare submitted tothe Buffering Mechanism as a new packet instance.The original packet is forwarded as normal.The clone_specis used to allow the configuration of other target specificcharacteristics of the clone operation as described in clone_ingress_pkt_to_ingress. In addition to other session attributes, clone_specdetermines the egress specification (standard metadata egress_spec) that is presented to the Buffering Mechanism.The cloned instance will have instance_typeset to indicate that it is anegress clone.The function may also be referred to as clone_e2e.See the Section 15 for more details.10.1.1 Parameter BindingIn several primitive actions above, a parameter may take one of:• An immediate value; or• A value from a table entry’s action parameter data; or• A reference to a field instance whose current value is used; or• A reference to a counter, meter, or register cell whose current value is used.The P4 language does not specify limits on the specification of which of these may beexercised at a given time.

However, it should be noted that there is a qualitative difference (in the sense that it imposes different functional requirements on the underlyingtarget) between specifying a particular field instance in a P4 program and allowing a runtime API to specify the field instance to reference when the table entry is added.6510.2 Action Definitions10 ACTIONSThis is a binding-time issue; the first binds the field reference at compile time whilethe second allows run time binding.

Targets may impose constraints on the flexibilityallowed for such parameter binding. The difference must also be reflected in the runtime interfaces that are generated.10.2 Action DefinitionsCompound actions are declared as functions.compound_action_function_declaration ::=action action_name ( [ action_param_list ] ) { action_statement * } |action action_name ( [ action_param_list ] ) ;action_param_list ::= action_param [, action_param]*action_param ::= param_qualifier* data_type param_nameparam_qualifier ::= in | inoutaction_statement ::=action_name ( [ arg_list ] ) ; |extern_method_call ;arg_list ::= general_expr [, general_expr]*Action function declarations must obey the following conventions:• The body of the function contains only:– Calls to other action functions (primitive or compound).– Calls to extern methods.• Recursion is not allowed.• The usage of an action parameter must conform to any qualifiers specified beforethe parameter’s type:– in: This parameter is effectively readonly and must not be modified by thecode enclosed by the parameter list.– inout: This parameter has no read/write usage restrictions.

If a directionality is not otherwise specified, this is assumed by default.• Compound actions must be declared with bodies, even if those bodies are empty.Primitive actions must be declared without bodies.Not all targets will support all forms of action expression. In particular:6610.2 Action Definitions10 ACTIONS• there might be limits on whether specific parameters have to be bound at compiletime or can be chosen by a table at run time.• there might be limits on the complexity of expressions bound to an action’s parameters when calling itTarget architectures should document such limitations accordingly.In the following example, the parameters dst_mac, src_mac and vid would be exposedvia a run time API for adding entries to the table which used this action.

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

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