config  RA_HW_NAT
        tristate "Ralink HW NAT"
	depends on RA_NAT_HW

choice
        prompt "Binding Method"
	depends on RA_HW_NAT
	default RA_HW_NAT_AUTO_BIND

config  RA_HW_NAT_AUTO_BIND
        bool "Auto"
	depends on RA_HW_NAT
	help
	Let HNAT module judge which flow should be accelerated by hardware.

#config  RA_HW_NAT_SEMIAUTO_BIND
#        bool "Semi-Auto (TestOnly)"
#	depends on RA_HW_NAT
#	help
#	you have to judge which flow need to be accelerated by hardware.

config  RA_HW_NAT_MANUAL_BIND
        bool "Manual"
	depends on RA_HW_NAT
	help
	FoE table are totally controlled by you.

endchoice

choice
        prompt "Direction"
	depends on RA_HW_NAT && !RA_HW_NAT_MANUAL_BIND
	default RA_HW_NAT_SPEEDUP_BIDIRECTION

config  RA_HW_NAT_SPEEDUP_UPSTREAM
        bool "Upstream Only"
	help
	only speed up upstream flow

config  RA_HW_NAT_SPEEDUP_DOWNSTREAM
        bool "Downstream Only"
	help
	only speed up downstream flow

config  RA_HW_NAT_SPEEDUP_BIDIRECTION
        bool "Bi-direction"
	help
	Speed up bi-direction

endchoice


config  RA_HW_NAT_LAN_VLANID
        int "VLAN ID of LAN Ports"
	depends on RA_HW_NAT && !RA_HW_NAT_MANUAL_BIND
	default 1
	help
	please choose any one of your LAN side VLAN IDs if you use different VLAN ID for each LAN port

config  RA_HW_NAT_WAN_VLANID
        int "VLAN ID of WAN Ports"
	depends on RA_HW_NAT && !RA_HW_NAT_MANUAL_BIND
	default 2
	help
	please choose any one of your WAN side VLAN IDs if you use different VLAN ID for each WAN port

config  RA_HW_NAT_BINDING_THRESHOLD
        int "Binding Threshold (Unit:Packet Per Second)"
	depends on RA_HW_NAT
	default 30
	help
	When flow rate > Binding Threshold  (# Packets Per Second),
	the state will change to bind state

config  RA_HW_NAT_QURT_LMT
        int "Max entries allowed build when Free Entries>3/4 (MUST <16384)"
	depends on RA_HW_NAT
	default 100
	help
	Free entries > 3/4

config  RA_HW_NAT_HALF_LMT
        int "Max entries allowed build when Free Entries>1/2 (MUST <16384)"
	depends on RA_HW_NAT
	default 50
	help
	1/2 < Free entries < 3/4


config  RA_HW_NAT_FULL_LMT
        int "Max entries allowed build when Free Entries<1/2 (MUST <16384)"
	depends on RA_HW_NAT
	default 25
	help
	Free entries < 1/2

choice
        prompt "Foe Table Size"
	depends on RA_HW_NAT
	default RA_HW_NAT_TBL_4K
	help
	Number of entries in FoE Table

config  RA_HW_NAT_TBL_1K
        bool "1K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_2K
        bool "2K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_4K
        bool "4K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_8K
        bool "8K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_16K
        bool "16K"
	depends on RA_HW_NAT
	
endchoice


choice
	prompt "Hash Algorithm"
	depends on RA_HW_NAT
	default RA_HW_NAT_HASH1
	
config  RA_HW_NAT_HASH0
        bool "Hash0-Simple"
	depends on RA_HW_NAT

config  RA_HW_NAT_HASH1
        bool "Hash1-Complex"
	depends on RA_HW_NAT

endchoice


config  RA_HW_NAT_PRE_ACL_SIZE
        int "Pre ACL Table Size"
	depends on RA_HW_NAT
	default 383
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_PRE_MTR_SIZE
        int "Pre Meter Table Size"
	depends on RA_HW_NAT
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_PRE_AC_SIZE
        int "Pre AC Table Size"
	depends on RA_HW_NAT
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_POST_MTR_SIZE
        int "Post Meter Table Size"
	depends on RA_HW_NAT
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_POST_AC_SIZE
        int "Post AC Table Size"
	depends on RA_HW_NAT
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512


config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:1Sec)"
	depends on RA_HW_NAT_TBL_1K
	default 5
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:1Sec)"
	depends on RA_HW_NAT_TBL_1K
	default 5
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:2Sec)"
	depends on RA_HW_NAT_TBL_2K
	default 3
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.



config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:2Sec)"
	depends on RA_HW_NAT_TBL_2K
	default 3
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:4Sec)"
	depends on RA_HW_NAT_TBL_4K
	default 1
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.



config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:4Sec)"
	depends on RA_HW_NAT_TBL_4K
	default 1
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:8Sec)"
	depends on RA_HW_NAT_TBL_8K
	default 1
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:8Sec)"
	depends on RA_HW_NAT_TBL_8K
	default 1
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:16Sec)"
	depends on RA_HW_NAT_TBL_16K
	default 1
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:16Sec)"
	depends on RA_HW_NAT_TBL_16K
	default 1
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_ACL_DLTA
        int "Life time of ACL link to FOE entry(Unit:1Sec)"
	depends on RA_HW_NAT
	default 3
	help
	Set ageout time for ACL link to FoE entry 

config  RA_HW_NAT_UNB_DLTA
        int "Life time of Unbind entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 3
	help
	set ageout time for bind Unbind entry

config  RA_HW_NAT_UNB_MNP
        int "Min threshold for unbind state(Pkt count)"
	depends on RA_HW_NAT
	default 1000
	help
	An unbind flow whose pkt counts < Min threshold and idle time > Life time 
	=> This unbind entry would be aged out
	[Notes: Idle time = current time - last packet receive time]

config  RA_HW_NAT_UDP_DLTA
        int "Life time of Bind UDP entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 5
	help
	Set ageout time for bind UDP entry

config  RA_HW_NAT_TCP_DLTA
        int "Life time of Bind TCP entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 5
	help
	Set ageout time for bind TCP entry

config  RA_HW_NAT_FIN_DLTA
        int "Life time of Bind FIN entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 5
	help
	Set ageout time for FIN entry
	
config  RA_HW_NAT_IPV6
        bool "IPv6 Routing"
	depends on RA_HW_NAT && !(RALINK_RT2880 || RALINK_RT3052)
	default n
	help
	"ipv6 routing accelerated by HNAT"

choice
        prompt "Marker Rule"
	depends on RA_HW_NAT
	default RA_HW_NAT_NONE2UP

config  RA_HW_NAT_ACL2UP_HELPER
        bool "Acl Remark Helper"
	depends on RA_HW_NAT
	help
	"use FoE UP to remark VPRI value"

config  RA_HW_NAT_DSCP2UP_HELPER
        bool "DSCP Remark Helper"
	depends on RA_HW_NAT
	help
	"use FoE UP to remark DSCP value"

config  RA_HW_NAT_NONE2UP
	bool "No Remark Helper"

endchoice
