Closed chenxiang2019 closed 7 years ago
Please provide the entire P4 program, so I can try to reproduce the issue.
@antoninbas Hi, Antonin. I have published my entire P4 program at here and I append the whole steps which I used to reproduce this problem. Thanks for your help!
BTW, I am trying to fulfill the table_set_timeout
to control the switch behaviours at runtime and I realize that the minimal timeout it could set is 1ms. I have these questions:
1.Is there an approach to set more precise timeout interval(e.g. 1ns)?
2.I check the table information and found that the timeout entries have not been deleted yet. I'm puzzled with this situation. Based on my comprehension, these entries should not work any more and be deleted as soon as possible.
3.Does the timeout function only maintained in bmv2? In other words, if I got a physical P4 switch, could it support timeout?
Thank you very much!
Regarding your error. The switch is crashing because intrinsic_metadata.egress_rid is not defined and this field is needed for multicast. Please see https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md#intrinsic_metadata-header. I recommend that you define all intrinsic metadata fields to avoid such issues. Note that if you want to broadcast a packet, you will need to configure the multicast group properly using the runtime CLI.
Regarding your follow-up questions:
@antoninbas Thank you! Your answers perfectly resolve my problems.
Hi all.
My environment: Ubuntu14.04 64bit, with the newest version of bmv2 and p4c-bm installed. I use
simple_switch
engine for my program.I write a simple P4-14 program today and want to enable arp broadcast in this program. There are some problems with my program so that it didn't work correctly. And thus I fulfil a counter to check whether the arp packets are processed or not.
The way I process incoming arp packets is to broadcast them.
P4-14 program(simple bone):
The applied control rules:
Then I start mininet to simulate the topologic which has 4 hosts and 1 switch. I start ping between h1 and h2 and use simple_switch_CLI to check the number of processed arp packets.
And it generates this exception:
I have no idea about this situation. Could you help me with this? Thank you very much!