Friday, October 30, 2015

REG

which bit we want to set select that in binary mode
convert it to hex
add to the existing value



original : 0x10002
mod : 0x1000a
 cxgbtool eth0 reg 0x7d8c=0x1000a

[root@t6fpga5 ~]# reg6.py -f TP_ERR_CONFIG
[0x07d8c] TP_ERR_CONFIG                                 0x0001000a [     65546]
  [31:31]   TnlErrorFPMA                                0x0        [         0]
  [30:30]   TnlErrorPing                                0x0        [         0]
  [29:29]   TnlErrorCsum                                0x0        [         0]
  [28:28]   TnlErrorCsumIP                              0x0        [         0]
  [27:27]   TnlErrorOpaque                              0x0        [         0]
  [26:26]   TnlErrorIp6Opt                              0x0        [         0]
  [25:25]   TnlErrorTcpOpt                              0x0        [         0]
  [24:24]   TnlErrorPktLen                              0x0        [         0]
  [23:23]   TnlErrorTcpHdrLen                           0x0        [         0]
  [22:22]   TnlErrorIpHdrLen                            0x0        [         0]
  [21:21]   TnlErrorEthHdrLen                           0x0        [         0]
  [20:20]   TnlErrorAttack                              0x0        [         0]
  [19:19]   TnlErrorFrag                                0x0        [         0]
  [18:18]   TnlErrorIpVer                               0x0        [         0]
  [17:17]   TnlErrorMac                                 0x0        [         0]
  [16:16]   TnlErrorAny                                 0x1        [         1]
  [15:15]   DropErrorFPMA                               0x0        [         0]
  [14:14]   DropErrorPing                               0x0        [         0]
  [13:13]   DropErrorCsum                               0x0        [         0]
  [12:12]   DropErrorCsumIP                             0x0        [         0]
  [11:11]   DropErrorOpaque                             0x0        [         0]
  [10:10]   DropErrorIp6Opt                             0x0        [         0]
  [ 9: 9]   DropErrorTcpOpt                             0x0        [         0]
  [ 8: 8]   DropErrorPktLen                             0x0        [         0]
  [ 7: 7]   DropErrorTcpHdrLen                          0x0        [         0]
  [ 6: 6]   DropErrorIpHdrLen                           0x0        [         0]
  [ 5: 5]   DropErrorEthHdrLen                          0x0        [         0]
  [ 4: 4]   DropErrorAttack                             0x0        [         0]
  [ 3: 3]   DropErrorFrag                               0x1        [         1]
  [ 2: 2]   DropErrorIpVer                              0x0        [         0]
  [ 1: 1]   DropErrorMac                                0x1        [         1]
  [ 0: 0]   DropErrorAny                                0x0        [         0]


[root@t6fpga5 ~]# reg6.py -f TP_ERR_CONFIG[DropErrorFrag]=0
0x10002 [65538]

[root@t6fpga5 ~]# reg6.py -f TP_ERR_CONFIG[DropErrorFrag]=1
0x1000a [65546]


working
=======

[root@t6fpga5 t5tools]# reg6.py -f TP_ERR_CONFIG[DropErrorFrag]=1
0x1000a [65546]
[root@t6fpga5 t5tools]# reg6.py tp_eside_config[FragmentDrop]=1
0x2086666 [34104934]


No comments: