Home
last modified time | relevance | path

Searched refs:skb (Results 1 – 25 of 295) sorted by relevance

12345678910>>...12

/include/linux/
Dskbuff.h884 void (*destructor)(struct sk_buff *skb);
1102 static inline bool skb_pfmemalloc(const struct sk_buff *skb) in skb_pfmemalloc() argument
1104 return unlikely(skb->pfmemalloc); in skb_pfmemalloc()
1120 static inline struct dst_entry *skb_dst(const struct sk_buff *skb) in skb_dst() argument
1125 WARN_ON((skb->_skb_refdst & SKB_DST_NOREF) && in skb_dst()
1128 return (struct dst_entry *)(skb->_skb_refdst & SKB_DST_PTRMASK); in skb_dst()
1139 static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set() argument
1141 skb->slow_gro |= !!dst; in skb_dst_set()
1142 skb->_skb_refdst = (unsigned long)dst; in skb_dst_set()
1155 static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set_noref() argument
[all …]
Dip.h19 static inline struct iphdr *ip_hdr(const struct sk_buff *skb) in ip_hdr() argument
21 return (struct iphdr *)skb_network_header(skb); in ip_hdr()
24 static inline struct iphdr *inner_ip_hdr(const struct sk_buff *skb) in inner_ip_hdr() argument
26 return (struct iphdr *)skb_inner_network_header(skb); in inner_ip_hdr()
29 static inline struct iphdr *ipip_hdr(const struct sk_buff *skb) in ipip_hdr() argument
31 return (struct iphdr *)skb_transport_header(skb); in ipip_hdr()
34 static inline unsigned int ip_transport_len(const struct sk_buff *skb) in ip_transport_len() argument
36 return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); in ip_transport_len()
39 static inline unsigned int iph_totlen(const struct sk_buff *skb, const struct iphdr *iph) in iph_totlen() argument
43 return (len || !skb_is_gso(skb) || !skb_is_gso_tcp(skb)) ? in iph_totlen()
[all …]
Dnetfilter_bridge.h17 int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb);
19 static inline void br_drop_fake_rtable(struct sk_buff *skb) in br_drop_fake_rtable() argument
21 struct dst_entry *dst = skb_dst(skb); in br_drop_fake_rtable()
24 skb_dst_drop(skb); in br_drop_fake_rtable()
28 nf_bridge_info_get(const struct sk_buff *skb) in nf_bridge_info_get() argument
30 return skb_ext_find(skb, SKB_EXT_BRIDGE_NF); in nf_bridge_info_get()
33 static inline bool nf_bridge_info_exists(const struct sk_buff *skb) in nf_bridge_info_exists() argument
35 return skb_ext_exist(skb, SKB_EXT_BRIDGE_NF); in nf_bridge_info_exists()
38 static inline int nf_bridge_get_physinif(const struct sk_buff *skb) in nf_bridge_get_physinif() argument
40 const struct nf_bridge_info *nf_bridge = nf_bridge_info_get(skb); in nf_bridge_get_physinif()
[all …]
Dif_vlan.h60 static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) in vlan_eth_hdr() argument
62 return (struct vlan_ethhdr *)skb_mac_header(skb); in vlan_eth_hdr()
68 static inline struct vlan_ethhdr *skb_vlan_eth_hdr(const struct sk_buff *skb) in skb_vlan_eth_hdr() argument
70 return (struct vlan_ethhdr *)skb->data; in skb_vlan_eth_hdr()
226 extern bool vlan_do_receive(struct sk_buff **skb);
278 static inline bool vlan_do_receive(struct sk_buff **skb) in vlan_do_receive() argument
348 static inline int __vlan_insert_inner_tag(struct sk_buff *skb, in __vlan_insert_inner_tag() argument
354 if (skb_cow_head(skb, VLAN_HLEN) < 0) in __vlan_insert_inner_tag()
357 skb_push(skb, VLAN_HLEN); in __vlan_insert_inner_tag()
361 memmove(skb->data, skb->data + VLAN_HLEN, mac_len - ETH_TLEN); in __vlan_insert_inner_tag()
[all …]
Dnetfilter_netdev.h9 static inline bool nf_hook_ingress_active(const struct sk_buff *skb) in nf_hook_ingress_active() argument
15 return rcu_access_pointer(skb->dev->nf_hooks_ingress); in nf_hook_ingress_active()
19 static inline int nf_hook_ingress(struct sk_buff *skb) in nf_hook_ingress() argument
21 struct nf_hook_entries *e = rcu_dereference(skb->dev->nf_hooks_ingress); in nf_hook_ingress()
32 NFPROTO_NETDEV, skb->dev, NULL, NULL, in nf_hook_ingress()
33 dev_net(skb->dev), NULL); in nf_hook_ingress()
34 ret = nf_hook_slow(skb, &state, e, 0); in nf_hook_ingress()
42 static inline int nf_hook_ingress_active(struct sk_buff *skb) in nf_hook_ingress_active() argument
47 static inline int nf_hook_ingress(struct sk_buff *skb) in nf_hook_ingress() argument
85 static inline struct sk_buff *nf_hook_egress(struct sk_buff *skb, int *rc, in nf_hook_egress() argument
[all …]
Dvirtio_net.h28 static inline int virtio_net_hdr_set_proto(struct sk_buff *skb, in virtio_net_hdr_set_proto() argument
31 if (skb->protocol) in virtio_net_hdr_set_proto()
38 skb->protocol = cpu_to_be16(ETH_P_IP); in virtio_net_hdr_set_proto()
41 skb->protocol = cpu_to_be16(ETH_P_IPV6); in virtio_net_hdr_set_proto()
50 static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, in virtio_net_hdr_to_skb() argument
94 skb_reset_mac_header(skb); in virtio_net_hdr_to_skb()
101 if (!pskb_may_pull(skb, needed)) in virtio_net_hdr_to_skb()
104 if (!skb_partial_csum_set(skb, start, off)) in virtio_net_hdr_to_skb()
107 nh_min_len = max_t(u32, nh_min_len, skb_transport_offset(skb)); in virtio_net_hdr_to_skb()
109 if (!pskb_may_pull(skb, p_off)) in virtio_net_hdr_to_skb()
[all …]
Dvirtio_vsock.h17 #define VIRTIO_VSOCK_SKB_CB(skb) ((struct virtio_vsock_skb_cb *)((skb)->cb)) argument
19 static inline struct virtio_vsock_hdr *virtio_vsock_hdr(struct sk_buff *skb) in virtio_vsock_hdr() argument
21 return (struct virtio_vsock_hdr *)skb->head; in virtio_vsock_hdr()
24 static inline bool virtio_vsock_skb_reply(struct sk_buff *skb) in virtio_vsock_skb_reply() argument
26 return VIRTIO_VSOCK_SKB_CB(skb)->reply; in virtio_vsock_skb_reply()
29 static inline void virtio_vsock_skb_set_reply(struct sk_buff *skb) in virtio_vsock_skb_set_reply() argument
31 VIRTIO_VSOCK_SKB_CB(skb)->reply = true; in virtio_vsock_skb_set_reply()
34 static inline bool virtio_vsock_skb_tap_delivered(struct sk_buff *skb) in virtio_vsock_skb_tap_delivered() argument
36 return VIRTIO_VSOCK_SKB_CB(skb)->tap_delivered; in virtio_vsock_skb_tap_delivered()
39 static inline void virtio_vsock_skb_set_tap_delivered(struct sk_buff *skb) in virtio_vsock_skb_set_tap_delivered() argument
[all …]
Dif_ether.h22 static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) in eth_hdr() argument
24 return (struct ethhdr *)skb_mac_header(skb); in eth_hdr()
30 static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb) in skb_eth_hdr() argument
32 return (struct ethhdr *)skb->data; in skb_eth_hdr()
35 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) in inner_eth_hdr() argument
37 return (struct ethhdr *)skb_inner_mac_header(skb); in inner_eth_hdr()
40 int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
/include/net/
Dgro.h100 #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb) argument
103 static inline int gro_recursion_inc_test(struct sk_buff *skb) in gro_recursion_inc_test() argument
105 return ++NAPI_GRO_CB(skb)->recursion_counter == GRO_RECURSION_LIMIT; in gro_recursion_inc_test()
111 struct sk_buff *skb) in call_gro_receive() argument
113 if (unlikely(gro_recursion_inc_test(skb))) { in call_gro_receive()
114 NAPI_GRO_CB(skb)->flush |= 1; in call_gro_receive()
118 return cb(head, skb); in call_gro_receive()
126 struct sk_buff *skb) in call_gro_receive_sk() argument
128 if (unlikely(gro_recursion_inc_test(skb))) { in call_gro_receive_sk()
129 NAPI_GRO_CB(skb)->flush |= 1; in call_gro_receive_sk()
[all …]
Dgso.h24 #define SKB_GSO_CB(skb) ((struct skb_gso_cb *)((skb)->cb + SKB_GSO_CB_OFFSET)) argument
32 static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra) in gso_pskb_expand_head() argument
37 headroom = skb_headroom(skb); in gso_pskb_expand_head()
38 ret = pskb_expand_head(skb, extra, 0, GFP_ATOMIC); in gso_pskb_expand_head()
42 new_headroom = skb_headroom(skb); in gso_pskb_expand_head()
43 SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom); in gso_pskb_expand_head()
47 static inline void gso_reset_checksum(struct sk_buff *skb, __wsum res) in gso_reset_checksum() argument
50 if (skb->remcsum_offload) in gso_reset_checksum()
53 SKB_GSO_CB(skb)->csum = res; in gso_reset_checksum()
54 SKB_GSO_CB(skb)->csum_start = skb_checksum_start(skb) - skb->head; in gso_reset_checksum()
[all …]
Dllc_c_ev.h123 static __inline__ struct llc_conn_state_ev *llc_conn_ev(struct sk_buff *skb) in llc_conn_ev() argument
125 return (struct llc_conn_state_ev *)skb->cb; in llc_conn_ev()
128 typedef int (*llc_conn_ev_t)(struct sock *sk, struct sk_buff *skb);
129 typedef int (*llc_conn_ev_qfyr_t)(struct sock *sk, struct sk_buff *skb);
131 int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb);
132 int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb);
133 int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb);
134 int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb);
135 int llc_conn_ev_local_busy_detected(struct sock *sk, struct sk_buff *skb);
136 int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb);
[all …]
Dllc_c_ac.h97 typedef int (*llc_conn_action_t)(struct sock *sk, struct sk_buff *skb);
99 int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
100 int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
101 int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb);
102 int llc_conn_ac_data_ind(struct sock *sk, struct sk_buff *skb);
103 int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb);
104 int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb);
105 int llc_conn_ac_rst_confirm(struct sock *sk, struct sk_buff *skb);
107 struct sk_buff *skb);
109 struct sk_buff *skb);
[all …]
Dinet_ecn.h134 static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ce() argument
144 if (skb->ip_summed == CHECKSUM_COMPLETE) in IP6_ECN_set_ce()
145 skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), in IP6_ECN_set_ce()
150 static inline int IP6_ECN_set_ect1(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ect1() argument
160 if (skb->ip_summed == CHECKSUM_COMPLETE) in IP6_ECN_set_ect1()
161 skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), in IP6_ECN_set_ect1()
172 static inline int INET_ECN_set_ce(struct sk_buff *skb) in INET_ECN_set_ce() argument
174 switch (skb_protocol(skb, true)) { in INET_ECN_set_ce()
176 if (skb_network_header(skb) + sizeof(struct iphdr) <= in INET_ECN_set_ce()
177 skb_tail_pointer(skb)) in INET_ECN_set_ce()
[all …]
Dudplite.h22 int len, int odd, struct sk_buff *skb) in udplite_getfrag() argument
31 static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) in udplite_checksum_init() argument
47 else if (cscov < 8 || cscov > skb->len) { in udplite_checksum_init()
52 cscov, skb->len); in udplite_checksum_init()
55 } else if (cscov < skb->len) { in udplite_checksum_init()
56 UDP_SKB_CB(skb)->partial_cov = 1; in udplite_checksum_init()
57 UDP_SKB_CB(skb)->cscov = cscov; in udplite_checksum_init()
58 if (skb->ip_summed == CHECKSUM_COMPLETE) in udplite_checksum_init()
59 skb->ip_summed = CHECKSUM_NONE; in udplite_checksum_init()
60 skb->csum_valid = 0; in udplite_checksum_init()
[all …]
Dudp.h111 static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb) in __udp_lib_checksum_complete() argument
113 return (UDP_SKB_CB(skb)->cscov == skb->len ? in __udp_lib_checksum_complete()
114 __skb_checksum_complete(skb) : in __udp_lib_checksum_complete()
115 __skb_checksum_complete_head(skb, UDP_SKB_CB(skb)->cscov)); in __udp_lib_checksum_complete()
118 static inline int udp_lib_checksum_complete(struct sk_buff *skb) in udp_lib_checksum_complete() argument
120 return !skb_csum_unnecessary(skb) && in udp_lib_checksum_complete()
121 __udp_lib_checksum_complete(skb); in udp_lib_checksum_complete()
130 static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udp_csum_outgoing() argument
132 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum_outgoing()
134 skb_queue_walk(&sk->sk_write_queue, skb) { in udp_csum_outgoing()
[all …]
Dip6_checksum.h39 static inline __wsum ip6_compute_pseudo(struct sk_buff *skb, int proto) in ip6_compute_pseudo() argument
41 return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in ip6_compute_pseudo()
42 &ipv6_hdr(skb)->daddr, in ip6_compute_pseudo()
43 skb->len, proto, 0)); in ip6_compute_pseudo()
54 static inline void __tcp_v6_send_check(struct sk_buff *skb, in __tcp_v6_send_check() argument
58 struct tcphdr *th = tcp_hdr(skb); in __tcp_v6_send_check()
60 th->check = ~tcp_v6_check(skb->len, saddr, daddr, 0); in __tcp_v6_send_check()
61 skb->csum_start = skb_transport_header(skb) - skb->head; in __tcp_v6_send_check()
62 skb->csum_offset = offsetof(struct tcphdr, check); in __tcp_v6_send_check()
65 static inline void tcp_v6_gso_csum_prep(struct sk_buff *skb) in tcp_v6_gso_csum_prep() argument
[all …]
Dtc_wrapper.h21 INDIRECT_CALLABLE_DECLARE(int fname(struct sk_buff *skb, \
46 static inline int tc_act(struct sk_buff *skb, const struct tc_action *a, in tc_act() argument
54 return tcf_gact_act(skb, a, res); in tc_act()
58 return tcf_mirred_act(skb, a, res); in tc_act()
62 return tcf_pedit_act(skb, a, res); in tc_act()
66 return tcf_skbedit_act(skb, a, res); in tc_act()
70 return tcf_skbmod_act(skb, a, res); in tc_act()
74 return tcf_police_act(skb, a, res); in tc_act()
78 return tcf_bpf_act(skb, a, res); in tc_act()
82 return tcf_connmark_act(skb, a, res); in tc_act()
[all …]
Dllc_s_ev.h48 static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb) in llc_sap_ev() argument
50 return (struct llc_sap_state_ev *)skb->cb; in llc_sap_ev()
55 typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb);
57 int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
58 int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
59 int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
60 int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
61 int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
62 int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
63 int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
[all …]
Dllc_s_ac.h30 typedef int (*llc_sap_action_t)(struct llc_sap *sap, struct sk_buff *skb);
32 int llc_sap_action_unitdata_ind(struct llc_sap *sap, struct sk_buff *skb);
33 int llc_sap_action_send_ui(struct llc_sap *sap, struct sk_buff *skb);
34 int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb);
35 int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb);
36 int llc_sap_action_send_test_c(struct llc_sap *sap, struct sk_buff *skb);
37 int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb);
38 int llc_sap_action_report_status(struct llc_sap *sap, struct sk_buff *skb);
39 int llc_sap_action_xid_ind(struct llc_sap *sap, struct sk_buff *skb);
40 int llc_sap_action_test_ind(struct llc_sap *sap, struct sk_buff *skb);
Dl3mdev.h38 struct sk_buff *skb, u16 proto);
40 struct sock *sk, struct sk_buff *skb,
165 struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto) in l3mdev_l3_rcv() argument
169 if (netif_is_l3_slave(skb->dev)) in l3mdev_l3_rcv()
170 master = netdev_master_upper_dev_get_rcu(skb->dev); in l3mdev_l3_rcv()
171 else if (netif_is_l3_master(skb->dev) || in l3mdev_l3_rcv()
172 netif_has_l3_rx_handler(skb->dev)) in l3mdev_l3_rcv()
173 master = skb->dev; in l3mdev_l3_rcv()
176 skb = master->l3mdev_ops->l3mdev_l3_rcv(master, skb, proto); in l3mdev_l3_rcv()
178 return skb; in l3mdev_l3_rcv()
[all …]
Dcodel_qdisc.h61 static struct codel_skb_cb *get_codel_cb(const struct sk_buff *skb) in get_codel_cb() argument
63 qdisc_cb_private_validate(skb, sizeof(struct codel_skb_cb)); in get_codel_cb()
64 return (struct codel_skb_cb *)qdisc_skb_cb(skb)->data; in get_codel_cb()
67 static codel_time_t codel_get_enqueue_time(const struct sk_buff *skb) in codel_get_enqueue_time() argument
69 return get_codel_cb(skb)->enqueue_time; in codel_get_enqueue_time()
72 static void codel_set_enqueue_time(struct sk_buff *skb) in codel_set_enqueue_time() argument
74 get_codel_cb(skb)->enqueue_time = codel_get_time(); in codel_set_enqueue_time()
Dseg6.h17 static inline void update_csum_diff4(struct sk_buff *skb, __be32 from, in update_csum_diff4() argument
22 skb->csum = ~csum_partial((char *)diff, sizeof(diff), ~skb->csum); in update_csum_diff4()
25 static inline void update_csum_diff16(struct sk_buff *skb, __be32 *from, in update_csum_diff16() argument
33 skb->csum = ~csum_partial((char *)diff, sizeof(diff), ~skb->csum); in update_csum_diff16()
61 extern struct ipv6_sr_hdr *seg6_get_srh(struct sk_buff *skb, int flags);
62 extern void seg6_icmp_srh(struct sk_buff *skb, struct inet6_skb_parm *opt);
63 extern int seg6_do_srh_encap(struct sk_buff *skb, struct ipv6_sr_hdr *osrh,
65 extern int seg6_do_srh_inline(struct sk_buff *skb, struct ipv6_sr_hdr *osrh);
66 extern int seg6_lookup_nexthop(struct sk_buff *skb, struct in6_addr *nhaddr,
73 static inline const struct in6_addr *seg6_get_daddr(struct sk_buff *skb, in seg6_get_daddr() argument
[all …]
/include/linux/can/
Dskb.h20 int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
38 bool can_dropped_invalid_skb(struct net_device *dev, struct sk_buff *skb);
63 static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb) in can_skb_prv() argument
65 return (struct can_skb_priv *)(skb->head); in can_skb_prv()
68 static inline void can_skb_reserve(struct sk_buff *skb) in can_skb_reserve() argument
70 skb_reserve(skb, sizeof(struct can_skb_priv)); in can_skb_reserve()
73 static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) in can_skb_set_owner() argument
81 skb->destructor = sock_efree; in can_skb_set_owner()
82 skb->sk = sk; in can_skb_set_owner()
89 static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb) in can_create_echo_skb() argument
[all …]
/include/trace/events/
Dnet.h16 TP_PROTO(const struct sk_buff *skb, const struct net_device *dev),
18 TP_ARGS(skb, dev),
42 __entry->queue_mapping = skb->queue_mapping;
43 __entry->skbaddr = skb;
44 __entry->vlan_tagged = skb_vlan_tag_present(skb);
45 __entry->vlan_proto = ntohs(skb->vlan_proto);
46 __entry->vlan_tci = skb_vlan_tag_get(skb);
47 __entry->protocol = ntohs(skb->protocol);
48 __entry->ip_summed = skb->ip_summed;
49 __entry->len = skb->len;
[all …]
/include/net/netfilter/
Dbr_netfilter.h9 static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) in nf_bridge_alloc() argument
12 struct nf_bridge_info *b = skb_ext_add(skb, SKB_EXT_BRIDGE_NF); in nf_bridge_alloc()
23 void nf_bridge_update_protocol(struct sk_buff *skb);
26 struct sk_buff *skb, struct net_device *indev,
31 unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb);
33 static inline void nf_bridge_push_encap_header(struct sk_buff *skb) in nf_bridge_push_encap_header() argument
35 unsigned int len = nf_bridge_encap_header_len(skb); in nf_bridge_push_encap_header()
37 skb_push(skb, len); in nf_bridge_push_encap_header()
38 skb->network_header -= len; in nf_bridge_push_encap_header()
41 int br_nf_pre_routing_finish_bridge(struct net *net, struct sock *sk, struct sk_buff *skb);
[all …]

12345678910>>...12