Hi Marian:
On the per FDB entry counter id the following are some observations.
a) This being attached to a Dest MAC is by definition a Tx counter. There is no Rx counting.
b) Assuming one counter-id per MAC entry, this is a scalability challenge for very large number of MACs.
c) For BUM traffic this doesn't help and we will need to introduce a counter id in the l2mc_group_member.
d) Assuming there is a counter id allocated per remote ip and all FDB entries point to this single counter
how do devices which natively count at a per remote ip basis know that this counter is a per remote IP counter
and not a per FDB counter ?
Looks like we might have to add a counter_type_shared_per_remote_ip and shared_per_vni to the
sai_counter_type_t ?
On the operational status, the sai_port_oper_status_notification_t can be used. The port_id field is a
of type sai_object_id_t and currently supports objects of type - port, lag and bridge_port.
We might have to add object_type tunnel (the p2p version)
The operational status(p2p version of tunnel) should reflect the data forwarding capability to the remote ip.
This could be,
a) IP underlay reachability to the remote IP - the operstatus here can toggle between up and down.
b) device programming status. This is creation time and could be reflective of either implementation issues or
resource availability issues. This is very device specific and by providing an operational status we can
provide a clean abstraction.
Introducing the dest_ip field and giving a p2p connotation solves a lot of requirements cleanly and with clean
abstraction. The SONiC code continues to have only one implementation.
This is as follows.
/* Create Mapper and Mapping entries */
a) map_oid = create_mapper()
b) mapping_entry_oid = create_mapping_entry (map_oid,...)
/* Create a tunnel and term as existing i.e the P2MP version of the tunnel */
c) sip_tunnel_oid = create_tunnel(SIP, map_oid)
d) sip_tunnel_term_oid = create_tunnel_terminator(sip_tunnel_oid, SIP) /* P2MP */
---> Till this point things are the same as the existing implementation.
/* Create a P2P version of the tunnel with the proposed destip field as part of the tunnel_attr */
/* There are no changes to the terminator API or attrs */
e) per_dip_tunnel_oid = create_tunnel(SIP, DIP, map_oid) /* uses the map_oid created in the first step */
d) per_dip_tunnel_term_oid = create_tunnel_terminator(per_dip_tunnel_oid, SIP, DIP) /* P2P type terminator */
/* per dip tunnel learning enable/disable */
/* For EVPN tunnels we disable hardware learning and for static tunnels we can enable hardware learning like access
ports. */
f) per_dip_bridge_port_oid = create_bridge_port(default_dot1q_bridge, SAI_BRIDGE_PORT_TYPE_TUNNEL, per_dip_tunnel_oid, learning_disable)
/* If there are devices which need to create a separate L2MC group and attach it to the vlan then it could be
done within SAI implementation based on the bridge_port type. */
g) tunnel_vlan_member_port = create_vlan_member_port(vlanid, per_dip_bridge_port_oid)
/* FDB adds */
h) add_fdb_entry(mac, bv_id, per_dip_bridge_port_oid, dest_ip)
/* tunnel nexthop creation for L3VXLAN*/
Remains the same as existing implementation i.e it uses the sip_tunnel_oid created in step (c)
Regards,
Rajesh