Closed elhpavtat closed 3 years ago
Hi,
It is quite some time ago that I did the exercises, but I will still try to answer your question.
I think you do not necessarily have an error here, but a warning. While means that the p4 program still compiled (P4 program compiled successfully!
), but some things do not make sense. For instance, if you declare a table but do not apply it, this is something that would trigger a warning. Let's see:
[--Wwarn=unused] warning: Table my_station_table is not used;
This means that you created a table named my_station_table
but never applied it (I think). There should be a my_station_table.apply()
somewhere in your Ingress
or Egress
apply block. It happens the same for the routing_v6_table
table.
warning: Action selector 'IngressPipeImpl.ecmp_selector' is never referenced
This warning means that this selector should have been referred by a table. It seems that you have declared the selector but the table that uses it (which seems to be routing_v6_table
), needs an implementation
line like the following one:
table routing_v6_table {
key = {
//some table keys
}
actions = {
//some table actions
}
implementation = ecmp_selector; //this one
//add counters here if you need them
}
I hope this are the problems you might experience. If you already apply the tables and reference the selector, then…
Cheers,
Yes, I understand that this is not a critical error, but these tables are needed to complete the task, so I think this may be the reason why it doesn't work ping between h2 and h3. Looks like you're right! There really is no .apply() for these tables anywhere for exersice 5.
Thanks for the help, I was confused by the comment that this part of the code refers to exercise 6. By deleting the bolded part, the compile error is gone, but the ping doesn't work. However, that's another story, I'll look into it further. Thanks so much for your help!
if (hdr.ipv6.isValid() && my_station_table.apply().hit) {
i**f (srv6_my_sid.apply().hit) {
// PSP logic -- enabled for all packets
if (hdr.srv6h.isValid() && hdr.srv6h.segment_left == 0) {
srv6_pop();
}
} else {
srv6_transit.apply();
}**
routing_v6_table.apply();
// Check TTL, drop packet if necessary to avoid loops.
if(hdr.ipv6.hop_limit == 0) { drop(); }
}
That's alright! :)
Good luck
Hi. I am a beginner and have just started to learn P4. I have completed 4 tasks, however, I have a problem with task 5 and I can't figure out what my error is. I have been struggling with this problem for a week now. I have reread the task and its instructions several times and looked at the answers. However, I still get these errors, I understand what it is about, but I don't understand how to solve it. I've compared it with the solution and I seem to do everything exactly the same. Could you tell me in which direction to look for a solution?
Thank you very much.