Insert
Insert into a sorted table
- Insert
Shortest form:
i.Insert an entry into a hashed, sorted or CAM table by its key; the table chooses the index. An existing entry with the same key is replaced.
Warning
This writes the hardware behind SONiC’s back. An entry added this way is unknown to the SAI: it may be aged out or overwritten, and SONiC will not remove it.
Grammar, shared with
DELeteandLOOKup:insert [quiet] [<COUNT>] [bank<N>] [<VIEW>:]<TABLE> { <DW0> .. <DWn> | <FIELD>=<VALUE> ... }The words before the table can come in any order.
quietsuppresses the “table full” error,bank<N>restricts the operation to one hash bank (on tables that have several). The table namesa(orsarl) works on the SDK’s software copy of the L2 table instead of the hardware. Fields start from zero. Other tables are refused (ERROR: <t> table is not sorted, hashed, CAM, or command).Unvalidated — A static MAC entry (sketch: DESTINATION is left as a placeholder)
drivshell> insert L2X KEY_TYPE=0 L2:VLAN_ID=100 L2:MAC_ADDR=0x020000000022 L2:DESTINATION=<dest> L2:STATIC_BIT=1 BASE_VALID=1Built-in help
Parameters 1: [quiet] [<COUNT>] [bank#] <TABLE> <DW0> .. <DWN> Parameters 2: [quiet] [<COUNT>] <TABLE> <FIELD>=<VALUE> ... Number of <DW> must be appropriate to table entry size. Entry is inserted in ascending sorted order by key field. The quiet option indicates not to complain on table/bucket full. Some tables allow restricting the insert to a single bank.Further reading