aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
diff options
context:
space:
mode:
authorKejian Yan <yankejian@huawei.com>2016-11-09 18:13:47 +0000
committerDavid S. Miller <davem@davemloft.net>2016-11-10 11:45:37 -0500
commit1f5fa2dd1cfa4c1356e83ff4bdd82561cad95278 (patch)
treebb9c20adb0912550ad89ed206740f64c3c7c9302 /drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
parentnet: hns: add fuzzy match of tcam table for hns (diff)
downloadlinux-dev-1f5fa2dd1cfa4c1356e83ff4bdd82561cad95278.tar.xz
linux-dev-1f5fa2dd1cfa4c1356e83ff4bdd82561cad95278.zip
net: hns: fix for promisc mode in HNS driver
If set promisc mode when there is some traffic, The service nic will cause system halted. We reserve the last 6 tcam entry for the 6 ports. If promisc mode is enabled, we can config the relative tcam as fuzzy matching and set to be valid, or set the tcam to be invalid Signed-off-by: Kejian Yan <yankejian@huawei.com> Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
index 6826b28875df..3eb8b4d6330f 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
@@ -41,6 +41,9 @@
#define DSAF_SW_PORT_NUM 8
#define DSAF_TOTAL_QUEUE_NUM 129
+/* reserved a tcam entry for each port to support promisc by fuzzy match */
+#define DSAFV2_MAC_FUZZY_TCAM_NUM DSAF_MAX_PORT_NUM
+
#define DSAF_TCAM_SUM 512
#define DSAF_LINE_SUM (2048 * 14)