[][kernel][common][hnat][Add PPE hash debug mode switch function to HNAT debugfs]

[Description]
Add PPE hash debug mode switch function to HNAT debugfs.

Due to the testing requirement of customers to make huge amount
of entry to BIND state, to avoid the hash collision in normal
hash algorithm, customer can modify the packet IP or TCP/UDP port
in test center, and switch the the hash debug mode to meet their need.

After the switch function was called, the current PPE table would
be cleared.

with various hash debug mode, PPE would use following values as hash index
0: normal mode, use 5-tuple do the calculation
1: Source port[15:0]
2: IPv4 source IP[15:0]
3: IPv6 source IP[15:0]
4: Destination port[15:0]
5: IPv4 destination IP[15:0]
6: IPv6 destination IP[15:0]

Usage example to switch the hash debug mode:
echo 8 $dbg_mode > hnat_setting

[Release-log]
N/A


Change-Id: I2d6adec5b6c40487d1a6d4494abbce267b5fad80
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8860378
3 files changed