Open mayo11 opened 3 weeks ago
I am not sure, but you might get a wider audience for your question by posting it on the general channel of the P4 Zulip instance here https://p4lang.zulipchat.com
Github issues on this repository are better focused on bugs in, or desired enhancements to, the P4 compiler.
If you do ask your question there, I would suggest making it clear which P4 back end you are trying to use, e.g. are you using the p4tc back end? One of the ebpf/ubpf back ends? That wasn't clear to me from your question. I would also recommend publishing your P4 program in a public repository, perhaps on github.com, and linking to it from your question.
@tatry @osinstom
I am not sure, but you might get a wider audience for your question by posting it on the general channel of the P4 Zulip instance here https://p4lang.zulipchat.com
Github issues on this repository are better focused on bugs in, or desired enhancements to, the P4 compiler.
If you do ask your question there, I would suggest making it clear which P4 back end you are trying to use, e.g. are you using the p4tc back end? One of the ebpf/ubpf back ends? That wasn't clear to me from your question. I would also recommend publishing your P4 program in a public repository, perhaps on github.com, and linking to it from your question.
Thank you for your reply,The back ends I use are ebpf psa, and my P4 example code is the P4 code I posted. Thank you for your suggestion. I will consider raising my questions on P4 Zulip. Thank you
Hello,As a newcomer to the P4 language,I have some question... I found that ebpf backends does not have tc's ingress and egress framework model to offer,only xdp_model. I try to use the PSA framework to make a demo, remove the vlan header in the ingress of tc, and add the vlan header on the egress, so that the NIC port can communicate directly with the vlan interface.
I found that when I set NTK to true, the current packet will pass through return "bpf_redirect(skb->ifindex, BPF_F_INGRESS);" and enter the xdp_helper again, and the arp packet will be xdp_helper modified eth_type to ipv4 type, and it will be directly uploaded when entering the ingress by "return TC_ACT_OK;", and the packet eth_type is still 0x0800, and it is not modified to the original ARP (0x0806),ARP packets cannot be delivered to the port correctly!!
I don't know if it's my P4 code that is problematic, please take a look, thank a lot!!!
the necessary part of generate C code:
The P4 code: