Home
last modified time | relevance | path

Searched refs:nskb (Results 1 – 25 of 96) sorted by relevance

1234

/Linux-v5.15/net/ipv4/netfilter/
Dnf_reject_ipv4.c45 struct sk_buff *nskb; in nf_reject_skb_v4_tcp_reset() local
56 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct tcphdr) + in nf_reject_skb_v4_tcp_reset()
58 if (!nskb) in nf_reject_skb_v4_tcp_reset()
61 nskb->dev = (struct net_device *)dev; in nf_reject_skb_v4_tcp_reset()
63 skb_reserve(nskb, LL_MAX_HEADER); in nf_reject_skb_v4_tcp_reset()
64 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_TCP, in nf_reject_skb_v4_tcp_reset()
66 nf_reject_ip_tcphdr_put(nskb, oldskb, oth); in nf_reject_skb_v4_tcp_reset()
67 niph->tot_len = htons(nskb->len); in nf_reject_skb_v4_tcp_reset()
70 return nskb; in nf_reject_skb_v4_tcp_reset()
79 struct sk_buff *nskb; in nf_reject_skb_v4_unreach() local
[all …]
/Linux-v5.15/net/llc/
Dllc_c_ac.c202 struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); in llc_conn_ac_send_disc_cmd_p_set_x() local
204 if (nskb) { in llc_conn_ac_send_disc_cmd_p_set_x()
207 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_send_disc_cmd_p_set_x()
209 llc_pdu_init_as_disc_cmd(nskb, 1); in llc_conn_ac_send_disc_cmd_p_set_x()
210 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_disc_cmd_p_set_x()
213 llc_conn_send_pdu(sk, nskb); in llc_conn_ac_send_disc_cmd_p_set_x()
219 kfree_skb(nskb); in llc_conn_ac_send_disc_cmd_p_set_x()
227 struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); in llc_conn_ac_send_dm_rsp_f_set_p() local
229 if (nskb) { in llc_conn_ac_send_dm_rsp_f_set_p()
234 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_send_dm_rsp_f_set_p()
[all …]
Dllc_station.c52 struct sk_buff *nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, in llc_station_ac_send_xid_r() local
55 if (!nskb) in llc_station_ac_send_xid_r()
59 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); in llc_station_ac_send_xid_r()
60 llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127); in llc_station_ac_send_xid_r()
61 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da); in llc_station_ac_send_xid_r()
64 dev_queue_xmit(nskb); in llc_station_ac_send_xid_r()
68 kfree_skb(nskb); in llc_station_ac_send_xid_r()
77 struct sk_buff *nskb; in llc_station_ac_send_test_r() local
81 nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, data_size); in llc_station_ac_send_test_r()
83 if (!nskb) in llc_station_ac_send_test_r()
[all …]
Dllc_s_ac.c105 struct sk_buff *nskb; in llc_sap_action_send_xid_r() local
110 nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, in llc_sap_action_send_xid_r()
112 if (!nskb) in llc_sap_action_send_xid_r()
114 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, in llc_sap_action_send_xid_r()
116 llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 0); in llc_sap_action_send_xid_r()
117 rc = llc_mac_hdr_init(nskb, mac_sa, mac_da); in llc_sap_action_send_xid_r()
119 rc = dev_queue_xmit(nskb); in llc_sap_action_send_xid_r()
152 struct sk_buff *nskb; in llc_sap_action_send_test_r() local
162 nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, data_size); in llc_sap_action_send_test_r()
163 if (!nskb) in llc_sap_action_send_test_r()
[all …]
/Linux-v5.15/net/ipv6/netfilter/
Dnf_reject_ipv6.c64 struct sk_buff *nskb; in nf_reject_skb_v6_tcp_reset() local
77 nskb = alloc_skb(sizeof(struct ipv6hdr) + sizeof(struct tcphdr) + in nf_reject_skb_v6_tcp_reset()
79 if (!nskb) in nf_reject_skb_v6_tcp_reset()
82 nskb->dev = (struct net_device *)dev; in nf_reject_skb_v6_tcp_reset()
84 skb_reserve(nskb, LL_MAX_HEADER); in nf_reject_skb_v6_tcp_reset()
85 nip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_TCP, in nf_reject_skb_v6_tcp_reset()
87 nf_reject_ip6_tcphdr_put(nskb, oldskb, oth, otcplen); in nf_reject_skb_v6_tcp_reset()
88 nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr)); in nf_reject_skb_v6_tcp_reset()
90 return nskb; in nf_reject_skb_v6_tcp_reset()
99 struct sk_buff *nskb; in nf_reject_skb_v6_unreach() local
[all …]
/Linux-v5.15/net/bridge/netfilter/
Dnft_reject_bridge.c24 struct sk_buff *nskb) in nft_reject_br_push_etherhdr() argument
28 eth = skb_push(nskb, ETH_HLEN); in nft_reject_br_push_etherhdr()
29 skb_reset_mac_header(nskb); in nft_reject_br_push_etherhdr()
33 skb_pull(nskb, ETH_HLEN); in nft_reject_br_push_etherhdr()
38 __vlan_hwaccel_put_tag(nskb, oldskb->vlan_proto, vid); in nft_reject_br_push_etherhdr()
50 struct sk_buff *nskb; in nft_reject_br_send_v4_tcp_reset() local
52 nskb = nf_reject_skb_v4_tcp_reset(net, oldskb, dev, hook); in nft_reject_br_send_v4_tcp_reset()
53 if (!nskb) in nft_reject_br_send_v4_tcp_reset()
56 nft_reject_br_push_etherhdr(oldskb, nskb); in nft_reject_br_send_v4_tcp_reset()
58 br_forward(br_port_get_rcu(dev), nskb, false, true); in nft_reject_br_send_v4_tcp_reset()
[all …]
/Linux-v5.15/net/netfilter/
Dnft_reject_netdev.c18 static void nft_reject_queue_xmit(struct sk_buff *nskb, struct sk_buff *oldskb) in nft_reject_queue_xmit() argument
20 dev_hard_header(nskb, nskb->dev, ntohs(oldskb->protocol), in nft_reject_queue_xmit()
22 nskb->len); in nft_reject_queue_xmit()
23 dev_queue_xmit(nskb); in nft_reject_queue_xmit()
31 struct sk_buff *nskb; in nft_reject_netdev_send_v4_tcp_reset() local
33 nskb = nf_reject_skb_v4_tcp_reset(net, oldskb, dev, hook); in nft_reject_netdev_send_v4_tcp_reset()
34 if (!nskb) in nft_reject_netdev_send_v4_tcp_reset()
37 nft_reject_queue_xmit(nskb, oldskb); in nft_reject_netdev_send_v4_tcp_reset()
45 struct sk_buff *nskb; in nft_reject_netdev_send_v4_unreach() local
47 nskb = nf_reject_skb_v4_unreach(net, oldskb, dev, hook, code); in nft_reject_netdev_send_v4_unreach()
[all …]
Dnf_synproxy_core.c442 const struct sk_buff *skb, struct sk_buff *nskb, in synproxy_send_tcp() argument
448 nskb->ip_summed = CHECKSUM_PARTIAL; in synproxy_send_tcp()
449 nskb->csum_start = (unsigned char *)nth - nskb->head; in synproxy_send_tcp()
450 nskb->csum_offset = offsetof(struct tcphdr, check); in synproxy_send_tcp()
452 skb_dst_set_noref(nskb, skb_dst(skb)); in synproxy_send_tcp()
453 nskb->protocol = htons(ETH_P_IP); in synproxy_send_tcp()
454 if (ip_route_me_harder(net, nskb->sk, nskb, RTN_UNSPEC)) in synproxy_send_tcp()
458 nf_ct_set(nskb, (struct nf_conn *)nfct, ctinfo); in synproxy_send_tcp()
462 ip_local_out(net, nskb->sk, nskb); in synproxy_send_tcp()
466 kfree_skb(nskb); in synproxy_send_tcp()
[all …]
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
Dtls_rxtx.c144 struct sk_buff *nskb, u32 tcp_seq, in mlx5e_tls_complete_sync_skb() argument
153 nskb->dev = skb->dev; in mlx5e_tls_complete_sync_skb()
154 skb_reset_mac_header(nskb); in mlx5e_tls_complete_sync_skb()
155 skb_set_network_header(nskb, skb_network_offset(skb)); in mlx5e_tls_complete_sync_skb()
156 skb_set_transport_header(nskb, skb_transport_offset(skb)); in mlx5e_tls_complete_sync_skb()
157 memcpy(nskb->data, skb->data, headln); in mlx5e_tls_complete_sync_skb()
158 memcpy(nskb->data + headln, &rcd_sn, sizeof(rcd_sn)); in mlx5e_tls_complete_sync_skb()
160 iph = ip_hdr(nskb); in mlx5e_tls_complete_sync_skb()
161 iph->tot_len = htons(nskb->len - skb_network_offset(nskb)); in mlx5e_tls_complete_sync_skb()
162 th = tcp_hdr(nskb); in mlx5e_tls_complete_sync_skb()
[all …]
/Linux-v5.15/net/tls/
Dtls_device_fallback.c195 static void complete_skb(struct sk_buff *nskb, struct sk_buff *skb, int headln) in complete_skb() argument
200 skb_copy_header(nskb, skb); in complete_skb()
202 skb_put(nskb, skb->len); in complete_skb()
203 memcpy(nskb->data, skb->data, headln); in complete_skb()
205 nskb->destructor = skb->destructor; in complete_skb()
206 nskb->sk = sk; in complete_skb()
210 update_chksum(nskb, headln); in complete_skb()
213 if (nskb->destructor == sock_efree) in complete_skb()
216 delta = nskb->truesize - skb->truesize; in complete_skb()
294 struct sk_buff *nskb, in fill_sg_out() argument
[all …]
/Linux-v5.15/net/bluetooth/cmtp/
Dcore.c109 struct sk_buff *skb = session->reassembly[id], *nskb; in cmtp_add_msgpart() local
116 nskb = alloc_skb(size, GFP_ATOMIC); in cmtp_add_msgpart()
117 if (!nskb) { in cmtp_add_msgpart()
123 skb_copy_from_linear_data(skb, skb_put(nskb, skb->len), skb->len); in cmtp_add_msgpart()
125 skb_put_data(nskb, buf, count); in cmtp_add_msgpart()
127 session->reassembly[id] = nskb; in cmtp_add_msgpart()
211 struct sk_buff *skb, *nskb; in cmtp_process_transmit() local
217 nskb = alloc_skb(session->mtu, GFP_ATOMIC); in cmtp_process_transmit()
218 if (!nskb) { in cmtp_process_transmit()
226 tail = session->mtu - nskb->len; in cmtp_process_transmit()
[all …]
/Linux-v5.15/drivers/bluetooth/
Dhci_bcsp.c166 struct sk_buff *nskb; in bcsp_prepare_pkt() local
218 nskb = alloc_skb((len + 6) * 2 + 2, GFP_ATOMIC); in bcsp_prepare_pkt()
219 if (!nskb) in bcsp_prepare_pkt()
222 hci_skb_pkt_type(nskb) = pkt_type; in bcsp_prepare_pkt()
224 bcsp_slip_msgdelim(nskb); in bcsp_prepare_pkt()
245 bcsp_slip_one_byte(nskb, hdr[i]); in bcsp_prepare_pkt()
253 bcsp_slip_one_byte(nskb, data[i]); in bcsp_prepare_pkt()
262 bcsp_slip_one_byte(nskb, (u8)((bcsp_txmsg_crc >> 8) & 0x00ff)); in bcsp_prepare_pkt()
263 bcsp_slip_one_byte(nskb, (u8)(bcsp_txmsg_crc & 0x00ff)); in bcsp_prepare_pkt()
266 bcsp_slip_msgdelim(nskb); in bcsp_prepare_pkt()
[all …]
Dhci_h5.c128 struct sk_buff *nskb; in h5_link_control() local
130 nskb = alloc_skb(3, GFP_ATOMIC); in h5_link_control()
131 if (!nskb) in h5_link_control()
134 hci_skb_pkt_type(nskb) = HCI_3WIRE_LINK_PKT; in h5_link_control()
136 skb_put_data(nskb, data, len); in h5_link_control()
138 skb_queue_tail(&h5->unrel, nskb); in h5_link_control()
680 struct sk_buff *nskb; in h5_prepare_pkt() local
695 nskb = alloc_skb((len + 6) * 2 + 2, GFP_ATOMIC); in h5_prepare_pkt()
696 if (!nskb) in h5_prepare_pkt()
699 hci_skb_pkt_type(nskb) = pkt_type; in h5_prepare_pkt()
[all …]
/Linux-v5.15/net/bluetooth/bnep/
Dcore.c301 struct sk_buff *nskb; in bnep_rx_frame() local
366 nskb = alloc_skb(2 + ETH_HLEN + skb->len, GFP_KERNEL); in bnep_rx_frame()
367 if (!nskb) { in bnep_rx_frame()
372 skb_reserve(nskb, 2); in bnep_rx_frame()
377 __skb_put_data(nskb, &s->eh, ETH_HLEN); in bnep_rx_frame()
381 __skb_put_data(nskb, s->eh.h_dest, ETH_ALEN); in bnep_rx_frame()
382 __skb_put_data(nskb, skb_mac_header(skb), ETH_ALEN); in bnep_rx_frame()
383 put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2)); in bnep_rx_frame()
387 __skb_put_data(nskb, skb_mac_header(skb), ETH_ALEN); in bnep_rx_frame()
388 __skb_put_data(nskb, s->eh.h_source, ETH_ALEN + 2); in bnep_rx_frame()
[all …]
/Linux-v5.15/include/linux/can/
Dskb.h85 struct sk_buff *nskb; in can_create_echo_skb() local
87 nskb = skb_clone(skb, GFP_ATOMIC); in can_create_echo_skb()
88 if (unlikely(!nskb)) { in can_create_echo_skb()
93 can_skb_set_owner(nskb, skb->sk); in can_create_echo_skb()
95 return nskb; in can_create_echo_skb()
/Linux-v5.15/net/vmw_vsock/
Daf_vsock_tap.c64 struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); in __vsock_deliver_tap_skb() local
66 if (nskb) { in __vsock_deliver_tap_skb()
69 nskb->dev = dev; in __vsock_deliver_tap_skb()
70 ret = dev_queue_xmit(nskb); in __vsock_deliver_tap_skb()
/Linux-v5.15/drivers/net/wireless/ath/ath9k/
Dhif_usb.c313 struct sk_buff *nskb = NULL; in __hif_usb_tx() local
333 nskb = __skb_dequeue(&hif_dev->tx.tx_skb_queue); in __hif_usb_tx()
336 BUG_ON(!nskb); in __hif_usb_tx()
343 *hdr++ = cpu_to_le16(nskb->len); in __hif_usb_tx()
346 memcpy(buf, nskb->data, nskb->len); in __hif_usb_tx()
347 tx_buf->len = nskb->len + 4; in __hif_usb_tx()
355 __skb_queue_tail(&tx_buf->skb_queue, nskb); in __hif_usb_tx()
541 struct sk_buff *nskb, *skb_pool[MAX_PKT_NUM_IN_TRANSFER]; in ath9k_hif_usb_rx_stream() local
607 nskb = __dev_alloc_skb(pkt_len + 32, GFP_ATOMIC); in ath9k_hif_usb_rx_stream()
608 if (!nskb) { in ath9k_hif_usb_rx_stream()
[all …]
/Linux-v5.15/net/sched/
Dsch_etf.c75 static bool is_packet_valid(struct Qdisc *sch, struct sk_buff *nskb) in is_packet_valid() argument
78 ktime_t txtime = nskb->tstamp; in is_packet_valid()
79 struct sock *sk = nskb->sk; in is_packet_valid()
162 static int etf_enqueue_timesortedlist(struct sk_buff *nskb, struct Qdisc *sch, in etf_enqueue_timesortedlist() argument
167 ktime_t txtime = nskb->tstamp; in etf_enqueue_timesortedlist()
170 if (!is_packet_valid(sch, nskb)) { in etf_enqueue_timesortedlist()
171 report_sock_error(nskb, EINVAL, in etf_enqueue_timesortedlist()
173 return qdisc_drop(nskb, sch, to_free); in etf_enqueue_timesortedlist()
188 rb_link_node(&nskb->rbnode, parent, p); in etf_enqueue_timesortedlist()
189 rb_insert_color_cached(&nskb->rbnode, &q->head, leftmost); in etf_enqueue_timesortedlist()
[all …]
/Linux-v5.15/net/mac802154/
Dtx.c58 struct sk_buff *nskb; in ieee802154_tx() local
62 nskb = skb_copy_expand(skb, 0, IEEE802154_FCS_LEN, in ieee802154_tx()
64 if (likely(nskb)) { in ieee802154_tx()
66 skb = nskb; in ieee802154_tx()
/Linux-v5.15/net/can/
Disotp.c183 struct sk_buff *nskb; in isotp_send_fc() local
188 nskb = alloc_skb(so->ll.mtu + sizeof(struct can_skb_priv), gfp_any()); in isotp_send_fc()
189 if (!nskb) in isotp_send_fc()
194 kfree_skb(nskb); in isotp_send_fc()
198 can_skb_reserve(nskb); in isotp_send_fc()
199 can_skb_prv(nskb)->ifindex = dev->ifindex; in isotp_send_fc()
200 can_skb_prv(nskb)->skbcnt = 0; in isotp_send_fc()
202 nskb->dev = dev; in isotp_send_fc()
203 can_skb_set_owner(nskb, sk); in isotp_send_fc()
204 ncf = (struct canfd_frame *)nskb->data; in isotp_send_fc()
[all …]
/Linux-v5.15/drivers/isdn/mISDN/
Ddsp_core.c283 struct sk_buff *nskb; in dsp_control_req() local
589 nskb = _alloc_mISDN_skb(PH_CONTROL_IND, MISDN_ID_ANY, in dsp_control_req()
591 if (nskb) { in dsp_control_req()
593 if (dsp->up->send(dsp->up, nskb)) in dsp_control_req()
594 dev_kfree_skb(nskb); in dsp_control_req()
596 dev_kfree_skb(nskb); in dsp_control_req()
741 struct sk_buff *nskb; in dsp_function() local
747 nskb = _alloc_mISDN_skb(PH_CONTROL_IND, in dsp_function()
750 if (nskb) { in dsp_function()
753 dsp->up, nskb)) in dsp_function()
[all …]
/Linux-v5.15/net/dsa/
Dtag_brcm.c186 struct sk_buff *nskb; in brcm_tag_rcv() local
189 nskb = brcm_tag_rcv_ll(skb, dev, 2); in brcm_tag_rcv()
190 if (!nskb) in brcm_tag_rcv()
191 return nskb; in brcm_tag_rcv()
195 return nskb; in brcm_tag_rcv()
Ddsa.c229 struct sk_buff *nskb = NULL; in dsa_switch_rcv() local
241 nskb = cpu_dp->rcv(skb, dev); in dsa_switch_rcv()
242 if (!nskb) { in dsa_switch_rcv()
247 skb = nskb; in dsa_switch_rcv()
264 nskb = dsa_untag_bridge_pvid(skb); in dsa_switch_rcv()
265 if (!nskb) { in dsa_switch_rcv()
269 skb = nskb; in dsa_switch_rcv()
/Linux-v5.15/net/x25/
Dx25_dev.c97 struct sk_buff *nskb; in x25_lapb_receive_frame() local
103 nskb = skb_copy(skb, GFP_ATOMIC); in x25_lapb_receive_frame()
104 if (!nskb) in x25_lapb_receive_frame()
107 skb = nskb; in x25_lapb_receive_frame()
/Linux-v5.15/net/core/
Dskbuff.c1380 static int skb_zerocopy_clone(struct sk_buff *nskb, struct sk_buff *orig, in skb_zerocopy_clone() argument
1384 if (skb_zcopy(nskb)) { in skb_zerocopy_clone()
1390 if (skb_uarg(nskb) == skb_uarg(orig)) in skb_zerocopy_clone()
1392 if (skb_copy_ubufs(nskb, GFP_ATOMIC)) in skb_zerocopy_clone()
1395 skb_zcopy_set(nskb, skb_uarg(orig), NULL); in skb_zerocopy_clone()
1818 struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); in skb_expand_head() local
1820 if (unlikely(!nskb)) in skb_expand_head()
1824 skb_set_owner_w(nskb, sk); in skb_expand_head()
1826 skb = nskb; in skb_expand_head()
3856 struct sk_buff *nskb, *tmp; in skb_segment_list() local
[all …]

1234