Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Openflow tables with name strings #2617

Closed
wenyingd opened this issue Aug 20, 2021 · 0 comments · Fixed by #2585
Closed

Configure Openflow tables with name strings #2617

wenyingd opened this issue Aug 20, 2021 · 0 comments · Fixed by #2585
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@wenyingd
Copy link
Contributor

Describe the problem/challenge you have
Currently the OpenFlow tabels are shown with IDs, which requires the user and dev has the knowledge of the mapping between table and int number. The output of OpenFlow dump is not Intuitive.
For example, current flows show like

cookie=0x1a000000000000, duration=655337.760s, table=70, n_packets=1267470, n_bytes=121664964, priority=210,ct_state=+rpl+trk,ct_mark=0x20,ip actions=mod_dl_dst:7a:c3:94:8f:29:94,resubmit(,80)
 cookie=0x1a000000000000, duration=655337.760s, table=70, n_packets=0, n_bytes=0, priority=200,ip,reg0=0x80000/0x80000,nw_dst=192.168.249.1 actions=mod_dl_dst:7a:c3:94:8f:29:94,resubmit(,80)
 cookie=0x1a030000000000, duration=655337.738s, table=70, n_packets=37848, n_bytes=4728070, priority=200,ip,reg0=0x80000/0x80000,nw_dst=192.168.249.212 actions=mod_dl_src:7a:c3:94:8f:29:94,mod_dl_dst:52:cb:5f:36:bb:65,resubmit(,72)
 cookie=0x1a030000000000, duration=655337.737s, table=70, n_packets=37703, n_bytes=4718644, priority=200,ip,reg0=0x80000/0x80000,nw_dst=192.168.249.213 actions=mod_dl_src:7a:c3:94:8f:29:94,mod_dl_dst:56:a7:9f:9d:89:17,resubmit(,72)
 cookie=0x1a020000000000, duration=655337.627s, table=70, n_packets=0, n_bytes=0, priority=200,ip,nw_dst=192.168.251.0/24 actions=mod_dl_src:7a:c3:94:8f:29:94,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xab01a5f->NXM_NX_TUN_IPV4_DST[],resubmit(,72)
 cookie=0x1a020000000000, duration=655337.627s, table=70, n_packets=4, n_bytes=584, priority=200,ip,nw_dst=192.168.248.0/24 actions=mod_dl_src:7a:c3:94:8f:29:94,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xab01a68->NXM_NX_TUN_IPV4_DST[],resubmit(,72)
 cookie=0x1a020000000000, duration=655337.627s, table=70, n_packets=0, n_bytes=0, priority=200,ip,nw_dst=192.168.250.0/24 actions=mod_dl_src:7a:c3:94:8f:29:94,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xab01a5b->NXM_NX_TUN_IPV4_DST[],resubmit(,72)
 cookie=0x1a000000000000, duration=655337.771s, table=70, n_packets=1455707, n_bytes=129294202, priority=0 actions=resubmit(,80)

Describe the solution you'd like
Using the OpenFlow MultipartRequest/MultipartReply message with type OFP_Table_Features type to to modify OF table names, we can get an output showing readable table names.
The modification is performed after OVS is connected to Antrea Agent. Since OVS forbids to skip any table in the OFP_Table_Features messages and we don't want to change the exisiting table features on the OpenFlow entry limitationa and instructions, we should query the existing configurations on all OVS tables using an empty OFP_Table_Features request first, and then leverage the reply messages and only modify the table names which Antrea is using.

We expect the OpenFlow entries look like,

 cookie=0x1f000000000000, duration=655534.032s, table=l3ForwardingTable, n_packets=4, n_bytes=584, priority=210,ct_state=+rpl+trk,ct_mark=0x20,ip actions=mod_dl_dst:b2:26:7f:37:c5:30,resubmit(,l2ForwardingCalcTable)
 cookie=0x1f000000000000, duration=655534.032s, table=l3ForwardingTable, n_packets=0, n_bytes=0, priority=200,ip,reg0=0x80000/0x80000,nw_dst=192.168.248.1 actions=mod_dl_dst:b2:26:7f:37:c5:30,resubmit(,l2ForwardingCalcTable)
 cookie=0x1f020000000000, duration=655533.942s, table=l3ForwardingTable, n_packets=0, n_bytes=0, priority=200,ip,nw_dst=192.168.250.0/24 actions=mod_dl_src:b2:26:7f:37:c5:30,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xab01a5b->NXM_NX_TUN_IPV4_DST[],resubmit(,l3DecTTLTable)
 cookie=0x1f020000000000, duration=655533.942s, table=l3ForwardingTable, n_packets=0, n_bytes=0, priority=200,ip,nw_dst=192.168.251.0/24 actions=mod_dl_src:b2:26:7f:37:c5:30,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xab01a5f->NXM_NX_TUN_IPV4_DST[],resubmit(,l3DecTTLTable)
 cookie=0x1f020000000000, duration=655533.942s, table=l3ForwardingTable, n_packets=4, n_bytes=284, priority=200,ip,nw_dst=192.168.249.0/24 actions=mod_dl_src:b2:26:7f:37:c5:30,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xab01a76->NXM_NX_TUN_IPV4_DST[],resubmit(,l3DecTTLTable)
 cookie=0x1f000000000000, duration=655534.146s, table=l3ForwardingTable, n_packets=0, n_bytes=0, priority=0 actions=resubmit(,l2ForwardingCalcTable)

Anything else you would like to add?
This feature should doesn't the Antrea existing behaviors on the OVS pipeline. It only impacts the output of the flow entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant