Professional Documents
Culture Documents
Agenda
Go through the SAI proposal.
Discussions!
Sorted list of feedbacks/questions from the mailing list.
Please add/prioritize the items of your interest.
ToR
Approach of SAI
Focusing on exposing hardware capabilities,
And support management capabilities.
Operating System
BGP
LLDP
ACL
Sync
Agent2
Sync
Agent3
Hardware
Hw Load
Balancer
Switch
ASIC
User space
SAI
SAI Development
v0.9.0 available @github
https://github.com/opencomputeproject/OCP-Networking-ProjectCommunity-Contributions
Huge thanks to ocp!
Discussion @ opencompute-networking@lists.opencompute.org
Accepts patches via this mailing list or via github pull requests
Not sure if people think this mailing list can be dev list?
Timeline
v0.9.1 End of the year
Fixes for current v0.9.0
typedef union {
sai_uint8_t u8;
sai_uint16_t u16;
sai_uint32_t u32;
sai_uint64_t u64;
sai_switch_id_t switch_id;
sai_port_id_t port_id;
sai_port_phy_id_t port_phy_id;
sai_vlan_id_t vlan_id;
sai_vr_id_t vr_id;
sai_router_interface_id_t rif_id;
sai_cos_t cos;
sai_mac_t mac;
sai_ip_t ip;
sai_ipv6_t ip6;
sai_mpls_label_t mplslabel;
} sai_attribute_value_t;
SAI objects
SAI provides the interface to manage different types of objects in the
ASIC forwarding pipeline.
switch, port, lag
vlan, fdb, stp
virtual router, router interface, neighbor table, next hop, next hop groups, l3
routes
ACL
QoS, buffer
Port mirroring, ERSPAN, sflow
Switch/port initialization
sai_api_initialize(0, NULL);
sai_api_query(SAI_API_SWITCH, &sai_switch_api);
sai_switch_api->initialize_switch(0, NULL, NULL,
&switch_notifications);
sai_api_query(SAI_API_PORT, &sai_port_api);
int port_count = 128;
sai_port_id_t ports[128];
sai_port_api->get_ports(&port_count, ports);
VLAN
sai_api_query(SAI_API_VLAN, &sai_port_vlan);
sai_vlan_id_t vlan_id = 100;
sai_api_vlan->create_vlan(vlan_id);
int port_count = 2;
sai_vlan_port_t vlan_ports =
{ .port_id = 0, .tagging_mode =
SAI_VLAN_PORT_TAGGED },
{ .port_id = 1, .tagging_mode =
SAI_VLAN_PORT_UNTAGGED };
sai_api_vlan->add_ports_to_vlan(vlan_id, port_count,
vlan_ports);
L3 router interface
sai_api_query(SAI_API_ROUTER_INTERFACE, &sai_rif_api);
sai_router_interface_id_t rif_id;
sai_route_interface_attr_t attrs[4];
sai_attribute_value_t values[4];
attrs[0] = SAI_ROUTER_INTERFACE_ATTR_VR_ID;
attrs[1] = SAI_ROUTER_INTERFACE_ATTR_TYPE;
attrs[2] = SAI_ROUTER_INTERFACE_ATTR_VLAN_ID;
attrs[3] = SAI_ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS;
values[0].vr_id = vr_id;
values[1].u32 = SAI_ROUTER_INTERFACE_TYPE_VLAN;
values[2].vlan_id = vlan_id;
values[3].mac = src_mac;
sai_rif_api->create_router_interface(&rif_id, 4, attrs, values);
L3 neighbor
sai_api_query(SAI_API_NEIGHBOR, &sai_nb_api);
sai_ip_t nb_ip;
sai_neighbor_attr_t attrs[3];
sai_attribute_value_t values[3];
attrs[0] = SAI_NEIGHBOR_ATTR_VR_ID;
attrs[1] = SAI_NEIGHBOR_ATTR_ROUTER_INTERFACE_ID;
attrs[2] = SAI_NEIGHBOR_DST_MAC_ADDRESS;
values[0].vr_id = vr_id;
values[1].rif_id = rif_id;
values[2].mac = dst_mac;
sai_rif_api->create_neighbor(nb_ip, 4, attrs, values);
L3 next hop
sai_api_query(SAI_API_NEXT_HOP, &sai_nh_api);
sai_next_hop_id_t nh_id;
sai_next_hop_attr_t attrs[3];
sai_attribute_value_t values[3];
attrs[0] = SAI_NEXT_HOP_ATTR_TYPE;
attrs[1] = SAI_NEXT_HOP_ATTR_DST_IP;
attrs[2] = SAI_NEXT_HOP_ATTR_ROUTER_INTERFACE_ID;
values[0].u32 = SAI_NEXT_HOP_IP;
values[1].ip = dst_ip;
Values[2].rif_id = rif_id;
sai_nh_api->create_next_hop(&nh_id, 3, attrs, values);
L3 route
sai_api_query(SAI_API_ROUTE, &sai_route_api);
sai_next_hop_group_attr_t attrs[2];
sai_attribute_value_t values[2];
attrs[0] = SAI_ROUTE_ATTR_NEXT_HOP_TYPE;
attrs[1] = SAI_ROUTE_ATTR_NEXT_HOP_GROUP_ID;
values[0].u32 = SAI_ROUTE_NEXT_HOP_GROUP;
values[1].nhg_id = nhg_id;
sai_ip_prefix_t ip_prefix;
sai_route_api->create_route(ip_prefix, 3, attrs,
values);
ACL
sai_api_query(SAI_API_ACL, &sai_acl_api);
sai_acl_table_id_t acl_table_id;
sai_acl_table_attr_t attrs[1];
sai_attribute_value_t values[1];
sai_acl_field_t fields[2]= {SAI_ACL_FIELD_SRC_IP, SAI_ACL_FIELD_DST_IP };
attrs[0] = SAI_ACL_ATTR_STAGE;
values[0] = SAI_ACL_STAGE_INGRESS;
sai_acl_api->create_acl_table(&acl_table_id, 2, attrs, values, 2, 2,
fields);
sai_acl_id_t acl_id;
sai_acl_attr_t acl_attrs = { SAI_ACL_ATTR_TABLE_ID, SAI_ACL_ATTR_PRIORITY
};
sai_acl_attr_t acl_values = { acl_table_id, 100 };
sai_acl_api->create_acl(&acl_id, 2, attrs, 2, filters, 1, actions);
Discussions
Issue types
API design
BULK API, Async API support
API extensibility
SAI API to support
Packet tx/rx, fault management, trunk, OAM,
Multi-asic support
L2/L3
Port functionality
Misc
API Design
BULK APIs (Cisco, Kamala)
Example: program 100K routes in a second
Add provisions for L2 tunneling into fdb entry, i.e. to add next_hop_group_id to sai_fdb_entry_t
SPAN/RSPAN & policer support crucial and will be good to have for the first cut.
TCP/IP
Vlan 4
Vlan 2
LAG
1
LAG
2
p1p2
p8
p6
p7
SAI driver
Router
Vlan 2
Vlan 4
Switch
p1
p2
LAG 1
p3
p4
p5
LAG 2
p8
API Extensibility
Versioning APIs TLV based structures for backward
compatibility/extensibility (Kamala)
Multi-chip support
Different ASICs in the same box (Furst)
How will it handle 2 ASICs in the same box?
What happens if they are the same version of silicon. How does it identify between them?
Handling multiple chips with same roles and different roles will also need to be
accommodated. This probably can be a future item. (Phanidhar)
L2/L3
Routing protocol support mandatory (Furst)
Define mandatory in this context
What happens if a host adapter/underlying ASIC does not support routing?
Router function is to manage virtual routers, which is more of a higher level task
(Tao)
Move such high level task from SAI (Adapter) into Adapter Host
L2/L3
Complete L2 Multicast Switch functionality (Tina)
Mac Limit, multicast action combo(Drop, forwarding, Send to CPU)
SAI only supports L2 unicast.
The L2 multicast miss is supported in the SAI via sai_switch_fdb_miss_action_t to
define the behavior, which contains drop, forward, trap (send to cpu) and log.
Need SAI APIs for enabling/disabling L2/L3 control protocols on a per port.
Not in all chips the capture of control protocol PDUs is done using generic
ACL TCAMs (Phanidhar)
Port functionality
Request- an interface to query SFP information. Some vendors would
like to control the ports based on SFP data. (ramachandran)
Enhancement for additional port parameters is being worked on.
Miscellaneous
Intended audience, add page numbers (ramachandran)
Add figures for interaction between adapter module and adapter host.
(Ramachandran)
Warm Restart (Phanidhar)
Warm restart not well defined at this point
Maybe best to remove from v1.0 scope until better defined
Ordering (Furst)
During adapter start/restart what is the guaranteed order of objects creation.?
Currently the SAI states VLANs first, the whole ordering should be enumerated with dependencies
outlined.