There is more than one way to set flags for a port using the CLI. The first method is with the specific command, if it available.
[ctp_cmd@gluon_50 ~ 10]> cmd port se-0/0 cfg flags reclk_rd 0 [ctp_cmd@gluon_50 ~ 11]> cmd port se-0/0 qry all | fgrep "Port Config Flags" Port Config Flags: NoRdReclk [ctp_cmd@gluon_50 ~ 12]> cmd port se-0/0 cfg flags reclk_rd 1 [ctp_cmd@gluon_50 ~ 13]> cmd port se-0/0 qry all | fgrep "Port Config Flags" [ctp_cmd@gluon_50 ~ 14]>
The reclk_rd flag is currently the only flag that shows up in the config flag query display when it is disabled (reverse logic). This is because that function is normally enabled, and the flag display is set up to have nothing display when all flags are "normal".
flag mask Description ============= ========== =================================== trans_st_fifo 0x00000001 TRANS[8] ST alignment FIFO enable y_redund 0x00000002 Y Cable redundancy enable s_ended 0x00000004 Enable Single Ended outputs for RD/RT reclk_rd 0x00000008 Reclock RD with RT for alignment tfifo_wrclk_inv 0x00000010 TRANS ST FIFO Write Clock invert tfifo_rdclk_inv 0x00000020 TRANS ST FIFO Read Clock invert y_mstr 0x00000040 Enable Y Cable master flag tt_subst 0x00000080 Substitute internal clock when TT missing dcd_unclamp 0x00000400 Allow DCD to toggle when DCARD installed trans_st_in 0x00000800 TRANS[8] ST is an input trans_st_out 0x00001000 TRANS[8] ST is an output no_tt_check 0x00002000 Don't check TT frequency at all hi_tt_check 0x00004000 Only check for TT freq too high clk_gate 0x00008000 Substitute internal clk for TT when RTS active clk_gate_inv 0x00010000 Invert sense of RTS for above feature data_inv 0x00040000 Inverts input and output data y_fast 0x00080000 Enable high speed Y cable switching y_cts_ctrl 0x00100000 Multimaster - Control Y cable drive with CTS y_cts_inv 0x00200000 Invert sense of CTS for above feature hi_spd 0x00400000 Enable high speed data rates tx_phase_inv 0x00800000 Invert ST/SD phase relationship
Any of the items in the "flag" column can be used in a command. But you can also set the flag using the value in the mask column. This is done with the command "cmd port X cfg www_db "<string>". For example
[ctp_cmd@gluon_50 ~ 33]> cmd port se-0/0 qry www_db 20;6;5;1;-rc4;;P;0;0;0;0;1024.000000; ;1,134217728,0,0,0,4,1,1,1,1,1,20,45,5,20,200,200,2000,0x0,0x0,0x8,1,0,0,0x1,1, [ctp_cmd@gluon_50 ~ 34]>
The flags element is near the end of the string (in this case it is the 0x8). When Multiple flags are active, the appropriate bit position is active according to the mask definitions in the table above:
[ctp_cmd@gluon_50 ~ 48]> cmd port se-0/0 qry www_db 20;6;5;1;-rc4;;P;0;0;0;0;1024.000000; ;1,134217728,0,0,0,4,1,1,1,1,1,20,45,5,20,200,200,2000,0x0,0x0,0x8,1,0,0,0x1,1, [ctp_cmd@gluon_50 ~ 49]> cmd port se-0/0 qry all | fgrep "Port Config Flags" <<< No output, so all flags are "normal" and flags field is 0x8>>> [ctp_cmd@gluon_50 ~ 50]> cmd port se-0/0 cfg flags trans_st_fifo 1 [ctp_cmd@gluon_50 ~ 51]> cmd port se-0/0 cfg flags tfifo_wrclk_inv 1 [ctp_cmd@gluon_50 ~ 52]> cmd port se-0/0 cfg flags tfifo_rdclk_inv 1 [ctp_cmd@gluon_50 ~ 53]> cmd port se-0/0 qry all | fgrep "Port Config Flags" Port Config Flags: TransFifo TransWrInv TransRdInv [ctp_cmd@gluon_50 ~ 55]> cmd port se-0/0 qry www_db 20;6;5;1;-rc4;;P;0;0;0;0;1024.000000; ;1,134217728,0,0,0,4,1,1,1,1,1,20,45,5,20,200,200,2000,0x0,0x0,0x39,1,0,0,0x1,1, [ctp_cmd@gluon_50 ~ 56]>
Notice that the flags field in the www_db string is 0x39, which is correct if you reference the table above and combine the masks for all the active flags. Likewise, you can set a group of flags with the www_db config string:
[ctp_cmd@gluon_50 ~ 59]> cmd port se-0/0 qry www_db 20;6;5;1;-rc4;;P;0;0;0;0;1024.000000; ;1,134217728,0,0,0,4,1,1,1,1,1,20,45,5,20,200,200,2000,0x0,0x0,0x8,1,0,0,0x1,1, [ctp_cmd@gluon_50 ~ 60]> cmd port se-0/0 qry all | fgrep "Port Config Flags" <<< No output, so all flags are "normal" and flags field is 0x8>>> [ctp_cmd@gluon_50 ~ 61]> cmd port se-0/0 cfg www_db "20;6;5;1;-rc4;;P;0;0;0;0;1024.000000; ;1,134217728,0,0,0,4,1,1,1,1,1,20,45,5,20,200,200,2000,0x0,0x0,0x8004a,1,0,0,0x1,1," [ctp_cmd@gluon_50 ~ 62]> cmd port se-0/0 qry all | fgrep "Port Config Flags" Port Config Flags: YCableRdnt YCableFast YCableMstr [ctp_cmd@gluon_50 ~ 63]>
Where 0x8004a is the flag field value.