Lines Matching refs:pkc

490 static void prb_del_retire_blk_timer(struct tpacket_kbdq_core *pkc)  in prb_del_retire_blk_timer()  argument
492 del_timer_sync(&pkc->retire_blk_timer); in prb_del_retire_blk_timer()
498 struct tpacket_kbdq_core *pkc; in prb_shutdown_retire_blk_timer() local
500 pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in prb_shutdown_retire_blk_timer()
503 pkc->delete_blk_timer = 1; in prb_shutdown_retire_blk_timer()
506 prb_del_retire_blk_timer(pkc); in prb_shutdown_retire_blk_timer()
511 struct tpacket_kbdq_core *pkc; in prb_setup_retire_blk_timer() local
513 pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in prb_setup_retire_blk_timer()
514 timer_setup(&pkc->retire_blk_timer, prb_retire_rx_blk_timer_expired, in prb_setup_retire_blk_timer()
516 pkc->retire_blk_timer.expires = jiffies; in prb_setup_retire_blk_timer()
604 static void _prb_refresh_rx_retire_blk_timer(struct tpacket_kbdq_core *pkc) in _prb_refresh_rx_retire_blk_timer() argument
606 mod_timer(&pkc->retire_blk_timer, in _prb_refresh_rx_retire_blk_timer()
607 jiffies + pkc->tov_in_jiffies); in _prb_refresh_rx_retire_blk_timer()
608 pkc->last_kactive_blk_num = pkc->kactive_blk_num; in _prb_refresh_rx_retire_blk_timer()
638 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in prb_retire_rx_blk_timer_expired() local
644 frozen = prb_queue_frozen(pkc); in prb_retire_rx_blk_timer_expired()
645 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in prb_retire_rx_blk_timer_expired()
647 if (unlikely(pkc->delete_blk_timer)) in prb_retire_rx_blk_timer_expired()
660 while (atomic_read(&pkc->blk_fill_in_prog)) { in prb_retire_rx_blk_timer_expired()
666 if (pkc->last_kactive_blk_num == pkc->kactive_blk_num) { in prb_retire_rx_blk_timer_expired()
672 prb_retire_current_block(pkc, po, TP_STATUS_BLK_TMO); in prb_retire_rx_blk_timer_expired()
673 if (!prb_dispatch_next_block(pkc, po)) in prb_retire_rx_blk_timer_expired()
695 prb_open_block(pkc, pbd); in prb_retire_rx_blk_timer_expired()
702 _prb_refresh_rx_retire_blk_timer(pkc); in prb_retire_rx_blk_timer_expired()
793 static void prb_thaw_queue(struct tpacket_kbdq_core *pkc) in prb_thaw_queue() argument
795 pkc->reset_pending_on_curr_blk = 0; in prb_thaw_queue()
865 static void prb_freeze_queue(struct tpacket_kbdq_core *pkc, in prb_freeze_queue() argument
868 pkc->reset_pending_on_curr_blk = 1; in prb_freeze_queue()
880 static void *prb_dispatch_next_block(struct tpacket_kbdq_core *pkc, in prb_dispatch_next_block() argument
888 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in prb_dispatch_next_block()
892 prb_freeze_queue(pkc, po); in prb_dispatch_next_block()
901 prb_open_block(pkc, pbd); in prb_dispatch_next_block()
902 return (void *)pkc->nxt_offset; in prb_dispatch_next_block()
905 static void prb_retire_current_block(struct tpacket_kbdq_core *pkc, in prb_retire_current_block() argument
908 struct tpacket_block_desc *pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in prb_retire_current_block()
922 while (atomic_read(&pkc->blk_fill_in_prog)) { in prb_retire_current_block()
927 prb_close_block(pkc, pbd, po, status); in prb_retire_current_block()
937 static int prb_queue_frozen(struct tpacket_kbdq_core *pkc) in prb_queue_frozen() argument
939 return pkc->reset_pending_on_curr_blk; in prb_queue_frozen()
944 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb); in prb_clear_blk_fill_status() local
945 atomic_dec(&pkc->blk_fill_in_prog); in prb_clear_blk_fill_status()
948 static void prb_fill_rxhash(struct tpacket_kbdq_core *pkc, in prb_fill_rxhash() argument
951 ppd->hv1.tp_rxhash = skb_get_hash(pkc->skb); in prb_fill_rxhash()
954 static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc, in prb_clear_rxhash() argument
960 static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, in prb_fill_vlan_info() argument
963 if (skb_vlan_tag_present(pkc->skb)) { in prb_fill_vlan_info()
964 ppd->hv1.tp_vlan_tci = skb_vlan_tag_get(pkc->skb); in prb_fill_vlan_info()
965 ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto); in prb_fill_vlan_info()
974 static void prb_run_all_ft_ops(struct tpacket_kbdq_core *pkc, in prb_run_all_ft_ops() argument
978 prb_fill_vlan_info(pkc, ppd); in prb_run_all_ft_ops()
980 if (pkc->feature_req_word & TP_FT_REQ_FILL_RXHASH) in prb_run_all_ft_ops()
981 prb_fill_rxhash(pkc, ppd); in prb_run_all_ft_ops()
983 prb_clear_rxhash(pkc, ppd); in prb_run_all_ft_ops()
987 struct tpacket_kbdq_core *pkc, in prb_fill_curr_block() argument
995 pkc->prev = curr; in prb_fill_curr_block()
996 pkc->nxt_offset += TOTAL_PKT_LEN_INCL_ALIGN(len); in prb_fill_curr_block()
999 atomic_inc(&pkc->blk_fill_in_prog); in prb_fill_curr_block()
1000 prb_run_all_ft_ops(pkc, ppd); in prb_fill_curr_block()
1009 struct tpacket_kbdq_core *pkc; in __packet_lookup_frame_in_block() local
1013 pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in __packet_lookup_frame_in_block()
1014 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in __packet_lookup_frame_in_block()
1017 if (prb_queue_frozen(pkc)) { in __packet_lookup_frame_in_block()
1032 prb_open_block(pkc, pbd); in __packet_lookup_frame_in_block()
1037 curr = pkc->nxt_offset; in __packet_lookup_frame_in_block()
1038 pkc->skb = skb; in __packet_lookup_frame_in_block()
1039 end = (char *)pbd + pkc->kblk_size; in __packet_lookup_frame_in_block()
1043 prb_fill_curr_block(curr, pkc, pbd, len); in __packet_lookup_frame_in_block()
1048 prb_retire_current_block(pkc, po, 0); in __packet_lookup_frame_in_block()
1051 curr = (char *)prb_dispatch_next_block(pkc, po); in __packet_lookup_frame_in_block()
1053 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in __packet_lookup_frame_in_block()
1054 prb_fill_curr_block(curr, pkc, pbd, len); in __packet_lookup_frame_in_block()
1090 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb); in prb_lookup_block() local
1091 struct tpacket_block_desc *pbd = GET_PBLOCK_DESC(pkc, idx); in prb_lookup_block()