Commit b9525301 authored by Ganesh Goudar's avatar Ganesh Goudar Committed by David S. Miller

cxgb4: display VNI correctly

Fix incorrect VNI display in mps_tcam
Signed-off-by: default avatarSantosh Rastapur <santosh@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 836df24a
...@@ -1743,7 +1743,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v) ...@@ -1743,7 +1743,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v)
*/ */
if (lookup_type && (lookup_type != DATALKPTYPE_M)) { if (lookup_type && (lookup_type != DATALKPTYPE_M)) {
/* Inner header VNI */ /* Inner header VNI */
vniy = ((data2 & DATAVIDH2_F) << 23) | vniy = (data2 & DATAVIDH2_F) |
(DATAVIDH1_G(data2) << 16) | VIDL_G(val); (DATAVIDH1_G(data2) << 16) | VIDL_G(val);
dip_hit = data2 & DATADIPHIT_F; dip_hit = data2 & DATADIPHIT_F;
} else { } else {
...@@ -1753,6 +1753,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v) ...@@ -1753,6 +1753,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v)
port_num = DATAPORTNUM_G(data2); port_num = DATAPORTNUM_G(data2);
/* Read tcamx. Change the control param */ /* Read tcamx. Change the control param */
vnix = 0;
ctl |= CTLXYBITSEL_V(1); ctl |= CTLXYBITSEL_V(1);
t4_write_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A, ctl); t4_write_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A, ctl);
val = t4_read_reg(adap, MPS_CLS_TCAM_DATA1_A); val = t4_read_reg(adap, MPS_CLS_TCAM_DATA1_A);
...@@ -1761,7 +1762,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v) ...@@ -1761,7 +1762,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v)
data2 = t4_read_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A); data2 = t4_read_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A);
if (lookup_type && (lookup_type != DATALKPTYPE_M)) { if (lookup_type && (lookup_type != DATALKPTYPE_M)) {
/* Inner header VNI mask */ /* Inner header VNI mask */
vnix = ((data2 & DATAVIDH2_F) << 23) | vnix = (data2 & DATAVIDH2_F) |
(DATAVIDH1_G(data2) << 16) | VIDL_G(val); (DATAVIDH1_G(data2) << 16) | VIDL_G(val);
} }
} else { } else {
...@@ -1834,7 +1835,8 @@ static int mps_tcam_show(struct seq_file *seq, void *v) ...@@ -1834,7 +1835,8 @@ static int mps_tcam_show(struct seq_file *seq, void *v)
addr[1], addr[2], addr[3], addr[1], addr[2], addr[3],
addr[4], addr[5], addr[4], addr[5],
(unsigned long long)mask, (unsigned long long)mask,
vniy, vnix, dip_hit ? 'Y' : 'N', vniy, (vnix | vniy),
dip_hit ? 'Y' : 'N',
port_num, port_num,
(cls_lo & T6_SRAM_VLD_F) ? 'Y' : 'N', (cls_lo & T6_SRAM_VLD_F) ? 'Y' : 'N',
PORTMAP_G(cls_hi), PORTMAP_G(cls_hi),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment