diff options
| author | Ganesh Goudar <ganeshgr@chelsio.com> | 2017-12-28 00:59:52 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-12-28 11:59:57 -0500 |
| commit | b9525301b117ba48d20aafcc9c5cf9d7a9cac00f (patch) | |
| tree | 1684d129054a0fac14032c8688de8c93402696d0 | |
| parent | 836df24a7062719002f4246019b44cc2c5184830 (diff) | |
cxgb4: display VNI correctly
Fix incorrect VNI display in mps_tcam
Signed-off-by: Santosh Rastapur <santosh@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c index d3ced0438474..4ea76c1411dc 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | |||
| @@ -1743,7 +1743,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v) | |||
| 1743 | */ | 1743 | */ |
| 1744 | if (lookup_type && (lookup_type != DATALKPTYPE_M)) { | 1744 | if (lookup_type && (lookup_type != DATALKPTYPE_M)) { |
| 1745 | /* Inner header VNI */ | 1745 | /* Inner header VNI */ |
| 1746 | vniy = ((data2 & DATAVIDH2_F) << 23) | | 1746 | vniy = (data2 & DATAVIDH2_F) | |
| 1747 | (DATAVIDH1_G(data2) << 16) | VIDL_G(val); | 1747 | (DATAVIDH1_G(data2) << 16) | VIDL_G(val); |
| 1748 | dip_hit = data2 & DATADIPHIT_F; | 1748 | dip_hit = data2 & DATADIPHIT_F; |
| 1749 | } else { | 1749 | } else { |
| @@ -1753,6 +1753,7 @@ static int mps_tcam_show(struct seq_file *seq, void *v) | |||
| 1753 | port_num = DATAPORTNUM_G(data2); | 1753 | port_num = DATAPORTNUM_G(data2); |
| 1754 | 1754 | ||
| 1755 | /* Read tcamx. Change the control param */ | 1755 | /* Read tcamx. Change the control param */ |
| 1756 | vnix = 0; | ||
| 1756 | ctl |= CTLXYBITSEL_V(1); | 1757 | ctl |= CTLXYBITSEL_V(1); |
| 1757 | t4_write_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A, ctl); | 1758 | t4_write_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A, ctl); |
| 1758 | val = t4_read_reg(adap, MPS_CLS_TCAM_DATA1_A); | 1759 | 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 | data2 = t4_read_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A); | 1762 | data2 = t4_read_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A); |
| 1762 | if (lookup_type && (lookup_type != DATALKPTYPE_M)) { | 1763 | if (lookup_type && (lookup_type != DATALKPTYPE_M)) { |
| 1763 | /* Inner header VNI mask */ | 1764 | /* Inner header VNI mask */ |
| 1764 | vnix = ((data2 & DATAVIDH2_F) << 23) | | 1765 | vnix = (data2 & DATAVIDH2_F) | |
| 1765 | (DATAVIDH1_G(data2) << 16) | VIDL_G(val); | 1766 | (DATAVIDH1_G(data2) << 16) | VIDL_G(val); |
| 1766 | } | 1767 | } |
| 1767 | } else { | 1768 | } else { |
| @@ -1834,7 +1835,8 @@ static int mps_tcam_show(struct seq_file *seq, void *v) | |||
| 1834 | addr[1], addr[2], addr[3], | 1835 | addr[1], addr[2], addr[3], |
| 1835 | addr[4], addr[5], | 1836 | addr[4], addr[5], |
| 1836 | (unsigned long long)mask, | 1837 | (unsigned long long)mask, |
| 1837 | vniy, vnix, dip_hit ? 'Y' : 'N', | 1838 | vniy, (vnix | vniy), |
| 1839 | dip_hit ? 'Y' : 'N', | ||
| 1838 | port_num, | 1840 | port_num, |
| 1839 | (cls_lo & T6_SRAM_VLD_F) ? 'Y' : 'N', | 1841 | (cls_lo & T6_SRAM_VLD_F) ? 'Y' : 'N', |
| 1840 | PORTMAP_G(cls_hi), | 1842 | PORTMAP_G(cls_hi), |
