Searched refs:nc_packet (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/net/batman-adv/
H A Dnetwork-coding.c212 * @nc_packet: the nc packet to free
214 static void batadv_nc_packet_free(struct batadv_nc_packet *nc_packet) batadv_nc_packet_free() argument
216 if (nc_packet->skb) batadv_nc_packet_free()
217 kfree_skb(nc_packet->skb); batadv_nc_packet_free()
219 batadv_nc_path_free_ref(nc_packet->nc_path); batadv_nc_packet_free()
220 kfree(nc_packet); batadv_nc_packet_free()
532 * batadv_nc_send_packet - send non-coded packet and free nc_packet struct
533 * @nc_packet: the nc packet to send
535 static void batadv_nc_send_packet(struct batadv_nc_packet *nc_packet) batadv_nc_send_packet() argument
537 batadv_send_skb_packet(nc_packet->skb, batadv_nc_send_packet()
538 nc_packet->neigh_node->if_incoming, batadv_nc_send_packet()
539 nc_packet->nc_path->next_hop); batadv_nc_send_packet()
540 nc_packet->skb = NULL; batadv_nc_send_packet()
541 batadv_nc_packet_free(nc_packet); batadv_nc_send_packet()
545 * batadv_nc_sniffed_purge - Checks timestamp of given sniffed nc_packet.
548 * @nc_packet: the nc packet to be checked
550 * Checks whether the given sniffed (overheard) nc_packet has hit its buffering
559 struct batadv_nc_packet *nc_packet) batadv_nc_sniffed_purge()
568 !batadv_has_timed_out(nc_packet->timestamp, timeout)) batadv_nc_sniffed_purge()
572 list_del(&nc_packet->list); batadv_nc_sniffed_purge()
573 batadv_nc_packet_free(nc_packet); batadv_nc_sniffed_purge()
585 * @nc_packet: the nc packet to be checked
596 struct batadv_nc_packet *nc_packet) batadv_nc_fwd_flush()
604 !batadv_has_timed_out(nc_packet->timestamp, timeout)) batadv_nc_fwd_flush()
610 nc_packet->skb->len + ETH_HLEN); batadv_nc_fwd_flush()
611 list_del(&nc_packet->list); batadv_nc_fwd_flush()
612 batadv_nc_send_packet(nc_packet); batadv_nc_fwd_flush()
634 struct batadv_nc_packet *nc_packet, *nc_packet_tmp; batadv_nc_process_nc_paths() local
651 list_for_each_entry_safe(nc_packet, nc_packet_tmp, hlist_for_each_entry_rcu()
653 ret = process_fn(bat_priv, nc_path, nc_packet); hlist_for_each_entry_rcu()
1004 * @nc_packet: structure containing the packet to the skb can be coded with
1012 struct batadv_nc_packet *nc_packet, batadv_nc_code_packets()
1046 neigh_tmp = nc_packet->neigh_node; batadv_nc_code_packets()
1066 /* Destination from nc_packet is selected for MAC-header */ batadv_nc_code_packets()
1067 first_dest = nc_packet->nc_path->next_hop; batadv_nc_code_packets()
1068 first_source = nc_packet->nc_path->prev_hop; batadv_nc_code_packets()
1071 packet1 = (struct batadv_unicast_packet *)nc_packet->skb->data; batadv_nc_code_packets()
1073 packet_id1 = nc_packet->packet_id; batadv_nc_code_packets()
1080 second_dest = nc_packet->nc_path->next_hop; batadv_nc_code_packets()
1081 second_source = nc_packet->nc_path->prev_hop; batadv_nc_code_packets()
1083 packet2 = (struct batadv_unicast_packet *)nc_packet->skb->data; batadv_nc_code_packets()
1086 packet_id2 = nc_packet->packet_id; batadv_nc_code_packets()
1092 if (skb->len <= nc_packet->skb->len) { batadv_nc_code_packets()
1093 skb_dest = nc_packet->skb; batadv_nc_code_packets()
1097 skb_src = nc_packet->skb; batadv_nc_code_packets()
1172 /* avoid duplicate free of skb from nc_packet */ batadv_nc_code_packets()
1173 nc_packet->skb = NULL; batadv_nc_code_packets()
1174 batadv_nc_packet_free(nc_packet); batadv_nc_code_packets()
1236 struct batadv_nc_packet *nc_packet, *nc_packet_tmp; batadv_nc_path_search() local
1263 list_for_each_entry_safe(nc_packet, nc_packet_tmp, batadv_nc_path_search()
1265 if (!batadv_nc_skb_coding_possible(nc_packet->skb, batadv_nc_path_search()
1271 list_del(&nc_packet->list); batadv_nc_path_search()
1272 nc_packet_out = nc_packet; batadv_nc_path_search()
1304 struct batadv_nc_packet *nc_packet = NULL; batadv_nc_skb_src_search() local
1319 nc_packet = batadv_nc_path_search(bat_priv, in_nc_node, batadv_nc_skb_src_search()
1321 if (nc_packet) batadv_nc_skb_src_search()
1327 return nc_packet; batadv_nc_skb_src_search()
1386 struct batadv_nc_packet *nc_packet = NULL; batadv_nc_skb_dst_search() local
1391 nc_packet = batadv_nc_skb_src_search(bat_priv, skb, batadv_nc_skb_dst_search()
1396 if (nc_packet) batadv_nc_skb_dst_search()
1401 if (!nc_packet) batadv_nc_skb_dst_search()
1407 batadv_nc_skb_store_before_coding(bat_priv, nc_packet->skb, batadv_nc_skb_dst_search()
1408 nc_packet->neigh_node->addr); batadv_nc_skb_dst_search()
1411 if (batadv_nc_code_packets(bat_priv, skb, ethhdr, nc_packet, batadv_nc_skb_dst_search()
1419 batadv_nc_send_packet(nc_packet); batadv_nc_skb_dst_search()
1437 struct batadv_nc_packet *nc_packet; batadv_nc_skb_add_to_path() local
1439 nc_packet = kzalloc(sizeof(*nc_packet), GFP_ATOMIC); batadv_nc_skb_add_to_path()
1440 if (!nc_packet) batadv_nc_skb_add_to_path()
1443 /* Initialize nc_packet */ batadv_nc_skb_add_to_path()
1444 nc_packet->timestamp = jiffies; batadv_nc_skb_add_to_path()
1445 nc_packet->packet_id = packet_id; batadv_nc_skb_add_to_path()
1446 nc_packet->skb = skb; batadv_nc_skb_add_to_path()
1447 nc_packet->neigh_node = neigh_node; batadv_nc_skb_add_to_path()
1448 nc_packet->nc_path = nc_path; batadv_nc_skb_add_to_path()
1452 list_add_tail(&nc_packet->list, &nc_path->packet_list); batadv_nc_skb_add_to_path()
1598 * in nc_packet
1601 * @nc_packet: decode data needed to decode the skb
1608 struct batadv_nc_packet *nc_packet) batadv_nc_skb_decode_packet()
1668 nc_packet->skb->data + h_size, batadv_nc_skb_decode_packet()
1672 if (nc_packet->skb->len > coding_len + h_size) { batadv_nc_skb_decode_packet()
1686 batadv_nc_packet_free(nc_packet); batadv_nc_skb_decode_packet()
1705 struct batadv_nc_packet *tmp_nc_packet, *nc_packet = NULL; batadv_nc_find_decoding_packet() local
1730 /* Find matching nc_packet */ batadv_nc_find_decoding_packet()
1737 nc_packet = tmp_nc_packet; batadv_nc_find_decoding_packet()
1743 if (nc_packet) batadv_nc_find_decoding_packet()
1748 if (!nc_packet) batadv_nc_find_decoding_packet()
1752 return nc_packet; batadv_nc_find_decoding_packet()
1767 struct batadv_nc_packet *nc_packet; batadv_nc_recv_coded_packet() local
1791 nc_packet = batadv_nc_find_decoding_packet(bat_priv, ethhdr, batadv_nc_recv_coded_packet()
1793 if (!nc_packet) { batadv_nc_recv_coded_packet()
1802 if (skb_linearize(nc_packet->skb) < 0) batadv_nc_recv_coded_packet()
1806 unicast_packet = batadv_nc_skb_decode_packet(bat_priv, skb, nc_packet); batadv_nc_recv_coded_packet()
1820 batadv_nc_packet_free(nc_packet); batadv_nc_recv_coded_packet()
557 batadv_nc_sniffed_purge(struct batadv_priv *bat_priv, struct batadv_nc_path *nc_path, struct batadv_nc_packet *nc_packet) batadv_nc_sniffed_purge() argument
594 batadv_nc_fwd_flush(struct batadv_priv *bat_priv, struct batadv_nc_path *nc_path, struct batadv_nc_packet *nc_packet) batadv_nc_fwd_flush() argument
1009 batadv_nc_code_packets(struct batadv_priv *bat_priv, struct sk_buff *skb, struct ethhdr *ethhdr, struct batadv_nc_packet *nc_packet, struct batadv_neigh_node *neigh_node) batadv_nc_code_packets() argument
1607 batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb, struct batadv_nc_packet *nc_packet) batadv_nc_skb_decode_packet() argument

Completed in 36 milliseconds