kernel_optimize_test/net/sched
Alexei Starovoitov 7ae457c1e5 net: filter: split 'struct sk_filter' into socket and bpf parts
clean up names related to socket filtering and bpf in the following way:
- everything that deals with sockets keeps 'sk_*' prefix
- everything that is pure BPF is changed to 'bpf_*' prefix

split 'struct sk_filter' into
struct sk_filter {
	atomic_t        refcnt;
	struct rcu_head rcu;
	struct bpf_prog *prog;
};
and
struct bpf_prog {
        u32                     jited:1,
                                len:31;
        struct sock_fprog_kern  *orig_prog;
        unsigned int            (*bpf_func)(const struct sk_buff *skb,
                                            const struct bpf_insn *filter);
        union {
                struct sock_filter      insns[0];
                struct bpf_insn         insnsi[0];
                struct work_struct      work;
        };
};
so that 'struct bpf_prog' can be used independent of sockets and cleans up
'unattached' bpf use cases

split SK_RUN_FILTER macro into:
    SK_RUN_FILTER to be used with 'struct sk_filter *' and
    BPF_PROG_RUN to be used with 'struct bpf_prog *'

__sk_filter_release(struct sk_filter *) gains
__bpf_prog_release(struct bpf_prog *) helper function

also perform related renames for the functions that work
with 'struct bpf_prog *', since they're on the same lines:

sk_filter_size -> bpf_prog_size
sk_filter_select_runtime -> bpf_prog_select_runtime
sk_filter_free -> bpf_prog_free
sk_unattached_filter_create -> bpf_prog_create
sk_unattached_filter_destroy -> bpf_prog_destroy
sk_store_orig_filter -> bpf_prog_store_orig_filter
sk_release_orig_filter -> bpf_release_orig_filter
__sk_migrate_filter -> bpf_migrate_filter
__sk_prepare_filter -> bpf_prepare_filter

API for attaching classic BPF to a socket stays the same:
sk_attach_filter(prog, struct sock *)/sk_detach_filter(struct sock *)
and SK_RUN_FILTER(struct sk_filter *, ctx) to execute a program
which is used by sockets, tun, af_packet

API for 'unattached' BPF programs becomes:
bpf_prog_create(struct bpf_prog **)/bpf_prog_destroy(struct bpf_prog *)
and BPF_PROG_RUN(struct bpf_prog *, ctx) to execute a program
which is used by isdn, ppp, team, seccomp, ptp, xt_bpf, cls_bpf, test_bpf

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-02 15:03:58 -07:00
..
act_api.c
act_csum.c
act_gact.c
act_ipt.c
act_mirred.c net_sched: hold tcf_lock in netdevice notifier 2014-07-20 20:31:42 -07:00
act_nat.c
act_pedit.c
act_police.c
act_simple.c
act_skbedit.c
cls_api.c net_sched: cancel nest attribute on failure in tcf_exts_dump() 2014-07-17 14:58:52 -07:00
cls_basic.c
cls_bpf.c net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
cls_cgroup.c
cls_flow.c
cls_fw.c
cls_route.c
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_tcindex.c net_sched: remove exceptional & on function name 2014-07-24 23:23:32 -07:00
cls_u32.c net_sched: avoid generating same handle for u32 filters 2014-07-20 20:49:17 -07:00
em_canid.c net: em_canid: remove useless statements from em_canid_change 2014-06-21 15:40:22 -07:00
em_cmp.c
em_ipset.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig
Makefile
sch_api.c net_sched: drr: warn when qdisc is not work conserving 2014-06-11 15:50:59 -07:00
sch_atm.c
sch_blackhole.c
sch_cbq.c
sch_choke.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
sch_codel.c
sch_drr.c net_sched: drr: warn when qdisc is not work conserving 2014-06-11 15:50:59 -07:00
sch_dsmark.c
sch_fifo.c
sch_fq_codel.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
sch_fq.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
sch_generic.c net: fix some typos in comment 2014-07-01 14:20:32 -07:00
sch_gred.c
sch_hfsc.c
sch_hhf.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
sch_htb.c
sch_ingress.c
sch_mq.c
sch_mqprio.c
sch_multiq.c
sch_netem.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c
sch_sfb.c
sch_sfq.c net: use the new API kvfree() 2014-06-05 00:49:51 -07:00
sch_tbf.c
sch_teql.c net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00