Questions
report – 这是一个问答类的任务
5 points
To check if the parser extracted a particular header
To check if an action can be called on a P4 table
Final Exam
Deadline: Mar 17
- Required
Name *
Your answer
Email *
Your answer
What is isValid() in P4 used for?
To check if the packet is valid by computing the checksum
None of the above
10 points
It can not be done
Use standard_metadata.instance_type header field
Set a metadata field in the original packet and then clone the packet without
preserving this field.
Use the clone session id
5 points
dstAddr is the address of the next hop while the port is the switch port used to reach
the next hop
dstAddr is the address of the current switch while the port is the switch port used to
reach the next hop
dstAddr is the address of the next hop while the port is the port through which the
packet entered the switch
dstAddr is the address of the current switch while the port is the port through which
the packet entered the switch
How can you distinguish an I2E cloned packet from the original packet in
P4?
What are the arguments in the forwarding function
ipv4_forward(macAddr_t dstAddr, egressSpec_t port) used in the
assignments?
10 points
The packet will be routed to the port 1
The packet will be routed to the port 2
The packet will be routed to the port 3
The packet will be dropped
5 points
It is a random integer used to distinguish a cloned packet from an original packet
The session id is used to route the cloned packet out of a particular port.
It is useful in debugging errors that are related to cloning
It is used to distinguish packets coming from different switches to the monitor
15 points
Filter operator can be implemented using an if condition in P
Suppose a packet with ipv4.dstAddr=10.0.3.100 arrives at the ipv4_lpm
table which matches on the ipv4.dstAddr field with the match type lpm.
Suppose we add the following three match-action rules: (1) table_add
MyIngress.ipv4_lpm MyIngress.ipv4_forward 10.0.3.0/32 =>
08:00:00:00:01:11 1 (2) table_add MyIngress.ipv4_lpm
MyIngress.ipv4_forward 10.0.3.100/24 => 08:00:00:00:02:22 2 (3)
table_add MyIngress.ipv4_lpm MyIngress.ipv4_forward 10.0.3.64/26 =>
08:00:00:00:03:33 3. Where will the packet be routed to?
What is the session id parameter used for in the cloning function?
Which of the following is true?
Reduce operator in P4 requires a register
Distinct operator in P4 requires a register
Map operator in P4 requires a register
None of the above
5 points
Success field at any stage of the query denotes if the packet satisfies the sub-query
so far.
Success field tells if a sonata query can be successfully compiled to P
Success field is used to determine if the packet reached an accept state in the parser
None of the above
What is the success
metadata field used for in Sonata?
Consider the Sonata query shown below. Which statement(s) about this 30 points
query is true? *
True False
It filters TCP packets for
which the value of tcp.flags
field is 2
For the filtered packet
stream, it counts the number
of packets per destination IP
address
For the filtered packet
stream, it counts the number
of bytes per destination IP
address
It reports the IP if the number
is less than the threshold
value Th
For the filtered packet
stream, it counts the number
of packets per source IP
address
It reports the IP if the number
exceeds the threshold value
It filters TCP packets for
which the value of tcp.flags
field is 2
For the filtered packet
stream, it counts the number
of packets per destination IP
address
For the filtered packet
stream, it counts the number
of bytes per destination IP
address
It reports the IP if the number
is less than the threshold
value Th
For the filtered packet
stream, it counts the number
of packets per source IP
address
It reports the IP if the number
exceeds the threshold value
20 points
ThTh
For the above query, which of the following is true. Hint: recall
discussions on challenges related to implementing stateful operators in
the data plane. *
True False
It is not possible to execute
the above query on PISA-
based hardware target
The PISA-based realization
of this query always reports
the affected hosts accurately
The PISA-based realization
of this query may report
unaffected hosts
The PISA-based realization
of this query may miss
reporting affected hosts
It is not possible to execute
the above query on PISA-
based hardware target
The PISA-based realization
of this query always reports
the affected hosts accurately
The PISA-based realization
of this query may report
unaffected hosts
The PISA-based realization
of this query may miss
reporting affected hosts
Mark the statements as True or False regarding query planning for the 35 points
above query *
True False
One partitioning decision can
be to only execute the filter
operation in the data plane
The load at stream processor
will be less if the reduce
operator is executed in the
data plane
Executing a query at any
coarser refinement level
"always" ensures reduction in
total memory footprint for a
query
Iterative refinement helps
query planner find better
opportunities to reduce
query's memory footprint
Iterative refinement entails
using more ALUs and delays
query output by multiple
windows
One partitioning decision can
be to only execute the filter
operation in the data plane
The load at stream processor
will be less if the reduce
operator is executed in the
data plane
Executing a query at any
coarser refinement level
"always" ensures reduction in
total memory footprint for a
query
Iterative refinement helps
query planner find better
opportunities to reduce
query's memory footprint
Iterative refinement entails
using more ALUs and delays
query output by multiple
windows
Consider the Sonata query shown below. Which statement(s) about this 40 points
query is true?
True False
This query filters out DNS
response packets
For all packets, it first finds
distinct (sIP, dIP) pairs
For each sIP, it counts the
number of distinct dstIP
It reports sIPs, for which this
count exceeds 40
In essence, it is trying to find
hosts that send traffic to
more than 40 distinct hosts
In essence, it is trying to find
hosts that receive traffic
from 40 different hosts
This query is trying to report
victims of DNS reflection
attack
This query filters out DNS
response packets
For all packets, it first finds
distinct (sIP, dIP) pairs
For each sIP, it counts the
number of distinct dstIP
It reports sIPs, for which this
count exceeds 40
In essence, it is trying to find
hosts that send traffic to
more than 40 distinct hosts
In essence, it is trying to find
hosts that receive traffic
from 40 different hosts
This query is trying to report
victims of DNS reflection
attack
20 points
A copy of your responses will be emailed to [email protected].
1 f 1
Mark the statements as True or False regarding query planning for the
above query *
True False
There are three partitioning
decisions: execute distinct in
the data plane,
distinct+reduce, or execute
both in the userspace
Consider decision: (1)
offload only distinct; and (2)
offload both distinct and
reduce. Decision 1 will send
less tuples to stream
processor that decision 2
Consider decision: (1)
offload only distinct; and (2)
offload both distinct and
reduce. Decision 1 will send
more tuples to stream
processor that decision 2
Consider decision: (1)
offload only distinct; and (2)
offload both distinct and
reduce. Decision 1 will need
more memory in the data
plane than decision 2
There are three partitioning
decisions: execute distinct in
the data plane,
distinct+reduce, or execute
both in the userspace
Consider decision: (1)
offload only distinct; and (2)
offload both distinct and
reduce. Decision 1 will send
less tuples to stream
processor that decision 2
Consider decision: (1)
offload only distinct; and (2)
offload both distinct and
reduce. Decision 1 will send
more tuples to stream
processor that decision 2
Consider decision: (1)
offload only distinct; and (2)
offload both distinct and
reduce. Decision 1 will need
more memory in the data
plane than decision 2
Page 1 of 1
Never submit passwords through Google Forms.
This form was created inside of University of California, Santa Barbara. report Abuse
Submit Clear form