dde_linux: make drivers self containing

Ported drivers list and extract all needed source files. This decouples
ports according to contrib sources and also enables us to revert lxip to
Linux version 3.9, while staying with 3.14 for usb.

Fixes #1285
This commit is contained in:
Sebastian Sumpf
2014-10-29 18:52:47 +01:00
committed by Christian Helmuth
parent 2eca4ec98b
commit d426c5e6c2
29 changed files with 877 additions and 1484 deletions

View File

@ -50,7 +50,6 @@ enum {
DUMMY_RET(0, in_irq)
DUMMY_RET(0, inet_twsk_alloc)
DUMMY_RET(0, ipv6_only_sock)
DUMMY_RET(0, is_vmalloc_addr)
DUMMY_RET(0, netpoll_receive_skb)
DUMMY_RET(0, netpoll_rx_disable)
DUMMY_RET(1, nf_hook)
@ -83,7 +82,6 @@ DUMMY_RET(0, xfrm_decode_session_reverse)
*/
DUMMY_SKIP( 0, ASSERT_RTNL)
DUMMY_SKIP(-1, debug_check_no_locks_freed)
DUMMY_SKIP(-1, kmemcheck_annotate_variable)
DUMMY_SKIP(-1, local_bh_disable)
DUMMY_SKIP(-1, local_bh_enable)
DUMMY_SKIP(-1, local_irq_disable)
@ -92,21 +90,22 @@ DUMMY_SKIP(-1, local_irq_restore)
DUMMY_SKIP(-1, local_irq_save)
DUMMY_SKIP(-1, lockdep_init_map)
DUMMY_SKIP(-1, lockdep_set_class_and_name)
DUMMY_SKIP(-1, kmemcheck_annotate_variable)
DUMMY_SKIP(-1, might_sleep)
DUMMY_SKIP(-1, mutex_acquire)
DUMMY_SKIP(-1, mutex_init)
DUMMY_SKIP(-1, mutex_lock)
DUMMY_SKIP(-1, mutex_release)
DUMMY_SKIP(-1, mutex_unlock)
DUMMY_SKIP(-1, prefetchw)
DUMMY_SKIP(-1, mutex_lock)
DUMMY_SKIP(-1, rcu_read_lock)
DUMMY_SKIP(-1, rcu_read_lock_bh)
DUMMY_SKIP(-1, rcu_read_unlock)
DUMMY_SKIP(-1, rcu_read_lock_bh)
DUMMY_SKIP(-1, rcu_read_unlock_bh)
DUMMY_SKIP(-1, read_lock)
DUMMY_SKIP(-1, read_lock_bh)
DUMMY_SKIP(-1, read_seqbegin)
DUMMY_SKIP(-1, read_unlock)
DUMMY_SKIP(-1, read_lock_bh)
DUMMY_SKIP(-1, read_unlock_bh)
DUMMY_SKIP(-1, rwlock_init)
DUMMY_SKIP(-1, seqlock_init)
@ -117,23 +116,10 @@ DUMMY_SKIP(-1, spin_lock_irqsave)
DUMMY_SKIP( 1, spin_trylock)
DUMMY_SKIP(-1, spin_unlock_irqrestore)
DUMMY_SKIP(-1, synchronize_rcu)
DUMMY_SKIP(-1, trace_consume_skb)
DUMMY_SKIP(-1, trace_kfree_skb)
DUMMY_SKIP(-1, trace_napi_gro_frags_entry)
DUMMY_SKIP(-1, trace_napi_gro_receive_entry)
DUMMY_SKIP(-1, trace_napi_poll)
DUMMY_SKIP(-1, trace_net_dev_queue)
DUMMY_SKIP(-1, trace_net_dev_start_xmit)
DUMMY_SKIP(-1, trace_consume_skb)
DUMMY_SKIP(-1, trace_net_dev_xmit)
DUMMY_SKIP(-1, trace_netif_receive_skb)
DUMMY_SKIP(-1, trace_netif_receive_skb_entry)
DUMMY_SKIP(-1, trace_netif_rx)
DUMMY_SKIP(-1, trace_netif_rx_entry)
DUMMY_SKIP(-1, trace_netif_rx_ni_entry)
DUMMY_SKIP(-1, trace_skb_copy_datagram_iovec)
DUMMY_SKIP(-1, trace_sock_exceed_buf_limit)
DUMMY_SKIP(-1, trace_sock_rcvqueue_full)
DUMMY_SKIP(-1, trace_udp_fail_queue_rcv_skb)
DUMMY_SKIP(-1, write_lock)
DUMMY_SKIP(-1, write_lock_bh)
DUMMY_SKIP(-1, write_lock_irq)
@ -186,21 +172,18 @@ DUMMY(-1, audit_get_sessionid)
DUMMY(-1, audit_log)
DUMMY(-1, autoremove_wake_function)
DUMMY(-1, blocking_notifier_chain_unregister)
DUMMY(-1, bpf_tell_extensions)
DUMMY(-1, call_netevent_notifiers)
DUMMY(-1, cancel_delayed_work)
DUMMY(-1, cancel_delayed_work_sync)
DUMMY(-1, capable)
DUMMY(-1, cipso_v4_validate)
DUMMY(-1, clamp)
DUMMY(-1, __clear_bit)
DUMMY(-1, clamp)
DUMMY(-1, clear_bit)
DUMMY(-1, cond_resched)
DUMMY(-1, cond_resched_softirq)
DUMMY(-1, __copy_from_user_nocache)
DUMMY(-1, csum_block_add_ext)
DUMMY(-1, csum_block_sub)
DUMMY(-1, csum_ipv6_magic)
DUMMY(-1, csum_replace2)
DUMMY(-1, csum_sub)
DUMMY(-1, csum_unfold)
@ -226,7 +209,6 @@ DUMMY(-1, file_inode)
DUMMY(-1, finish_wait)
DUMMY(-1, __fls)
DUMMY(-1, fls64)
DUMMY(-1, fnhe_genid)
DUMMY(-1, free_pages)
DUMMY(-1, from_kgid)
DUMMY(-1, from_kgid_munged)
@ -246,7 +228,6 @@ DUMMY(-1, getnstimeofday)
DUMMY(-1, get_nulls_value)
DUMMY(-1, get_options)
DUMMY(-1, get_page)
DUMMY(-1, get_user_pages_fast)
DUMMY(-1, gfp_pfmemalloc_allowed)
DUMMY(-1, gid_lte)
DUMMY(-1, hash32_ptr)
@ -258,8 +239,6 @@ DUMMY(-1, hlist_nulls_empty)
DUMMY(-1, hotcpu_notifier)
DUMMY(-1, hweight32)
DUMMY(-1, hweight64)
DUMMY(-1, icmp6_hdr)
DUMMY(-1, inet6_sk)
DUMMY(-1, inet_ctl_sock_destroy)
DUMMY(-1, inet_diag_dump_icsk)
DUMMY(-1, inet_diag_dump_one_icsk)
@ -273,7 +252,6 @@ DUMMY(-1, inet_twdr_twcal_tick)
DUMMY(-1, inet_twdr_twkill_work)
DUMMY(-1, inet_twsk_bind_unhash)
DUMMY(-1, inet_twsk_deschedule)
DUMMY(-1, inet_twsk_free)
DUMMY(-1, __inet_twsk_hashdance)
DUMMY(-1, inet_twsk_purge)
DUMMY(-1, inet_twsk_put)
@ -286,7 +264,6 @@ DUMMY(-1, init_user_ns)
DUMMY(-1, init_waitqueue_head)
DUMMY(-1, INIT_WORK)
DUMMY(-1, in_softirq)
DUMMY(-1, iov_length)
DUMMY(-1, ip4_datagram_connect)
DUMMY(-1, ip4_datagram_release_cb)
DUMMY(-1, ip_check_mc_rcu)
@ -308,8 +285,6 @@ DUMMY(-1, ip_mroute_setsockopt)
DUMMY(-1, ipv4_is_lbcast)
DUMMY(-1, ipv4_is_local_multicast)
DUMMY(-1, ipv4_is_zeronet)
DUMMY(-1, ipv6_hdr)
DUMMY(-1, ipv6_sk_rxinfo)
DUMMY(-1, irqs_disabled)
DUMMY(-1, is_a_nulls)
DUMMY(-1, is_multicast_ether_addr)
@ -342,11 +317,8 @@ DUMMY(-1, list_del_rcu)
DUMMY(-1, list_replace_rcu)
DUMMY(-1, local_softirq_pending)
DUMMY(-1, lockdep_rtnl_is_held)
DUMMY(-1, macvlan_dev_real_dev)
DUMMY(-1, memcpy_fromiovec)
DUMMY(-1, min)
DUMMY(-1, mod_delayed_work)
DUMMY(-1, __module_get)
DUMMY(-1, module_put)
DUMMY(-1, move_addr_to_kernel)
DUMMY(-1, mq_qdisc_ops)
@ -374,7 +346,6 @@ DUMMY(-1, nla_reserve)
DUMMY(-1, nla_strcmp)
DUMMY(-1, nla_strlcpy)
DUMMY(-1, nla_validate)
DUMMY(-1, nosteal_pipe_buf_ops)
DUMMY(-1, notifier_from_errno)
DUMMY(-1, ns_capable)
DUMMY(-1, num_online_cpus)
@ -384,33 +355,33 @@ DUMMY(-1, PageHighMem)
DUMMY(-1, percpu_counter_destroy)
DUMMY(-1, percpu_counter_sum_positive)
DUMMY(-1, pid_vnr)
DUMMY(-1, prandom_seed)
DUMMY(-1, prandom_u32)
DUMMY(-1, pr_crit)
DUMMY(-1, pr_err_once)
DUMMY(-1, preempt_disable)
DUMMY(-1, preempt_enable)
DUMMY(-1, prefetch)
DUMMY(-1, pr_emerg)
DUMMY(-1, prepare_to_wait)
DUMMY(-1, prepare_to_wait_exclusive)
DUMMY(-1, pr_err)
DUMMY(-1, pr_info)
DUMMY(-1, pr_info_once)
DUMMY(-1, pr_warn)
DUMMY(-1, put_cmsg)
DUMMY(-1, put_cpu)
DUMMY(-1, put_cpu_var)
DUMMY(-1, put_cred)
DUMMY(-1, put_device)
DUMMY(-1, put_group_info)
DUMMY(-1, put_pid)
DUMMY(-1, put_unaligned_be32)
DUMMY(-1, queue_delayed_work)
DUMMY(-1, __raise_softirq_irqoff)
DUMMY(-1, raise_softirq_irqoff)
DUMMY(-1, random32)
DUMMY(-1, ___ratelimit)
DUMMY(-1, raw_notifier_chain_unregister)
DUMMY(-1, raw_seqcount_begin)
DUMMY(-1, rcu_barrier)
DUMMY(-1, read_seqcount_retry)
DUMMY(-1, register_gifconf)
DUMMY(-1, release_net)
DUMMY(-1, release_pages)
DUMMY(-1, remove_proc_entry)
DUMMY(-1, remove_wait_queue)
DUMMY(-1, request_module)
@ -419,8 +390,6 @@ DUMMY(-1, round_jiffies_relative)
DUMMY(-1, round_jiffies_up)
DUMMY(-1, roundup_pow_of_two)
DUMMY(-1, rt_genid_bump)
DUMMY(-1, rt_genid_bump_ipv4)
DUMMY(-1, rt_genid_ipv4)
DUMMY(-1, rtnetlink_init)
DUMMY(-1, __rtnl_unlock)
DUMMY(-1, schedule)
@ -448,8 +417,8 @@ DUMMY(-1, security_sk_free)
DUMMY(-1, security_socket_getpeersec_dgram)
DUMMY(-1, security_socket_getpeersec_stream)
DUMMY(-1, security_sock_graft)
DUMMY(-1, send_sig)
DUMMY(-1, send_sigurg)
DUMMY(-1, send_sig)
DUMMY(-1, __set_bit)
DUMMY(-1, set_bit)
DUMMY(-1, __set_current_state)
@ -462,14 +431,10 @@ DUMMY(-1, sha_transform)
DUMMY(-1, si_meminfo)
DUMMY(-1, S_ISSOCK)
DUMMY(-1, sk_attach_filter)
DUMMY(-1, sk_busy_loop)
DUMMY(-1, sk_can_busy_loop)
DUMMY(-1, sk_detach_filter)
DUMMY(-1, sk_filter_len)
DUMMY(-1, sk_filter_release_rcu)
DUMMY(-1, sk_filter_size)
DUMMY(-1, sk_get_filter)
DUMMY(-1, sk_mark_napi_id)
DUMMY(-1, smp_mb__after_clear_bit)
DUMMY(-1, smp_mb__before_atomic_dec)
DUMMY(-1, __sock_recv_timestamp)
@ -486,15 +451,11 @@ DUMMY(-1, ssleep)
DUMMY(-1, static_key_enabled)
DUMMY(-1, static_key_slow_dec)
DUMMY(-1, static_key_slow_inc)
DUMMY(-1, static_key_true)
DUMMY(-1, strcat)
DUMMY(-1, strncpy_from_user)
DUMMY(-1, synchronize_rcu_expedited)
DUMMY(-1, sysctl_igmp_max_msf)
DUMMY(-1, sysctl_tcp_fastopen)
DUMMY(-1, sysfs_create_link)
DUMMY(-1, sysfs_remove_link)
DUMMY(-1, system_power_efficient_wq)
DUMMY(-1, system_wq)
DUMMY(-1, tasklet_init)
DUMMY(-1, tasklet_schedule)
@ -511,29 +472,31 @@ DUMMY(-1, tcp_peer_is_proven)
DUMMY(-1, tcp_remember_stamp)
DUMMY(-1, tcp_tw_remember_stamp)
DUMMY(-1, tcp_update_metrics)
DUMMY(-1, tcpv4_offload_init)
DUMMY(-1, test_and_clear_bit)
DUMMY(-1, test_and_set_bit)
DUMMY(-1, test_bit)
DUMMY(-1, textsearch_find)
DUMMY(-1, __this_cpu_read)
DUMMY(-1, trace_napi_poll)
DUMMY(-1, trace_net_dev_queue)
DUMMY(-1, trace_netif_rx)
DUMMY(-1, trace_skb_copy_datagram_iovec)
DUMMY(-1, trace_sock_exceed_buf_limit)
DUMMY(-1, trace_sock_rcvqueue_full)
DUMMY(-1, trace_udp_fail_queue_rcv_skb)
DUMMY(-1, try_module_get)
DUMMY(-1, tsk_restore_flags)
DUMMY(-1, u64_stats_fetch_begin_bh)
DUMMY(-1, u64_stats_fetch_retry_bh)
DUMMY(-1, u64_stats_init)
DUMMY(-1, u64_stats_update_begin)
DUMMY(-1, u64_stats_update_end)
DUMMY(-1, udplite4_register)
DUMMY(-1, udpv4_offload_init)
DUMMY(-1, uid_eq)
DUMMY(-1, vfree)
DUMMY(-1, virt_to_page)
DUMMY(-1, vlan_do_receive)
DUMMY(-1, vlan_hw_offload_capable)
DUMMY(-1, __vlan_put_tag)
DUMMY(-1, vlan_untag)
DUMMY(-1, vmalloc)
DUMMY(-1, vzalloc)
DUMMY(-1, wake_up_interruptible)
DUMMY(-1, wake_up_interruptible_all)
@ -542,7 +505,6 @@ DUMMY(-1, wake_up_interruptible_sync_poll)
DUMMY(-1, WARN_ONCE)
DUMMY(-1, write_seqcount_begin)
DUMMY(-1, write_seqcount_end)
DUMMY(-1, __xchg)
DUMMY(-1, xchg)
DUMMY(-1, xfrm4_policy_check_reverse)
DUMMY(-1, xfrm4_route_forward)
@ -550,5 +512,6 @@ DUMMY(-1, xfrm4_udp_encap_rcv)
DUMMY(-1, xfrm_sk_free_policy)
DUMMY(-1, xfrm_user_policy)
DUMMY(-1, yield)
DUMMY(-1, __xchg)
} /* extern "C" */

