Lines Matching defs:tun_struct
132 * tap_filter were kept in tun_struct since they were used for filtering for the
137 * The tun_file and tun_struct are loosely coupled, the pointer from one to the
143 struct tun_struct __rcu *tun;
156 struct tun_struct *detached;
169 struct tun_struct *tun;
189 struct tun_struct {
233 static void tun_flow_init(struct tun_struct *tun);
234 static void tun_flow_uninit(struct tun_struct *tun);
276 static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile,
312 static inline bool tun_legacy_is_little_endian(struct tun_struct *tun)
318 static long tun_get_vnet_be(struct tun_struct *tun, int __user *argp)
328 static long tun_set_vnet_be(struct tun_struct *tun, int __user *argp)
343 static inline bool tun_legacy_is_little_endian(struct tun_struct *tun)
348 static long tun_get_vnet_be(struct tun_struct *tun, int __user *argp)
353 static long tun_set_vnet_be(struct tun_struct *tun, int __user *argp)
359 static inline bool tun_is_little_endian(struct tun_struct *tun)
365 static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val)
370 static inline __virtio16 cpu_to_tun16(struct tun_struct *tun, u16 val)
391 static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun,
412 static void tun_flow_delete(struct tun_struct *tun, struct tun_flow_entry *e)
421 static void tun_flow_flush(struct tun_struct *tun)
436 static void tun_flow_delete_by_queue(struct tun_struct *tun, u16 queue_index)
455 struct tun_struct *tun = from_timer(tun, t, flow_gc_timer);
485 static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
535 static u16 tun_automq_select_queue(struct tun_struct *tun, struct sk_buff *skb)
556 static u16 tun_ebpf_select_queue(struct tun_struct *tun, struct sk_buff *skb)
576 struct tun_struct *tun = netdev_priv(dev);
589 static inline bool tun_not_capable(struct tun_struct *tun)
599 static void tun_set_real_num_queues(struct tun_struct *tun)
605 static void tun_disable_queue(struct tun_struct *tun, struct tun_file *tfile)
612 static struct tun_struct *tun_enable_queue(struct tun_file *tfile)
614 struct tun_struct *tun = tfile->detached;
650 struct tun_struct *tun;
706 struct tun_struct *tun;
723 struct tun_struct *tun = netdev_priv(dev);
765 static int tun_attach(struct tun_struct *tun, struct file *file,
860 static struct tun_struct *tun_get(struct tun_file *tfile)
862 struct tun_struct *tun;
873 static void tun_put(struct tun_struct *tun)
988 struct tun_struct *tun = netdev_priv(dev);
1051 static void tun_automq_xmit(struct tun_struct *tun, struct sk_buff *skb)
1069 static unsigned int run_ebpf_filter(struct tun_struct *tun,
1084 struct tun_struct *tun = netdev_priv(dev);
1163 struct tun_struct *tun = netdev_priv(dev);
1170 struct tun_struct *tun = netdev_priv(dev);
1182 struct tun_struct *tun = netdev_priv(dev);
1217 struct tun_struct *tun = netdev_priv(dev);
1257 struct tun_struct *tun = netdev_priv(dev);
1293 struct tun_struct *tun = netdev_priv(dev);
1369 static void tun_flow_init(struct tun_struct *tun)
1382 static void tun_flow_uninit(struct tun_struct *tun)
1394 struct tun_struct *tun = netdev_priv(dev);
1427 static bool tun_sock_writeable(struct tun_struct *tun, struct tun_file *tfile)
1440 struct tun_struct *tun = tun_get(tfile);
1552 static void tun_rx_batched(struct tun_struct *tun, struct tun_file *tfile,
1592 static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile,
1633 static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog,
1665 static struct sk_buff *tun_build_skb(struct tun_struct *tun,
1755 static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
2048 struct tun_struct *tun = tun_get(tfile);
2064 static ssize_t tun_put_user_xdp(struct tun_struct *tun,
2099 static ssize_t tun_put_user(struct tun_struct *tun,
2236 static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile,
2277 struct tun_struct *tun = tun_get(tfile);
2303 static int __tun_set_ebpf(struct tun_struct *tun,
2330 struct tun_struct *tun = netdev_priv(dev);
2344 struct tun_struct *tun = netdev_priv(dev);
2387 struct tun_struct *tun = netdev_priv(dev);
2424 .priv_size = sizeof(struct tun_struct),
2457 static int tun_xdp_one(struct tun_struct *tun,
2569 struct tun_struct *tun = tun_get(tfile);
2616 struct tun_struct *tun = tun_get(tfile);
2667 struct tun_struct *tun;
2693 static int tun_flags(struct tun_struct *tun)
2701 struct tun_struct *tun = netdev_priv(to_net_dev(dev));
2708 struct tun_struct *tun = netdev_priv(to_net_dev(dev));
2718 struct tun_struct *tun = netdev_priv(to_net_dev(dev));
2742 struct tun_struct *tun;
2826 dev = alloc_netdev_mqs(sizeof(struct tun_struct), name,
2878 static void tun_get_iff(struct tun_struct *tun, struct ifreq *ifr)
2888 static int set_offload(struct tun_struct *tun, unsigned long arg)
2924 static void tun_detach_filter(struct tun_struct *tun, int n)
2939 static int tun_attach_filter(struct tun_struct *tun)
2959 static void tun_set_sndbuf(struct tun_struct *tun)
2973 struct tun_struct *tun;
3006 static int tun_set_ebpf(struct tun_struct *tun, struct tun_prog __rcu **prog_p,
3070 struct tun_struct *tun;
3494 struct tun_struct *tun;
3554 struct tun_struct *tun = netdev_priv(dev);
3563 struct tun_struct *tun = netdev_priv(dev);
3571 struct tun_struct *tun = netdev_priv(dev);
3588 struct tun_struct *tun = netdev_priv(dev);
3595 struct tun_struct *tun = netdev_priv(dev);
3603 struct tun_struct *tun = netdev_priv(dev);
3613 struct tun_struct *tun = netdev_priv(dev);
3636 static int tun_queue_resize(struct tun_struct *tun)
3667 struct tun_struct *tun = netdev_priv(dev);