Lines Matching defs:tun_struct
121 * tap_filter were kept in tun_struct since they were used for filtering for the
126 * The tun_file and tun_struct are loosely coupled, the pointer from one to the
132 struct tun_struct __rcu *tun;
145 struct tun_struct *detached;
158 struct tun_struct *tun;
178 struct tun_struct {
222 static void tun_flow_init(struct tun_struct *tun);
223 static void tun_flow_uninit(struct tun_struct *tun);
265 static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile,
300 static inline bool tun_legacy_is_little_endian(struct tun_struct *tun)
306 static long tun_get_vnet_be(struct tun_struct *tun, int __user *argp)
316 static long tun_set_vnet_be(struct tun_struct *tun, int __user *argp)
331 static inline bool tun_legacy_is_little_endian(struct tun_struct *tun)
336 static long tun_get_vnet_be(struct tun_struct *tun, int __user *argp)
341 static long tun_set_vnet_be(struct tun_struct *tun, int __user *argp)
347 static inline bool tun_is_little_endian(struct tun_struct *tun)
353 static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val)
358 static inline __virtio16 cpu_to_tun16(struct tun_struct *tun, u16 val)
379 static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun,
400 static void tun_flow_delete(struct tun_struct *tun, struct tun_flow_entry *e)
409 static void tun_flow_flush(struct tun_struct *tun)
424 static void tun_flow_delete_by_queue(struct tun_struct *tun, u16 queue_index)
443 struct tun_struct *tun = from_timer(tun, t, flow_gc_timer);
473 static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
523 static u16 tun_automq_select_queue(struct tun_struct *tun, struct sk_buff *skb)
544 static u16 tun_ebpf_select_queue(struct tun_struct *tun, struct sk_buff *skb)
564 struct tun_struct *tun = netdev_priv(dev);
577 static inline bool tun_not_capable(struct tun_struct *tun)
587 static void tun_set_real_num_queues(struct tun_struct *tun)
593 static void tun_disable_queue(struct tun_struct *tun, struct tun_file *tfile)
600 static struct tun_struct *tun_enable_queue(struct tun_file *tfile)
602 struct tun_struct *tun = tfile->detached;
638 struct tun_struct *tun;
695 struct tun_struct *tun;
712 struct tun_struct *tun = netdev_priv(dev);
754 static int tun_attach(struct tun_struct *tun, struct file *file,
849 static struct tun_struct *tun_get(struct tun_file *tfile)
851 struct tun_struct *tun;
862 static void tun_put(struct tun_struct *tun)
977 struct tun_struct *tun = netdev_priv(dev);
1040 static void tun_automq_xmit(struct tun_struct *tun, struct sk_buff *skb)
1058 static unsigned int run_ebpf_filter(struct tun_struct *tun,
1073 struct tun_struct *tun = netdev_priv(dev);
1170 struct tun_struct *tun = netdev_priv(dev);
1177 struct tun_struct *tun = netdev_priv(dev);
1188 struct tun_struct *tun = netdev_priv(dev);
1199 struct tun_struct *tun = netdev_priv(dev);
1239 struct tun_struct *tun = netdev_priv(dev);
1275 struct tun_struct *tun = netdev_priv(dev);
1354 static void tun_flow_init(struct tun_struct *tun)
1367 static void tun_flow_uninit(struct tun_struct *tun)
1379 struct tun_struct *tun = netdev_priv(dev);
1417 static bool tun_sock_writeable(struct tun_struct *tun, struct tun_file *tfile)
1430 struct tun_struct *tun = tun_get(tfile);
1545 static void tun_rx_batched(struct tun_struct *tun, struct tun_file *tfile,
1585 static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile,
1626 static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog,
1664 static struct sk_buff *tun_build_skb(struct tun_struct *tun,
1750 static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
2045 struct tun_struct *tun = tun_get(tfile);
2061 static ssize_t tun_put_user_xdp(struct tun_struct *tun,
2092 static ssize_t tun_put_user(struct tun_struct *tun,
2223 static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile,
2264 struct tun_struct *tun = tun_get(tfile);
2290 static int __tun_set_ebpf(struct tun_struct *tun,
2317 struct tun_struct *tun = netdev_priv(dev);
2330 struct tun_struct *tun = netdev_priv(dev);
2373 struct tun_struct *tun = netdev_priv(dev);
2410 .priv_size = sizeof(struct tun_struct),
2443 static int tun_xdp_one(struct tun_struct *tun,
2566 struct tun_struct *tun = tun_get(tfile);
2618 struct tun_struct *tun = tun_get(tfile);
2669 struct tun_struct *tun;
2695 static int tun_flags(struct tun_struct *tun)
2703 struct tun_struct *tun = netdev_priv(to_net_dev(dev));
2710 struct tun_struct *tun = netdev_priv(to_net_dev(dev));
2720 struct tun_struct *tun = netdev_priv(to_net_dev(dev));
2744 struct tun_struct *tun;
2828 dev = alloc_netdev_mqs(sizeof(struct tun_struct), name,
2883 static void tun_get_iff(struct tun_struct *tun, struct ifreq *ifr)
2893 static int set_offload(struct tun_struct *tun, unsigned long arg)
2935 static void tun_detach_filter(struct tun_struct *tun, int n)
2950 static int tun_attach_filter(struct tun_struct *tun)
2970 static void tun_set_sndbuf(struct tun_struct *tun)
2984 struct tun_struct *tun;
3017 static int tun_set_ebpf(struct tun_struct *tun, struct tun_prog __rcu **prog_p,
3081 struct tun_struct *tun;
3515 struct tun_struct *tun;
3575 struct tun_struct *tun = netdev_priv(dev);
3584 struct tun_struct *tun = netdev_priv(dev);
3592 struct tun_struct *tun = netdev_priv(dev);
3609 struct tun_struct *tun = netdev_priv(dev);
3616 struct tun_struct *tun = netdev_priv(dev);
3626 struct tun_struct *tun = netdev_priv(dev);
3638 struct tun_struct *tun = netdev_priv(dev);
3661 static int tun_queue_resize(struct tun_struct *tun)
3692 struct tun_struct *tun = netdev_priv(dev);