[P4-dev] Error: Table has no action my_drop

Andy Fingerhut andy.fingerhut at gmail.com
Fri Jun 7 14:48:52 EDT 2019


FYI, Mihai, the short version, if you are wondering, is that I do not think
this is necessarily a bug in p4c.  It might be a change in p4c's behavior
that caused a simple_switch_CLI abbreviation convenience feature to no
longer work.  If you really want to know whether it was a change in p4c or
in my test program that caused this, I can try to dig deeper, but even if
it is a change in p4c, that doesn't mean it is a bug, but perhaps normal
"duplicate actions in p4c front/mid-end compiler passes" behavior.

I am pretty sure that this is a case where my updated instructions using a
fully qualified hierarchical action name worked before and after, but my
instructions used a simple_switch_CLI convenience feature where if two
actions were unique in their last part, you could use the unique last part
as an abbreviation for the full hierarchical name.

I do not know yet whether it was a change in p4c or in my P4_16 program
that caused an action to be duplicated, and be given the same full
hierarchical name in the BMv2 JSON file, but that is what is happening now,
and in that case simple_switch_CLI's simple abbreviation mechanism does not
work.

Andy

On Fri, Jun 7, 2019 at 11:33 AM Harsh Gondaliya <
harshgondaliya_vinodbhai at srmuniv.edu.in> wrote:

> Yes, now it works. Thanks.
>
> On Fri, Jun 7, 2019 at 11:48 PM Andy Fingerhut <andy.fingerhut at gmail.com>
> wrote:
>
>> It looks like relatively recent changes either to p4c, or to
>> demo1.p4_16.p4, caused a duplicate action with identical names to be
>> created in the compiled BMv2 JSON file, and in such cases,
>> simple_switch_CLI cannot automatically resolve the "short names" currently
>> shown in the README instructions, and you must instead use the full
>> hierarchical name for action "my_drop", which are:
>>
>> I will soon commit a change to the README.md in the demo1 directory to
>> update those commands to the following, which should work without error
>> messages:
>>
>>     table_set_default ipv4_da_lpm ingressImpl.my_drop
>>     table_set_default mac_da ingressImpl.my_drop
>>     table_set_default send_frame egressImpl.my_drop
>>
>> Thanks,
>> Andy
>>
>> On Fri, Jun 7, 2019 at 9:29 AM Harsh Gondaliya <
>> harshgondaliya_vinodbhai at srmuniv.edu.in> wrote:
>>
>>> Ok, I will do that.
>>>
>>> On Fri, 7 Jun 2019 9:41 pm Mihai Budiu, <mbudiu at vmware.com> wrote:
>>>
>>>> You should also considering filing an issue with the p4-guide
>>>> repository, since you have obtained all the code from there.
>>>>
>>>>
>>>>
>>>> Mihai
>>>>
>>>>
>>>>
>>>> *From:* P4-dev <p4-dev-bounces at lists.p4.org> *On Behalf Of *Harsh
>>>> Gondaliya
>>>> *Sent:* Friday, June 7, 2019 1:47 AM
>>>> *To:* p4-dev at lists.p4.org
>>>> *Subject:* [P4-dev] Error: Table has no action my_drop
>>>>
>>>>
>>>>
>>>> I used install-p4dev-p4runtime.sh script from
>>>> https://github.com/jafingerhut/p4-guide
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjafingerhut%2Fp4-guide&data=02%7C01%7Cmbudiu%40vmware.com%7Cf30c4b1032544dd4b47108d6eb2d163d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636954976229548450&sdata=bSNFloqLAd5XbW6wZxiuKRNzBbeyXvxubpvoBVBw9q8%3D&reserved=0> to
>>>> build behavioral model, p4c compiler and simple_switch.
>>>>
>>>>
>>>>
>>>> Then I compiled the demo1 program
>>>> https://github.com/jafingerhut/p4-guide/tree/master/demo1
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjafingerhut%2Fp4-guide%2Ftree%2Fmaster%2Fdemo1&data=02%7C01%7Cmbudiu%40vmware.com%7Cf30c4b1032544dd4b47108d6eb2d163d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636954976229548450&sdata=%2Fu2EtltcPXiJr6y33AbAFdjRix2qnoZsRjrLkYv6EB4%3D&reserved=0> and
>>>> ran the simple_switch. Now, when I am trying to add table entries using
>>>> simple_switch_CLI, it gives me these errors.
>>>>
>>>> ---------------
>>>>
>>>> Control utility for runtime P4 table manipulation
>>>> RuntimeCmd: table_set_default ipv4_da_lpm my_drop
>>>> Error: Table ipv4_da_lpm has no action my_drop
>>>> RuntimeCmd: table_set_default mac_da my_drop
>>>> Error: Table mac_da has no action my_drop
>>>> RuntimeCmd: table_set_default send_frame my_drop
>>>> Error: Table send_frame has no action my_drop
>>>> RuntimeCmd:
>>>>
>>>> ------------------
>>>>
>>>> I checked the demo1 p4 program and it does have a definition for
>>>> my_drop action. Still, I am getting this error. I am aware of some changes
>>>> that need to be made for mark_to_drop(stdmeta) function call (troubleshooting
>>>> steps
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjafingerhut%2Fp4-guide%2Fblob%2Fmaster%2FREADME-troubleshooting.md%23compiler-gives-error-message-about-mark_to_drop&data=02%7C01%7Cmbudiu%40vmware.com%7Cf30c4b1032544dd4b47108d6eb2d163d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636954976229558442&sdata=HKaJharAx59Fb%2FJM7y6afB68ItuiGV3Q6%2Fsa7WPiaDA%3D&reserved=0> Last
>>>> topic, 2nd bullet point, 1st one doesn't work for me), but don't know exact
>>>> steps to solve this.  Can I get some help as to how this error can be
>>>> resolved?
>>>>
>>> _______________________________________________
>>> P4-dev mailing list
>>> P4-dev at lists.p4.org
>>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190607/9a7becc3/attachment-0001.html>


More information about the P4-dev mailing list