From 5deb3317cb51ac52de922bb55f8492624018906d Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Thu, 13 Sep 2012 00:40:35 +0300 Subject: Add realtek target files Signed-off-by: Roman Yeryomin --- .../files/include/net/rtl/fastpath/fast_br.h | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h (limited to 'target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h') diff --git a/target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h b/target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h new file mode 100644 index 000000000..c49472c2b --- /dev/null +++ b/target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h @@ -0,0 +1,41 @@ +#ifndef FAST_BR_H +#define FAST_BR_H + +#include + +#define RTL_FAST_BR_HEAD_SIZE 1 +#define RTL_FAST_BR_HASH_SIZE 4 +#define RTL_FAST_BR_ENTRY_NUM 16 +#define RTL_FAST_BR_SALT 3 +#define RTL_FAST_BR_ENTRY_TIME_OUT 180*HZ + +#define RTL_FAST_BR_SUCCESS 0 +#define RTL_FAST_BR_FAILED -1 +#define RTL_FAST_BR_ENTRY_EXPIRED 1 +#define RTL_FAST_BR_ENTRY_NOT_EXPIRED 0 + +#define ERR_RTL_FAST_BR_ENTRY_EXIST -1000 +#define ERR_RTL_FAST_BR_ENTRY_NOT_EXIST -1001 +#define ERR_RTL_FAST_BR_NO_BUFFER -1002 + + + +typedef struct _fast_br_head +{ + struct hlist_head fast_br_hash[RTL_FAST_BR_HASH_SIZE]; + +}fast_br_head; + +typedef struct _fast_br_cache_entry +{ + struct hlist_node hlist; + struct net_device *to_dev; + unsigned long ageing_timer; + unsigned char mac_addr[6]; + unsigned int valid; +}fast_br_cache_entry; + +int rtl_add_fast_br_entry(fast_br_cache_entry *entry); +int rtl_fast_br_forwarding(struct sk_buff *skb); +#endif + -- cgit v1.2.3