Closed RogueCHU closed 1 year ago
update:
Emmm it seems that switch adds entry from data plane successfully.
I use tcpdump
catch VM0-->VM1
packets. ICMP request and reply communication has occurred in VM1.
root@IPDK:~/examples/l3_pna#ip netns exec VM0 ping 2.2.2.2 -c 5
root@IPDK:~/examples/l3_pna#ip netns exec VM1 tcpdump -i TAP1 -nne
07:12:55.859587 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3211, seq 1, length 64
07:12:55.859621 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 1, length 64
07:12:55.859681 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 1, length 64
07:12:56.861508 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3211, seq 2, length 64
07:12:56.861533 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 2, length 64
07:12:56.861572 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 2, length 64
07:12:57.889230 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3211, seq 3, length 64
07:12:57.889262 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 3, length 64
07:12:57.889301 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 3, length 64
07:12:58.909512 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3211, seq 4, length 64
07:12:58.909538 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 4, length 64
07:12:58.909596 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 4, length 64
07:12:59.933219 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3211, seq 5, length 64
07:12:59.933248 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 5, length 64
07:12:59.933289 5e:d3:da:ec:5f:5d > 72:e6:6a:53:a7:99, ethertype IPv4 (0x0800), length 98: 2.2.2.2 > 1.1.1.1: ICMP echo reply, id 3211, seq 5, length 64
However, I can't add VM1-->VM0
entry from control plane. So... VM0 can not receive ICMP reply.
root@IPDK:~/examples/l3_pna#ip netns exec VM0 ping 2.2.2.2 -c 5
root@IPDK:~/examples/l3_pna#ip netns exec VM0 tcpdump -i TAP0 -nne
07:11:49.227862 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3208, seq 1, length 64
07:11:50.237212 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3208, seq 2, length 64
07:11:51.261527 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3208, seq 3, length 64
07:11:52.285189 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3208, seq 4, length 64
07:11:53.309438 72:e6:6a:53:a7:99 > 5e:d3:da:ec:5f:5d, ethertype IPv4 (0x0800), length 98: 1.1.1.1 > 2.2.2.2: ICMP echo request, id 3208, seq 5, length 64
I believe the DPDK software switch does not currently support adding entries to add-on-miss tables from the control plane, only via add_entry calls in the P4 program.
A potential workaround for now is to modify the P4 program so it does a lookup in two similar tables, one add-on-miss, the other one not add-on-miss. Make control plane additions to the not-add-on-miss table. There are multiple ways to combine the results from the two lookups, but one straightforward way would be to give a hit in one strict priority over the other.
I believe the DPDK software switch does not currently support adding entries to add-on-miss tables from the control plane, only via add_entry calls in the P4 program.
A potential workaround for now is to modify the P4 program so it does a lookup in two similar tables, one add-on-miss, the other one not add-on-miss. Make control plane additions to the not-add-on-miss table. There are multiple ways to combine the results from the two lookups, but one straightforward way would be to give a hit in one strict priority over the other.
Thanks for your reply! Do you think this feature will be supported in the future?
I would like it if it were, but I have no idea if/when anyone with the time and knowledge to do so will make such an enhancement.
I would like it if it were, but I have no idea if/when anyone with the time and knowledge to do so will make such an enhancement. Thanks.
Hey, guys! I tried to learn how to use
add_on_miss
, the new feature of PNA, and errors occurred when I usedp4rt-ctl
to add an entry.My p4 program
l3_pna.p4
is based upon thesimple_l3.p4
andl2_pna.p4
.I wanted to figure out whether the L3 switch can update the forward-rules by itself. So I tried
add_on_miss
capability.First, I setup two taps/VMs.
The network topology as follow.
And I wrote the
l3_pna.p4
.The idea of my code is, if
dst_ip
misses, the table will trigger thesend_miss
action,send_miss
action will addport=1
tosend_hit
. So, I added an entry from control plane firstly.Unfortunately, the error occured.
Theoretically, if the program works, switch will add an
VM0-->VM1
rule to thesend_hit
, and then VM0 ping VM1 successfuly.So, my question is :
add_on_miss
.hit action
from control plane so farAny ideas? Thanks a lot!