Home
last modified time | relevance | path

Searched full:skb (Results 1 – 25 of 2276) sorted by relevance

12345678910>>...92

/linux/net/xfrm/
H A Dxfrm_output.c27 static int xfrm_output2(struct net *net, struct sock *sk, struct sk_buff *skb);
28 static int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb);
30 static int xfrm_skb_check_space(struct sk_buff *skb) in xfrm_skb_check_space() argument
32 struct dst_entry *dst = skb_dst(skb); in xfrm_skb_check_space()
34 - skb_headroom(skb); in xfrm_skb_check_space()
35 int ntail = dst->dev->needed_tailroom - skb_tailroom(skb); in xfrm_skb_check_space()
44 return pskb_expand_head(skb, nhead, ntail, GFP_ATOMIC); in xfrm_skb_check_space()
51 static struct dst_entry *skb_dst_pop(struct sk_buff *skb) in skb_dst_pop() argument
53 struct dst_entry *child = dst_clone(xfrm_dst_child(skb_dst(skb))); in skb_dst_pop()
55 skb_dst_drop(skb); in skb_dst_pop()
[all …]
H A Dxfrm_input.c41 int (*finish)(struct net *net, struct sock *sk, struct sk_buff *skb);
106 static int xfrm_rcv_cb(struct sk_buff *skb, unsigned int family, u8 protocol, in xfrm_rcv_cb() argument
117 ret = afinfo->callback(skb, protocol, err); in xfrm_rcv_cb()
123 struct sec_path *secpath_set(struct sk_buff *skb) in secpath_set() argument
125 struct sec_path *sp, *tmp = skb_ext_find(skb, SKB_EXT_SEC_PATH); in secpath_set()
127 sp = skb_ext_add(skb, SKB_EXT_SEC_PATH); in secpath_set()
146 int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq) in xfrm_parse_spi() argument
163 if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr))) in xfrm_parse_spi()
165 *spi = htonl(ntohs(*(__be16 *)(skb_transport_header(skb) + 2))); in xfrm_parse_spi()
172 if (!pskb_may_pull(skb, hlen)) in xfrm_parse_spi()
[all …]
/linux/net/core/
H A Dgro.c92 int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb) in skb_gro_receive() argument
94 struct skb_shared_info *pinfo, *skbinfo = skb_shinfo(skb); in skb_gro_receive()
95 unsigned int offset = skb_gro_offset(skb); in skb_gro_receive()
96 unsigned int headlen = skb_headlen(skb); in skb_gro_receive()
97 unsigned int len = skb_gro_len(skb); in skb_gro_receive()
109 if (p->pp_recycle != skb->pp_recycle) in skb_gro_receive()
113 NAPI_GRO_CB(skb)->flush)) in skb_gro_receive()
117 if (NAPI_GRO_CB(skb)->proto != IPPROTO_TCP || in skb_gro_receive()
122 segs = NAPI_GRO_CB(skb)->count; in skb_gro_receive()
149 new_truesize = SKB_TRUESIZE(skb_end_offset(skb)); in skb_gro_receive()
[all …]
H A Dskbuff.c19 * Ray VanTassle : Fixed --skb->lock in free
88 #include <trace/events/skb.h>
197 * @skb: buffer
207 static void skb_panic(struct sk_buff *skb, unsigned int sz, void *addr, in skb_panic() argument
211 msg, addr, skb->len, sz, skb->head, skb->data, in skb_panic()
212 (unsigned long)skb->tail, (unsigned long)skb->end, in skb_panic()
213 skb->dev ? skb->dev->name : "<NULL>"); in skb_panic()
217 static void skb_over_panic(struct sk_buff *skb, unsigned int sz, void *addr) in skb_over_panic() argument
219 skb_panic(skb, sz, addr, __func__); in skb_over_panic()
222 static void skb_under_panic(struct sk_buff *skb, unsigned int sz, void *addr) in skb_under_panic() argument
[all …]
H A Dgso.c9 * @skb: buffer to segment
13 struct sk_buff *skb_eth_gso_segment(struct sk_buff *skb, in skb_eth_gso_segment() argument
22 segs = ptype->callbacks.gso_segment(skb, features); in skb_eth_gso_segment()
34 * @skb: buffer to segment
37 struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, in skb_mac_gso_segment() argument
42 int vlan_depth = skb->mac_len; in skb_mac_gso_segment()
43 __be16 type = skb_network_protocol(skb, &vlan_depth); in skb_mac_gso_segment()
48 __skb_pull(skb, vlan_depth); in skb_mac_gso_segment()
53 segs = ptype->callbacks.gso_segment(skb, features); in skb_mac_gso_segment()
59 __skb_push(skb, skb->data - skb_mac_header(skb)); in skb_mac_gso_segment()
[all …]
/linux/include/linux/
H A Dskbuff.h44 * DOC: skb checksums
105 * not in skb->csum. Thus, skb->csum is undefined in this case.
133 * checksum is bad, skb->csum_level would be set to zero (TCP checksum is
145 * skb->csum, it MUST use CHECKSUM_COMPLETE, not CHECKSUM_UNNECESSARY.
155 * referred to by skb->csum_start + skb->csum_offset and any preceding
194 * The skb was already checksummed by the protocol, or a checksum is not
253 /* Maximum value in skb->csum_level */
260 /* For X bytes available in skb->head, what is the minimal
272 /* return minimum truesize of one skb containing X bytes of data */
310 * skb is out in neigh layer.
[all …]
/linux/drivers/net/wireless/ath/ath10k/
H A Dwmi-ops.h15 void (*rx)(struct ath10k *ar, struct sk_buff *skb);
19 int (*pull_scan)(struct ath10k *ar, struct sk_buff *skb,
21 int (*pull_mgmt_rx)(struct ath10k *ar, struct sk_buff *skb,
23 int (*pull_mgmt_tx_compl)(struct ath10k *ar, struct sk_buff *skb,
26 struct ath10k *ar, struct sk_buff *skb,
28 int (*pull_ch_info)(struct ath10k *ar, struct sk_buff *skb,
30 int (*pull_vdev_start)(struct ath10k *ar, struct sk_buff *skb,
32 int (*pull_peer_kick)(struct ath10k *ar, struct sk_buff *skb,
34 int (*pull_swba)(struct ath10k *ar, struct sk_buff *skb,
36 int (*pull_phyerr_hdr)(struct ath10k *ar, struct sk_buff *skb,
[all …]
/linux/net/ipv6/
H A Dip6_input.c49 static void tcp_v6_early_demux(struct sk_buff *skb) in tcp_v6_early_demux() argument
51 struct net *net = dev_net_rcu(skb->dev); in tcp_v6_early_demux()
56 if (skb->pkt_type != PACKET_HOST) in tcp_v6_early_demux()
59 if (!pskb_may_pull(skb, skb_transport_offset(skb) + in tcp_v6_early_demux()
63 hdr = ipv6_hdr(skb); in tcp_v6_early_demux()
64 th = tcp_hdr(skb); in tcp_v6_early_demux()
72 inet6_iif(skb), inet6_sdif(skb)); in tcp_v6_early_demux()
74 skb->sk = sk; in tcp_v6_early_demux()
75 skb->destructor = sock_edemux; in tcp_v6_early_demux()
82 sk->sk_rx_dst_ifindex == skb->skb_iif) in tcp_v6_early_demux()
[all …]
H A Dexthdrs.c65 static bool ip6_tlvopt_unknown(struct sk_buff *skb, int optoff, in ip6_tlvopt_unknown() argument
79 switch ((skb_network_header(skb)[optoff] & 0xC0) >> 6) { in ip6_tlvopt_unknown()
90 if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr)) in ip6_tlvopt_unknown()
94 icmpv6_param_prob_reason(skb, ICMPV6_UNK_OPTION, optoff, in ip6_tlvopt_unknown()
100 kfree_skb_reason(skb, SKB_DROP_REASON_UNHANDLED_PROTO); in ip6_tlvopt_unknown()
104 static bool ipv6_hop_ra(struct sk_buff *skb, int optoff);
105 static bool ipv6_hop_ioam(struct sk_buff *skb, int optoff);
106 static bool ipv6_hop_jumbo(struct sk_buff *skb, int optoff);
107 static bool ipv6_hop_calipso(struct sk_buff *skb, int optoff);
109 static bool ipv6_dest_hao(struct sk_buff *skb, int optoff);
[all …]
H A Desp6_offload.c54 struct sk_buff *skb) in esp6_gro_receive() argument
56 int offset = skb_gro_offset(skb); in esp6_gro_receive()
64 if (NAPI_GRO_CB(skb)->proto == IPPROTO_UDP) in esp6_gro_receive()
67 if (!pskb_pull(skb, offset)) in esp6_gro_receive()
70 if (xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq) != 0) in esp6_gro_receive()
73 xo = xfrm_offload(skb); in esp6_gro_receive()
75 struct sec_path *sp = secpath_set(skb); in esp6_gro_receive()
83 x = xfrm_input_state_lookup(dev_net(skb->dev), skb->mark, in esp6_gro_receive()
84 (xfrm_address_t *)&ipv6_hdr(skb)->daddr, in esp6_gro_receive()
96 skb->mark = xfrm_smark_get(skb->mark, x); in esp6_gro_receive()
[all …]
/linux/net/openvswitch/
H A Dactions.c91 static struct deferred_action *add_deferred_actions(struct sk_buff *skb, in add_deferred_actions()
101 da->skb = skb; in add_deferred_actions()
120 static int clone_execute(struct datapath *dp, struct sk_buff *skb,
126 static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
130 static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key, in push_mpls()
135 err = skb_mpls_push(skb, mpls_lse, mpls_ethertype, mac_len, !!mac_len); in push_mpls()
146 static int pop_mpls(struct sk_buff *skb, struct sw_flow_key *key, in pop_mpls()
151 err = skb_mpls_pop(skb, ethertype, skb in pop_mpls()
90 add_deferred_actions(struct sk_buff * skb,const struct sw_flow_key * key,const struct nlattr * actions,const int actions_len) add_deferred_actions() argument
129 push_mpls(struct sk_buff * skb,struct sw_flow_key * key,__be32 mpls_lse,__be16 mpls_ethertype,__u16 mac_len) push_mpls() argument
145 pop_mpls(struct sk_buff * skb,struct sw_flow_key * key,const __be16 ethertype) pop_mpls() argument
162 set_mpls(struct sk_buff * skb,struct sw_flow_key * flow_key,const __be32 * mpls_lse,const __be32 * mask) set_mpls() argument
182 pop_vlan(struct sk_buff * skb,struct sw_flow_key * key) pop_vlan() argument
196 push_vlan(struct sk_buff * skb,struct sw_flow_key * key,const struct ovs_action_push_vlan * vlan) push_vlan() argument
225 set_eth_addr(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct ovs_key_ethernet * key,const struct ovs_key_ethernet * mask) set_eth_addr() argument
252 pop_eth(struct sk_buff * skb,struct sw_flow_key * key) pop_eth() argument
266 push_eth(struct sk_buff * skb,struct sw_flow_key * key,const struct ovs_action_push_eth * ethh) push_eth() argument
282 push_nsh(struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * a) push_nsh() argument
304 pop_nsh(struct sk_buff * skb,struct sw_flow_key * key) pop_nsh() argument
321 update_ip_l4_checksum(struct sk_buff * skb,struct iphdr * nh,__be32 addr,__be32 new_addr) update_ip_l4_checksum() argument
347 set_ip_addr(struct sk_buff * skb,struct iphdr * nh,__be32 * addr,__be32 new_addr) set_ip_addr() argument
357 update_ipv6_checksum(struct sk_buff * skb,u8 l4_proto,__be32 addr[4],const __be32 new_addr[4]) update_ipv6_checksum() argument
393 set_ipv6_addr(struct sk_buff * skb,u8 l4_proto,__be32 addr[4],const __be32 new_addr[4],bool recalculate_csum) set_ipv6_addr() argument
405 set_ipv6_dsfield(struct sk_buff * skb,struct ipv6hdr * nh,u8 ipv6_tclass,u8 mask) set_ipv6_dsfield() argument
418 set_ipv6_fl(struct sk_buff * skb,struct ipv6hdr * nh,u32 fl,u32 mask) set_ipv6_fl() argument
434 set_ipv6_ttl(struct sk_buff * skb,struct ipv6hdr * nh,u8 new_ttl,u8 mask) set_ipv6_ttl() argument
444 set_ip_ttl(struct sk_buff * skb,struct iphdr * nh,u8 new_ttl,u8 mask) set_ip_ttl() argument
453 set_ipv4(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct ovs_key_ipv4 * key,const struct ovs_key_ipv4 * mask) set_ipv4() argument
505 set_ipv6(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct ovs_key_ipv6 * key,const struct ovs_key_ipv6 * mask) set_ipv6() argument
576 set_tp_port(struct sk_buff * skb,__be16 * port,__be16 new_port,__sum16 * check) set_tp_port() argument
584 set_udp(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct ovs_key_udp * key,const struct ovs_key_udp * mask) set_udp() argument
627 set_tcp(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct ovs_key_tcp * key,const struct ovs_key_tcp * mask) set_tcp() argument
656 set_sctp(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct ovs_key_sctp * key,const struct ovs_key_sctp * mask) set_sctp() argument
691 ovs_vport_output(struct net * net,struct sock * sk,struct sk_buff * skb) ovs_vport_output() argument
739 prepare_frag(struct vport * vport,struct sk_buff * skb,u16 orig_network_offset,u8 mac_proto) prepare_frag() argument
765 ovs_fragment(struct net * net,struct vport * vport,struct sk_buff * skb,u16 mru,struct sw_flow_key * key) ovs_fragment() argument
828 do_output(struct datapath * dp,struct sk_buff * skb,int out_port,struct sw_flow_key * key) do_output() argument
861 output_userspace(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr,const struct nlattr * actions,int actions_len,uint32_t cutlen) output_userspace() argument
921 dec_ttl_exception_handler(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr) dec_ttl_exception_handler() argument
940 sample(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr,bool last) sample() argument
981 clone(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr,bool last) clone() argument
999 execute_hash(struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr) execute_hash() argument
1022 execute_set_action(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct nlattr * a) execute_set_action() argument
1042 execute_masked_set_action(struct sk_buff * skb,struct sw_flow_key * flow_key,const struct nlattr * a) execute_masked_set_action() argument
1114 execute_recirc(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * a,bool last) execute_recirc() argument
1133 execute_check_pkt_len(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr,bool last) execute_check_pkt_len() argument
1172 execute_dec_ttl(struct sk_buff * skb,struct sw_flow_key * key) execute_dec_ttl() argument
1212 execute_psample(struct datapath * dp,struct sk_buff * skb,const struct nlattr * attr) execute_psample() argument
1244 execute_psample(struct datapath * dp,struct sk_buff * skb,const struct nlattr * attr) execute_psample() argument
1250 do_execute_actions(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,const struct nlattr * attr,int len) do_execute_actions() argument
1479 clone_execute(struct datapath * dp,struct sk_buff * skb,struct sw_flow_key * key,u32 recirc_id,const struct nlattr * actions,int len,bool last,bool clone_flow_key) clone_execute() argument
1556 struct sk_buff *skb = da->skb; process_deferred_actions() local
1572 ovs_execute_actions(struct datapath * dp,struct sk_buff * skb,const struct sw_flow_actions * acts,struct sw_flow_key * key) ovs_execute_actions() argument
[all...]
/linux/include/net/
H A 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 …]
H A 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 …]
/linux/net/bridge/
H A Dbr_forward.c22 const struct sk_buff *skb) in should_deliver() argument
27 return ((p->flags & BR_HAIRPIN_MODE) || skb->dev != p->dev) && in should_deliver()
29 br_allowed_egress(vg, skb) && nbp_switchdev_allowed_egress(p, skb) && in should_deliver()
30 !br_skb_isolated(p, skb); in should_deliver()
33 int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb) in br_dev_queue_push_xmit() argument
35 skb_push(skb, ETH_HLEN); in br_dev_queue_push_xmit()
36 if (!is_skb_forwardable(skb->dev, skb)) in br_dev_queue_push_xmit()
39 br_drop_fake_rtable(skb); in br_dev_queue_push_xmit()
41 if (skb->ip_summed == CHECKSUM_PARTIAL && in br_dev_queue_push_xmit()
42 eth_type_vlan(skb->protocol)) { in br_dev_queue_push_xmit()
[all …]
/linux/net/ipv4/
H A Desp4_offload.c31 struct sk_buff *skb) in esp4_gro_receive() argument
33 int offset = skb_gro_offset(skb); in esp4_gro_receive()
40 if (!pskb_pull(skb, offset)) in esp4_gro_receive()
43 if (xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq) != 0) in esp4_gro_receive()
46 xo = xfrm_offload(skb); in esp4_gro_receive()
48 struct sec_path *sp = secpath_set(skb); in esp4_gro_receive()
56 x = xfrm_input_state_lookup(dev_net(skb->dev), skb->mark, in esp4_gro_receive()
57 (xfrm_address_t *)&ip_hdr(skb)->daddr, in esp4_gro_receive()
69 skb->mark = xfrm_smark_get(skb->mark, x); in esp4_gro_receive()
74 xo = xfrm_offload(skb); in esp4_gro_receive()
[all …]
H A Dgre_offload.c16 static struct sk_buff *gre_gso_segment(struct sk_buff *skb, in gre_gso_segment() argument
19 int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb); in gre_gso_segment()
22 u16 mac_offset = skb->mac_header; in gre_gso_segment()
23 __be16 protocol = skb->protocol; in gre_gso_segment()
24 u16 mac_len = skb->mac_len; in gre_gso_segment()
27 if (!skb->encapsulation) in gre_gso_segment()
33 if (unlikely(!pskb_may_pull(skb, tnl_hlen))) in gre_gso_segment()
36 /* setup inner skb. */ in gre_gso_segment()
37 skb->encapsulation = 0; in gre_gso_segment()
38 SKB_GSO_CB(skb)->encap_level = 0; in gre_gso_segment()
[all …]
H A Dip_output.c26 * Alexander Demenshin: Missing sk/skb free in ip_queue_xmit
39 * silently drop skb instead of failing with -EPERM.
90 ip_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
102 int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb) in __ip_local_out() argument
104 struct iphdr *iph = ip_hdr(skb); in __ip_local_out()
108 iph_set_totlen(iph, skb->len); in __ip_local_out()
112 * skb to its handler for processing in __ip_local_out()
114 skb = l3mdev_ip_out(sk, skb); in __ip_local_out()
115 if (unlikely(!skb)) in __ip_local_out()
118 skb->protocol = htons(ETH_P_IP); in __ip_local_out()
[all …]
/linux/net/sched/
H A Dsch_frag.c19 int (*xmit)(struct sk_buff *skb);
27 static int sch_frag_xmit(struct net *net, struct sock *sk, struct sk_buff *skb) in sch_frag_xmit()
32 if (skb_cow_head(skb, data->l2_len) < 0) { in sch_frag_xmit()
33 kfree_skb(skb); in sch_frag_xmit()
37 __skb_dst_copy(skb, data->dst); in sch_frag_xmit()
38 *qdisc_skb_cb(skb) = data->cb; in sch_frag_xmit()
39 skb->inner_protocol = data->inner_protocol; in sch_frag_xmit()
41 __vlan_hwaccel_put_tag(skb, data->vlan_proto, in sch_frag_xmit()
44 __vlan_hwaccel_clear_tag(skb); in sch_frag_xmit()
47 skb_push(skb, dat in sch_frag_xmit()
23 sch_frag_xmit(struct net * net,struct sock * sk,struct sk_buff * skb) sch_frag_xmit() argument
50 sch_frag_prepare_frag(struct sk_buff * skb,int (* xmit)(struct sk_buff * skb)) sch_frag_prepare_frag() argument
51 sch_frag_prepare_frag(struct sk_buff * skb,int (* xmit)(struct sk_buff * skb)) sch_frag_prepare_frag() argument
84 sch_fragment(struct net * net,struct sk_buff * skb,u16 mru,int (* xmit)(struct sk_buff * skb)) sch_fragment() argument
85 sch_fragment(struct net * net,struct sk_buff * skb,u16 mru,int (* xmit)(struct sk_buff * skb)) sch_fragment() argument
140 sch_frag_xmit_hook(struct sk_buff * skb,int (* xmit)(struct sk_buff * skb)) sch_frag_xmit_hook() argument
[all...]
/linux/drivers/net/ethernet/qualcomm/rmnet/
H A Drmnet_handlers.c22 static void rmnet_set_skb_proto(struct sk_buff *skb) in rmnet_set_skb_proto() argument
24 switch (skb->data[0] & 0xF0) { in rmnet_set_skb_proto()
26 skb->protocol = htons(ETH_P_IP); in rmnet_set_skb_proto()
29 skb->protocol = htons(ETH_P_IPV6); in rmnet_set_skb_proto()
32 skb->protocol = htons(ETH_P_MAP); in rmnet_set_skb_proto()
40 rmnet_deliver_skb(struct sk_buff *skb) in rmnet_deliver_skb() argument
42 struct rmnet_priv *priv = netdev_priv(skb->dev); in rmnet_deliver_skb()
44 skb_reset_transport_header(skb); in rmnet_deliver_skb()
45 skb_reset_network_header(skb); in rmnet_deliver_skb()
46 rmnet_vnd_rx_fixup(skb, skb->dev); in rmnet_deliver_skb()
[all …]
/linux/net/netfilter/
H A Dnf_flow_table_ip.c26 struct sk_buff *skb, unsigned int thoff) in nf_flow_state_check() argument
33 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_state_check()
46 static void nf_flow_nat_ip_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_tcp() argument
51 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_tcp()
52 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, true); in nf_flow_nat_ip_tcp()
55 static void nf_flow_nat_ip_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_udp() argument
60 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_udp()
61 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { in nf_flow_nat_ip_udp()
62 inet_proto_csum_replace4(&udph->check, skb, addr, in nf_flow_nat_ip_udp()
69 static void nf_flow_nat_ip_l4proto(struct sk_buff *skb, struct iphdr *iph, in nf_flow_nat_ip_l4proto() argument
[all …]
/linux/drivers/net/wireguard/
H A Dreceive.c26 #define SKB_TYPE_LE32(skb) (((struct message_header *)(skb)->data)->type) argument
28 static size_t validate_header_len(struct sk_buff *skb) in validate_header_len() argument
30 if (unlikely(skb->len < sizeof(struct message_header))) in validate_header_len()
32 if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_DATA) && in validate_header_len()
33 skb->len >= MESSAGE_MINIMUM_LENGTH) in validate_header_len()
35 if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_INITIATION) && in validate_header_len()
36 skb->len == sizeof(struct message_handshake_initiation)) in validate_header_len()
38 if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_RESPONSE) && in validate_header_len()
39 skb->len == sizeof(struct message_handshake_response)) in validate_header_len()
41 if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_COOKIE) && in validate_header_len()
[all …]
/linux/net/smc/
H A Dsmc_stats.c45 static int smc_nl_fill_stats_rmb_data(struct sk_buff *skb, in smc_nl_fill_stats_rmb_data() argument
57 attrs = nla_nest_start(skb, type); in smc_nl_fill_stats_rmb_data()
60 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_REUSE_CNT, in smc_nl_fill_stats_rmb_data()
64 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_SIZE_SM_PEER_CNT, in smc_nl_fill_stats_rmb_data()
68 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_SIZE_SM_CNT, in smc_nl_fill_stats_rmb_data()
72 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_FULL_PEER_CNT, in smc_nl_fill_stats_rmb_data()
76 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_FULL_CNT, in smc_nl_fill_stats_rmb_data()
80 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_ALLOC_CNT, in smc_nl_fill_stats_rmb_data()
84 if (nla_put_u64_64bit(skb, SMC_NLA_STATS_RMB_DGRADE_CNT, in smc_nl_fill_stats_rmb_data()
89 nla_nest_end(skb, attrs); in smc_nl_fill_stats_rmb_data()
[all …]
/linux/net/ieee802154/6lowpan/
H A Drx.c21 static int lowpan_give_skb_to_device(struct sk_buff *skb) in lowpan_give_skb_to_device() argument
23 skb->protocol = htons(ETH_P_IPV6); in lowpan_give_skb_to_device()
24 skb->dev->stats.rx_packets++; in lowpan_give_skb_to_device()
25 skb->dev->stats.rx_bytes += skb->len; in lowpan_give_skb_to_device()
27 return netif_rx(skb); in lowpan_give_skb_to_device()
30 static int lowpan_rx_handlers_result(struct sk_buff *skb, lowpan_rx_result res) in lowpan_rx_handlers_result() argument
40 kfree_skb(skb); in lowpan_rx_handlers_result()
46 return lowpan_give_skb_to_device(skb); in lowpan_rx_handlers_result()
64 static lowpan_rx_result lowpan_rx_h_frag(struct sk_buff *skb) in lowpan_rx_h_frag() argument
68 if (!(lowpan_is_frag1(*skb_network_header(skb)) || in lowpan_rx_h_frag()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/
H A Dccm_mbox.c13 * form a batch. Threads come in with CMSG formed in an skb, then
14 * enqueue that skb onto the request queue. If threads skb is first
20 * (response is copied into the same skb as the request, overwriting
62 nfp_ccm_mbox_msg_init(struct sk_buff *skb, unsigned int exp_reply, int max_len) in nfp_ccm_mbox_msg_init() argument
64 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_msg_init()
73 static int nfp_ccm_mbox_maxlen(const struct sk_buff *skb) in nfp_ccm_mbox_maxlen() argument
75 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_maxlen()
80 static bool nfp_ccm_mbox_done(struct sk_buff *skb) in nfp_ccm_mbox_done() argument
82 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_done()
87 static bool nfp_ccm_mbox_in_progress(struct sk_buff *skb) in nfp_ccm_mbox_in_progress() argument
[all …]
/linux/net/devlink/
H A Ddpipe.c60 int devlink_dpipe_match_put(struct sk_buff *skb, in devlink_dpipe_match_put() argument
67 match_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_MATCH); in devlink_dpipe_match_put()
71 if (nla_put_u32(skb, DEVLINK_ATTR_DPIPE_MATCH_TYPE, match->type) || in devlink_dpipe_match_put()
72 nla_put_u32(skb, DEVLINK_ATTR_DPIPE_HEADER_INDEX, match->header_index) || in devlink_dpipe_match_put()
73 nla_put_u32(skb, DEVLINK_ATTR_DPIPE_HEADER_ID, header->id) || in devlink_dpipe_match_put()
74 nla_put_u32(skb, DEVLINK_ATTR_DPIPE_FIELD_ID, field->id) || in devlink_dpipe_match_put()
75 nla_put_u8(skb, DEVLINK_ATTR_DPIPE_HEADER_GLOBAL, header->global)) in devlink_dpipe_match_put()
78 nla_nest_end(skb, match_attr); in devlink_dpipe_match_put()
82 nla_nest_cancel(skb, match_attr); in devlink_dpipe_match_put()
88 struct sk_buff *skb) in devlink_dpipe_matches_put() argument
[all …]

12345678910>>...92