MODify
Modify table entry by field names
- MODify
Shortest form:
mod.Change fields of one or more table entries: each entry is read, the named fields are set, and the entry is written back.
Warning
This writes the hardware behind SONiC’s back (see
Write).Grammar:
modify [nocheck_mem_mode] [idx_phy] [<VIEW>:]<TABLE>[.<COPY>] <INDEX> <COUNT> <FIELD>=<VALUE>[,...]
<COUNT>is required. OnlyFIELD=VALUEassignments are accepted, not raw words. With<VIEW>:in front of the table, the view prefix is added to field names you give without one. The built-in help mentions onlynocheck_mem_modeof the leading keywords.Unvalidated — Make one next-hop entry drop traffic (the index is the hardware index, not the SAI object ID)
drivshell> modify ING_L3_NEXT_HOP 2 1 DROP=1Built-in help
Parameters: <TABLE>[.<COPY>] <ENTRY> <ENTRYCOUNT> <FIELD>=<VALUE>[,...] If nocheck_mem_mode is specified, checking of unique_global mode, slice_mode will be skipped Read/modify/write field(s) of a table entry(s).Further reading
sonic-mgmt test suite files invoking bcmcmd (19 files), BCM_SDK命令, bcm cmd, 交换芯片Helix4 L2 L3功能验证, How to check and change L2 fdb related information on BCM shell.