View File

@ -26,7 +26,7 @@ extern "C" {
#include <dde_kit/printf.h>
#include <dde_kit/types.h>
#define DEBUG_PRINTK 0
#define DEBUG_PRINTK 1
#define DEBUG_SLAB 0
#define DEBUG_TIMER 0
#define DEBUG_CONG 0
@ -210,7 +210,6 @@ struct module;
#define module_init(fn) void module_##fn(void) { fn(); }
#define module_exit(fn) void module_exit_##fn(void) { fn(); }
void __module_get(struct module *);
void module_put(struct module *);
int try_module_get(struct module *);
@ -288,7 +287,6 @@ typedef __u8 u_int8_t;
typedef int16_t __s16;
typedef int32_t __s32;
typedef int64_t __s64;
typedef __u16 __le16;
typedef __u32 __le32;
@ -336,13 +334,13 @@ struct hlist_node {
};
#ifndef __cplusplus
typedef int bool;
typedef _Bool bool;
enum { true = 1, false = 0 };
#endif /* __cplusplus */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#define NULL nullptr
#else
#define NULL ((void *)0)
#endif /* __cplusplus */
@ -498,14 +496,6 @@ static inline int printk(const char *fmt, ...)
u32 hash_32(u32 val, unsigned int);
u32 hash32_ptr(const void *);
/**********************
** linux/hashtable.h *
**********************/
#define HASH_SIZE(name) (ARRAY_SIZE(name))
#define DEFINE_HASHTABLE(name, bits) \
struct hlist_head name[1 << (bits)] = { [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT }
/****************************************************************
** arch/(*)/include/asm/(processor.h|segment.h|thread_info.h) **
@ -872,11 +862,9 @@ enum { NUMA_NO_NODE = -1 };
struct static_key { };
#define STATIC_KEY_INIT_FALSE ((struct static_key) {})
#define STATIC_KEY_INIT_TRUE ((struct static_key) {})
void static_key_slow_inc(struct static_key *);
void static_key_slow_dec(struct static_key *);
bool static_key_true(struct static_key *);
bool static_key_false(struct static_key *);
bool static_key_enabled(struct static_key *);
@ -979,7 +967,6 @@ unsigned long ilog2(unsigned long n);
* For now, hardcoded
*/
#define PAGE_SIZE 4096
#define PAGE_MASK (~(PAGE_SIZE - 1))
enum {
PAGE_SHIFT = 12,
@ -1006,7 +993,7 @@ struct page
*************************/
enum { RES_USAGE };
struct res_counter { };
struct res_counter;
int res_counter_charge_nofail(struct res_counter *, unsigned long,
struct res_counter **);
u64 res_counter_uncharge(struct res_counter *, unsigned long);
@ -1047,9 +1034,6 @@ struct page_frag
** linux/mm.h **
****************/
#define page_private(page) ((page)->private)
#define set_page_private(page, v) ((page)->private = (v))
extern unsigned long totalram_pages;
extern unsigned long num_physpages;
@ -1064,18 +1048,6 @@ struct page *virt_to_page(const void *x);
void si_meminfo(struct sysinfo *);
int is_vmalloc_addr(const void *x);
int get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct page **pages);
/*********************
** linux/pagemap.h **
*********************/
void release_pages(struct page **pages, int nr, int cold);
/********************
** linux/mmzone.h **
@ -1103,7 +1075,6 @@ enum {
__GFP_COLD = 0x100u,
__GFP_NOWARN = 0x200u,
__GFP_REPEAT = 0x400u,
__GFP_NORETRY = 0x1000u,
__GFP_MEMALLOC = 0x2000u,
__GFP_ZERO = 0x8000u,
__GFP_COMP = 0x4000u,
@ -1167,7 +1138,6 @@ void kmem_cache_destroy(struct kmem_cache *);
** linux/vmalloc.h **
*********************/
void *vmalloc(unsigned long size);
void *vzalloc(unsigned long size);
void vfree(const void *addr);
@ -1278,6 +1248,15 @@ struct rw_semaphore { int dummy; };
#define __RWSEM_INITIALIZER(name) { 0 }
/*********************
** linux/seqlock.h **
*********************/
typedef unsigned seqlock_t;
void seqlock_init (seqlock_t *);
#define __SEQLOCK_UNLOCKED(x) 0
/******************
** linux/time.h **
@ -1500,12 +1479,6 @@ static inline void hlist_nulls_del_init_rcu(struct hlist_nulls_node *n)
}
/**********************
** linux/rcu_list.h **
**********************/
#define list_entry_rcu(ptr, type, member) list_entry(ptr, type, member)
/*********************
** linux/lockdep.h **
*********************/
@ -1656,8 +1629,6 @@ void *__alloc_percpu(size_t size, size_t align);
#define __this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
#define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
#define __this_cpu_read(pcp) pcp
#define __this_cpu_write(pcp, val) pcp = val;
#define this_cpu_inc(pcp) pcp += 1
#define this_cpu_dec(pcp) pcp -= 1
@ -2163,8 +2134,6 @@ static inline void current_uid_gid(kuid_t *u, kgid_t *g)
kgid_t current_egid(void);
void put_group_info(struct group_info *);
/*************************
** asm-generic/fcntl.h **
@ -2237,15 +2206,11 @@ struct pipe_buf_operations
void (*get)(struct pipe_inode_info *, struct pipe_buffer *);
};
extern const struct pipe_buf_operations nosteal_pipe_buf_ops;
void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *);
int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
/********************
** linux/splice.h **
********************/
@ -2304,9 +2269,8 @@ struct kvec
size_t iov_len;
};
size_t iov_length(const struct iovec *iov, unsigned long nr_segs);
int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
/*******************************
** uapi/asm-generic/ioctls.h **
@ -2355,7 +2319,6 @@ struct sock_filter;
struct sk_filter
{
atomic_t refcnt;
unsigned len;
struct rcu_head rcu;
};
@ -2365,11 +2328,6 @@ int sk_attach_filter(struct sock_fprog *, struct sock *);
int sk_detach_filter(struct sock *);
int sk_get_filter(struct sock *, struct sock_filter *, unsigned);
int bpf_tell_extensions(void);
unsigned int sk_filter_size(unsigned int proglen);
/*****************************
** uapi/linux/hdlc/ioctl.h **
*****************************/
@ -2413,7 +2371,6 @@ struct delayed_work
#define INIT_WORK(_work, _func) printk("INIT_WORK not implemented\n");
extern struct workqueue_struct *system_wq;
extern struct workqueue_struct *system_power_efficient_wq;
bool schedule_work(struct work_struct *work);
bool schedule_delayed_work(struct delayed_work *, unsigned long);
@ -2421,9 +2378,7 @@ bool cancel_delayed_work(struct delayed_work *);
bool cancel_delayed_work_sync(struct delayed_work *);
bool mod_delayed_work(struct workqueue_struct *, struct delayed_work *,
unsigned long);
bool queue_delayed_work(struct workqueue_struct *wq,
struct delayed_work *dwork,
unsigned long delay);
void INIT_DEFERRABLE_WORK(struct delayed_work *, void (*func)(struct work_struct *));
@ -2455,35 +2410,6 @@ enum {
void sha_transform(__u32 *, const char *, __u32 *);
/*********************
** linux/seqlock.h **
*********************/
typedef struct seqcount {
unsigned sequence;
} seqcount_t;
typedef unsigned seqlock_t;
#define __SEQLOCK_UNLOCKED(x) 0
void seqlock_init (seqlock_t *);
unsigned raw_seqcount_begin(const seqcount_t *s);
unsigned raw_read_seqcount_begin(const seqcount_t *s);
unsigned read_seqbegin(const seqlock_t *sl);
unsigned read_seqretry(const seqlock_t *sl, unsigned start);
int read_seqcount_retry(const seqcount_t *s, unsigned start);
void write_seqlock_bh(seqlock_t *);
void write_sequnlock_bh(seqlock_t *);
void write_seqlock(seqlock_t *);
void write_sequnlock(seqlock_t *);
void write_seqcount_begin(seqcount_t *);
void write_seqcount_end(seqcount_t *);
/***********************
** linux/rtnetlink.h **
***********************/
@ -2496,7 +2422,7 @@ struct netlink_callback;
struct rtnl_af_ops;
struct dst_entry;
typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *);
typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *);
typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *);
typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *);
@ -2520,7 +2446,6 @@ void __rtnl_unlock(void);
int rtnl_is_locked(void);
int rtnl_put_cacheinfo(struct sk_buff *, struct dst_entry *, u32, long, u32);
int lockdep_rtnl_is_held(void);
/********************
** net/netevent.h **
@ -2567,8 +2492,6 @@ enum { FIB_LOOKUP_NOREF = 1 };
struct u64_stats_sync { };
void u64_stats_init(struct u64_stats_sync *);
/*************************
** net/net_namespace.h **
@ -2600,7 +2523,6 @@ struct net
struct hlist_head *dev_index_head;
unsigned int dev_base_seq;
int ifindex;
unsigned int dev_unreg_count;
struct net_device *loopback_dev;
struct user_namespace *user_ns;
struct proc_dir_entry *proc_net_stat;
@ -2608,7 +2530,7 @@ struct net
struct netns_mib mib;
struct netns_ipv4 ipv4;
atomic_t rt_genid;
atomic_t fnhe_genid;
};
@ -2646,10 +2568,7 @@ void release_net(struct net *net);
int rt_genid(struct net *);
void rt_genid_bump(struct net *);
int rt_genid_ipv4(struct net *);
void rt_genid_bump_ipv4(struct net *);
int fnhe_genid(struct net *net);
/**************************
** linux/seq_file_net.h **
@ -2669,6 +2588,24 @@ struct seq_operations { };
struct seq_file { };
/*********************
** linux/seqlock.h **
*********************/
typedef struct seqcount {
unsigned sequence;
} seqcount_t;
unsigned read_seqbegin(const seqlock_t *sl);
unsigned read_seqretry(const seqlock_t *sl, unsigned start);
void write_seqlock_bh(seqlock_t *);
void write_sequnlock_bh(seqlock_t *);
void write_seqlock(seqlock_t *);
void write_sequnlock(seqlock_t *);
void write_seqcount_begin(seqcount_t *);
void write_seqcount_end(seqcount_t *);
/**********************
** net/secure_seq.h **
**********************/
@ -2803,13 +2740,6 @@ __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len,
return sum;
}
static inline __wsum csum_partial_ext(const void *buff, int len, __wsum sum)
{
return csum_partial(buff, len, sum);
}
__wsum csum_block_add_ext(__wsum csum, __wsum csum2, int offset, int len);
/*********************
** linux/if_vlan.h **
@ -2827,8 +2757,6 @@ struct vlan_ethhdr
__be16 h_vlan_encapsulated_proto;
};
typedef u64 netdev_features_t;
static inline
struct net_device *vlan_dev_real_dev(const struct net_device *dev)
{
@ -2836,21 +2764,12 @@ struct net_device *vlan_dev_real_dev(const struct net_device *dev)
}
#define vlan_tx_tag_get(__skb) 0
#define vlan_tx_tag_get_id(__skb) 0
struct sk_buff *__vlan_put_tag(struct sk_buff *, __be16, u16);
struct sk_buff *__vlan_put_tag(struct sk_buff *, u16);
struct sk_buff *vlan_untag(struct sk_buff *);
int is_vlan_dev(struct net_device *);
u16 vlan_tx_tag_present(struct sk_buff *);
bool vlan_do_receive(struct sk_buff **);
bool vlan_tx_nonzero_tag_present(struct sk_buff *);
bool vlan_hw_offload_capable(netdev_features_t, __be16);
/************************
** linux/if_macvlan.h **
************************/
struct net_device * macvlan_dev_real_dev(const struct net_device *dev);
/********************
@ -2940,11 +2859,15 @@ struct rtnl_af_ops
const struct nlattr *attr);
};
typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *);
typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *);
typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *);
#define rtnl_dereference(p) p
extern const struct nla_policy ifla_policy[IFLA_MAX+1];
void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change, gfp_t flags);
void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change);
/**********************
@ -2981,7 +2904,7 @@ enum {
** net/cls_cgroup.h **
**********************/
void sock_update_classid(struct sock *);
void sock_update_classid(struct sock *, struct task_struct *);
/****************
@ -2992,6 +2915,7 @@ struct ip_hdr;
struct iphdr *ip_hdr(const struct sk_buff *skb);
/********************************
** uapi/linux/netfilter_arp.h **
********************************/
@ -3281,8 +3205,6 @@ static inline void get_random_bytes(void *buf, int nbytes)
}
u32 random32(void);
u32 prandom_u32(void);
void prandom_seed(u32);
void add_device_randomness(const void *, unsigned int);
u32 next_pseudo_random32(u32);
void srandom32(u32 seed);
@ -3322,78 +3244,15 @@ unsigned int net_hash_mix(struct net *);
** net/netprio_cgroup.h **
**************************/
void sock_update_netprioidx(struct sock *);
void sock_update_netprioidx(struct sock *, struct task_struct *);
/******************
** linux/ipv6.h **
******************/
enum {
IP6_MF = 0x0001,
IP6_OFFSET = 0xfff8,
};
struct frag_hdr
{
__u8 nexthdr;
__be16 frag_off;
};
struct ipv6_opt_hdr
{
__u8 nexthdr;
__u8 hdrlen;
};
struct ipv6hdr
{
__be16 payload_len;
__u8 nexthdr;
struct in6_addr saddr;
struct in6_addr daddr;
};
struct ipv6_pinfo
{
__u16 recverr:1;
};
#define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
#define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
int inet_v6_ipv6only(const struct sock *);
int ipv6_only_sock(const struct sock *);
struct ipv6hdr *ipv6_hdr(const struct sk_buff *);
bool ipv6_sk_rxinfo(const struct sock *);
struct ipv6_pinfo *inet6_sk(const struct sock *);
/************************
** net/ip6_checksum.h **
************************/
__sum16 csum_ipv6_magic(const struct in6_addr *saddr,
const struct in6_addr *daddr,
__u32 len, unsigned short proto,
__wsum csum);
/*************************
** uapi/linux/icmpv6.h **
*************************/
enum {
ICMPV6_ECHO_REQUEST = 128,
};
struct icmp6hdr
{
__u8 icmp6_type;
__u8 icmp6_code;
};
struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb);
int inet_v6_ipv6only(const struct sock *);
int ipv6_only_sock(const struct sock *);
/********************
@ -3430,26 +3289,10 @@ bool S_ISSOCK(int);
*********************/
struct gnet_stats_basic_packed;
struct gnet_stats_rate_est64;
struct gnet_stats_rate_est;
void gen_kill_estimator(struct gnet_stats_basic_packed *,
struct gnet_stats_rate_est64 *);
/*********************
** net/busy_poll.h **
*********************/
bool sk_can_busy_loop(struct sock *sk);
bool sk_busy_loop(struct sock *sk, int nonblock);
void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb);
/*******************
** linux/sysfs.h **
*******************/
struct attribute { };
int sysfs_create_link(struct kobject *, struct kobject *, const char *);
void sysfs_remove_link(struct kobject *, const char *);
struct gnet_stats_rate_est *);
/*******************
@ -3459,29 +3302,18 @@ void sysfs_remove_link(struct kobject *, const char *);
struct proto;
void trace_kfree_skb(struct sk_buff *, void *);
void trace_skb_copy_datagram_iovec(const struct sk_buff *, int);
void trace_consume_skb(struct sk_buff *);
void trace_sock_exceed_buf_limit(struct sock *, struct proto *, long);
void trace_sock_rcvqueue_full(struct sock *, struct sk_buff *);
void trace_net_dev_xmit(struct sk_buff *, int , struct net_device *,
unsigned int);
void trace_net_dev_start_xmit(struct sk_buff *, struct net_device *);
void trace_net_dev_queue(struct sk_buff *);
void trace_netif_receive_skb(struct sk_buff *);
void trace_netif_receive_skb_entry(struct sk_buff *);
void trace_netif_rx(struct sk_buff *);
void trace_netif_rx_entry(struct sk_buff *);
void trace_netif_rx_ni_entry(struct sk_buff *);
void trace_netif_receive_skb(struct sk_buff *);
void trace_napi_poll(struct napi_struct *);
void trace_skb_copy_datagram_iovec(const struct sk_buff *, int);
void trace_udp_fail_queue_rcv_skb(int, struct sock*);
void trace_napi_gro_frags_entry(struct sk_buff *);
void trace_napi_gro_receive_entry(struct sk_buff *);
void trace_napi_poll(struct napi_struct *);
/**
* Misc

View File

@ -225,10 +225,10 @@ struct iphdr *ip_hdr(const struct sk_buff *skb)
** linux/netdevice.h **
***********************/
struct netdev_queue *netdev_pick_tx(struct net_device *dev, struct sk_buff *skb, void *accel_priv)
{
return netdev_get_tx_queue(dev, 0);
}
struct netdev_queue *netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)
{
return netdev_get_tx_queue(dev, 0);
}
/*******************************
@ -347,29 +347,6 @@ int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
}
/*****************
** linux/uio.h **
*****************/
int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len)
{
while (len > 0) {
if (iov->iov_len) {
int copy = min_t(unsigned int, iov->iov_len, len);
if (copy_to_user(iov->iov_base, kdata, copy))
return -EFAULT;
kdata += copy;
len -= copy;
iov->iov_len -= copy;
iov->iov_base += copy;
}
iov++;
}
return 0;
}
/****************************
** asm-generic/checksum.h **
****************************/