diff options
author | Roman Yeryomin <roman@advem.lv> | 2012-09-13 00:40:35 +0300 |
---|---|---|
committer | Roman Yeryomin <roman@advem.lv> | 2013-05-26 00:44:46 +0300 |
commit | a27354c9021a8423ef8c7d2bffad49cbf639eec1 (patch) | |
tree | 2355929a4b8cf1888cd0797cfabdb42e0077c524 /target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h | |
parent | 24a776baeb5d3cd903b144c89ceb11c5bc36a49e (diff) |
Add realtek target files
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h')
-rw-r--r-- | target/linux/realtek/files/include/net/rtl/fastpath/fast_br.h | 41 |
1 files changed, 41 insertions, 0 deletions
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 <linux/netdevice.h>
+
+#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
+
|