GPORT
Get a GPORT id
- GPORT
Turn a port description into the numeric GPORT ID used by the SDK, and print it. This is handy for decoding GPORT values in logs. The only argument is
Port=<spec>, where<spec>is a port name, a port number, or one of the<type>(<args>)forms listed in the built-in help, such asmodport(0,1)ortrunk(3). The shell prints `` gport is = <gport>(<type>)``, or `` Unable to Parse GPORT !!!`` if the description is invalid. Without an argument it prints the usage.The built-in help also lists
localcpu, but the shell does not accept it:gport port=localcpuis rejected withInvalid port "localcpu", as the second example shows. Use the port namecpu0instead.Read-only.
Hardware-validated — GPORT of module 0, port 1
drivshell> gport port=modport(0,1) gport is = 0x8000001(modport)
Hardware-validated — GPORT of the local CPU port
drivshell> gport port=localcpu Invalid port "localcpu" Examples: fe0 ge1 3 cpu0 any GPORT: Error: Unknown option: port=localcpu Unable to Parse GPORT !!! Failed to execute the diagnostic command. Error: Operation failed.
Hardware-validated — GPORT of the CPU port, by name
drivshell> gport port=cpu0 gport is = 0x0
Built-in help
Parses and construct GPORT from given parameters Parameters: <port=gporttype(modid,portnum)> where gporttype can be modport/mp - MODPORT_GPORT takes modid and port num or name local - LOCAL_GPORT takes only port num or name trunk - TRUNK_GPORT takes only trunk id devport - DEVPORT_GPORT takes port nuber or name localcpu/lc - LOCAL_CPU_GPORT no input required invalid - INVALID_GPORT no input required blackhole/bh - BLACKHOLE_GPORT no input required mpls - MPLS_GPORT takes mpls vpn mim - MIM_GPORT takes mim id wlan - WLAN_GPORT takes wlan vpn sub - SUBPORT_GPORT takes subport port id subg - SUBPORT_GROUP_GPORT takes subport group id vlan - VLAN_GPORT takes vlan port id vxlan - VXLAN_GPORT takes vxlan port id trill - TRILL_GPORT takes trill port id niv - NIV_GPORT takes niv port id l2gre - L2GRE_GPORT takes l2gre port id extender - EXTENDER_GPORT takes extender port idFurther reading