Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Add iof:get_table_features, with sensible formatting #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

legoscia
Copy link
Contributor

Just dumping the response to the console doesn't make sense, as there's
lots of it, and much of it is almost identical. Attempt to present the
data in a compact but still fairly complete manner, by identifying
unique values for the various feature lists and summarising them as
footnotes.

It's recommended to run iof:debug(off) before requesting table features,
since otherwise all the data will be written to the console anyway.

Sample output from LINC:

([email protected])27> iof:get_table_features().
Id  Table name                       Max entries Instr NextTab WrAct ApAct Match Wild  WrSet ApSet
  0 Flow Table 0x00                  16777216    {1}   1-254   {3}   {3}   {2}   {2}   {2}   {2}  
  1 Flow Table 0x01                  16777216    {1}   2-254   {3}   {3}   {2}   {2}   {2}   {2}  
[...]
252 Flow Table 0xfc                  16777216    {1}   253-254 {3}   {3}   {2}   {2}   {2}   {2}  
253 Flow Table 0xfd                  16777216    {1}   254     {3}   {3}   {2}   {2}   {2}   {2}  
254 Flow Table 0xfe                  16777216    {1}   none    {3}   {3}   {2}   {2}   {2}   {2}  

{1}: [goto_table,write_metadata,write_actions,apply_actions,clear_actions,
      meter]
{2}: [in_port,metadata,eth_dst,eth_src,eth_type,vlan_vid,vlan_pcp,ip_dscp,
      ip_ecn,ip_proto,ipv4_src,ipv4_dst,tcp_src,tcp_dst,udp_src,udp_dst,
      sctp_src,sctp_dst,icmpv4_type,icmpv4_code,arp_op,arp_spa,arp_tpa,
      arp_sha,arp_tha,ipv6_src,ipv6_dst,ipv6_flabel,icmpv6_type,icmpv6_code,
      ipv6_nd_target,ipv6_nd_sll,ipv6_nd_tll,mpls_label,mpls_tc,mpls_bos,
      pbb_isid]
{3}: [output,group,set_queue,set_mpls_ttl,dec_mpls_ttl,set_nw_ttl,dec_nw_ttl,
      copy_ttl_out,copy_ttl_in,push_vlan,pop_vlan,push_mpls,pop_mpls,push_pbb,
      pop_pbb,set_field]

Just dumping the response to the console doesn't make sense, as there's
lots of it, and much of it is almost identical.  Attempt to present the
data in a compact but still fairly complete manner, by identifying
unique values for the various feature lists and summarising them as
footnotes.

It's recommended to run iof:debug(off) before requesting table features,
since otherwise all the data will be written to the console anyway.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant