Questions about the P4 programming language. P4 is designed to allow programming of packet forwarding planes.
Questions tagged [p4-lang]
10 questions
2
votes
0 answers
Viewing P4 packet counter
I'm new to P4, and I'm trying to understand how packet counters are implemented.
In the documentation, it is quite clear how counters are defined and then incremented. But I cannot see how one would be able to view the counter using the control…

David
- 201
- 2
- 10
2
votes
1 answer
How can I read bmv2 queueing state with P4 language?
I'm writing a test P4 language in which I prepare to read the queueing state of the software switch bmv2 .There is no relevant content in the P4 program specification.But I found a mail in the mail list which is:
Hi Wei,
There is no standard way to…

姜金浩
- 96
- 5
1
vote
1 answer
Can I remove a packet payload inside a .p4 program?
I would like to know if it's possible to completely remove a packet payload from a packet inside a .p4 program or at least modify it to random data. The reason behind this is that I'm cloning a packet and sending it to a different host (monitor) and…

Henrique Becker Brum
- 23
- 3
0
votes
0 answers
P4 Simple switch for linking two VMs
I am trying to link two virtual machines via P4 simple switch. I use simple_router.json taken from the P4 repository on github.
I managed to ping from one host to another, but if I use the iperf command, the TCP connection is not established.
What…

MOGZEM
- 1
- 1
0
votes
1 answer
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC
When I use the make command to compile P4 code and issue flow rules to the switch. The following error occurred while configuring the switch:
Configuring switch s11 using P4Runtime with file ./sw_rules/s11-runtime.json
- Using P4Info file…

zzz123
- 1
0
votes
0 answers
I want to build a bandwidth limiter using P4?
I am a beginner in P4, and currently learning P4. Currently experiment with the meter in P4. How may I limit the bandwidth using P4 by identifying packets?
Here I have created an indirect meter like this in Ingress Processing
control…

COLLiDER
- 31
- 5
0
votes
0 answers
How can I load sX-runtime.json in bmv2?
I would like to build a SRv6 network with p4 language and bmv2. In P4-tutorials(https://github.com/p4lang/tutorials) they use mininet while I'm using Proxmox VE to build different virtual machines. I want to use bmv2 as software switches but I…
0
votes
0 answers
P4 tutorials/basic make run : No module named 'p4'
environment: VMware,
Ubuntu 18.04.4 LTS.
Python 2.7.17
I am a new beginner with P4, so I try to run the P4 tutorials/basic.
I try to make run, and the error as following:
Traceback (most recent call last):
File "../../utils/run_exercise.py", line…

Xinran
- 1
- 1
0
votes
1 answer
Compile a p4 file in mininet
I have a custom topology custom.py and I wrote a p4file.p4 file. The problem is that I don't know how to use the p4file.p4 into mininet with my topology.
For instance, in this github repository…

Andrew
- 23
- 4
0
votes
1 answer
What does the current(0,4) mean in parser.p4?
I'm studying on the p4 program code recently.
However, I do not understand what does this 'current(0,4)' mean in the parser.p4.
parser parse_mpls_bos {
extract(mpls_bos);
return select(current(0, 4)) {
0x4 : parse_ipv4;
…

David Ozc
- 31
- 2