p4runtime-shell icon indicating copy to clipboard operation
p4runtime-shell copied to clipboard

print p4 table entry info error

Open Colaplusice opened this issue 5 years ago • 3 comments

I insert a entry into table successfully, And I want to get entry info : image but I get the follow errors: image I don't know where the problem is . Please help me fix the issue.

Colaplusice avatar Feb 26 '20 02:02 Colaplusice

Thanks for reporting this. Could you share the P4 program (or even better the bmv2 JSON & P4Info files if you have them), as well as the command you used to create the table entry, so I can reproduce the issue?

antoninbas avatar Feb 28 '20 02:02 antoninbas

I see what the issue is.

That _PrintFieldName method was introduced in Protobuf 3.7.0 (https://github.com/protocolbuffers/protobuf/blob/v3.7.0/python/google/protobuf/text_format.py#L395) but you probably have an older version installed. I need to fix this since p4runtime-shell is supposed to work with Protobuf 3.6.0. If you use the provided docker image to run the shell (via the ./p4runtime-sh-docker script), you should not run into this error.

antoninbas avatar Mar 03 '20 07:03 antoninbas

@Colaplusice Can you please send me the code/cmd to enter p4 run time table entries. To be able to forward ping packets, I need to add two table entries on l2_exact_table in leaf1 -- one that matches on destination MAC address of h1b and forwards traffic to port 4 (where h1b is attached), and vice versa (h1a is attached to port 3) but I am unable to do it.

maryamiftikhar12 avatar Nov 03 '22 09:11 maryamiftikhar12