Lines Matching refs:pkc

500 static void prb_del_retire_blk_timer(struct tpacket_kbdq_core *pkc)  in prb_del_retire_blk_timer()  argument
502 del_timer_sync(&pkc->retire_blk_timer); in prb_del_retire_blk_timer()
508 struct tpacket_kbdq_core *pkc; in prb_shutdown_retire_blk_timer() local
510 pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in prb_shutdown_retire_blk_timer()
513 pkc->delete_blk_timer = 1; in prb_shutdown_retire_blk_timer()
516 prb_del_retire_blk_timer(pkc); in prb_shutdown_retire_blk_timer()
521 struct tpacket_kbdq_core *pkc; in prb_setup_retire_blk_timer() local
523 pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in prb_setup_retire_blk_timer()
524 timer_setup(&pkc->retire_blk_timer, prb_retire_rx_blk_timer_expired, in prb_setup_retire_blk_timer()
526 pkc->retire_blk_timer.expires = jiffies; in prb_setup_retire_blk_timer()
610 static void _prb_refresh_rx_retire_blk_timer(struct tpacket_kbdq_core *pkc) in _prb_refresh_rx_retire_blk_timer() argument
612 mod_timer(&pkc->retire_blk_timer, in _prb_refresh_rx_retire_blk_timer()
613 jiffies + pkc->tov_in_jiffies); in _prb_refresh_rx_retire_blk_timer()
614 pkc->last_kactive_blk_num = pkc->kactive_blk_num; in _prb_refresh_rx_retire_blk_timer()
644 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in prb_retire_rx_blk_timer_expired() local
650 frozen = prb_queue_frozen(pkc); in prb_retire_rx_blk_timer_expired()
651 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in prb_retire_rx_blk_timer_expired()
653 if (unlikely(pkc->delete_blk_timer)) in prb_retire_rx_blk_timer_expired()
667 write_lock(&pkc->blk_fill_in_prog_lock); in prb_retire_rx_blk_timer_expired()
668 write_unlock(&pkc->blk_fill_in_prog_lock); in prb_retire_rx_blk_timer_expired()
671 if (pkc->last_kactive_blk_num == pkc->kactive_blk_num) { in prb_retire_rx_blk_timer_expired()
677 prb_retire_current_block(pkc, po, TP_STATUS_BLK_TMO); in prb_retire_rx_blk_timer_expired()
678 if (!prb_dispatch_next_block(pkc, po)) in prb_retire_rx_blk_timer_expired()
700 prb_open_block(pkc, pbd); in prb_retire_rx_blk_timer_expired()
707 _prb_refresh_rx_retire_blk_timer(pkc); in prb_retire_rx_blk_timer_expired()
798 static void prb_thaw_queue(struct tpacket_kbdq_core *pkc) in prb_thaw_queue() argument
800 pkc->reset_pending_on_curr_blk = 0; in prb_thaw_queue()
870 static void prb_freeze_queue(struct tpacket_kbdq_core *pkc, in prb_freeze_queue() argument
873 pkc->reset_pending_on_curr_blk = 1; in prb_freeze_queue()
885 static void *prb_dispatch_next_block(struct tpacket_kbdq_core *pkc, in prb_dispatch_next_block() argument
893 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in prb_dispatch_next_block()
897 prb_freeze_queue(pkc, po); in prb_dispatch_next_block()
906 prb_open_block(pkc, pbd); in prb_dispatch_next_block()
907 return (void *)pkc->nxt_offset; in prb_dispatch_next_block()
910 static void prb_retire_current_block(struct tpacket_kbdq_core *pkc, in prb_retire_current_block() argument
913 struct tpacket_block_desc *pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in prb_retire_current_block()
928 write_lock(&pkc->blk_fill_in_prog_lock); in prb_retire_current_block()
929 write_unlock(&pkc->blk_fill_in_prog_lock); in prb_retire_current_block()
931 prb_close_block(pkc, pbd, po, status); in prb_retire_current_block()
941 static int prb_queue_frozen(struct tpacket_kbdq_core *pkc) in prb_queue_frozen() argument
943 return pkc->reset_pending_on_curr_blk; in prb_queue_frozen()
947 __releases(&pkc->blk_fill_in_prog_lock) in prb_clear_blk_fill_status()
949 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb); in prb_clear_blk_fill_status() local
951 read_unlock(&pkc->blk_fill_in_prog_lock); in prb_clear_blk_fill_status()
954 static void prb_fill_rxhash(struct tpacket_kbdq_core *pkc, in prb_fill_rxhash() argument
957 ppd->hv1.tp_rxhash = skb_get_hash(pkc->skb); in prb_fill_rxhash()
960 static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc, in prb_clear_rxhash() argument
966 static void prb_fill_vlan_info(struct tpacket_kbdq_core *pkc, in prb_fill_vlan_info() argument
969 if (skb_vlan_tag_present(pkc->skb)) { in prb_fill_vlan_info()
970 ppd->hv1.tp_vlan_tci = skb_vlan_tag_get(pkc->skb); in prb_fill_vlan_info()
971 ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto); in prb_fill_vlan_info()
980 static void prb_run_all_ft_ops(struct tpacket_kbdq_core *pkc, in prb_run_all_ft_ops() argument
984 prb_fill_vlan_info(pkc, ppd); in prb_run_all_ft_ops()
986 if (pkc->feature_req_word & TP_FT_REQ_FILL_RXHASH) in prb_run_all_ft_ops()
987 prb_fill_rxhash(pkc, ppd); in prb_run_all_ft_ops()
989 prb_clear_rxhash(pkc, ppd); in prb_run_all_ft_ops()
993 struct tpacket_kbdq_core *pkc, in prb_fill_curr_block() argument
996 __acquires(&pkc->blk_fill_in_prog_lock) in prb_fill_curr_block()
1002 pkc->prev = curr; in prb_fill_curr_block()
1003 pkc->nxt_offset += TOTAL_PKT_LEN_INCL_ALIGN(len); in prb_fill_curr_block()
1006 read_lock(&pkc->blk_fill_in_prog_lock); in prb_fill_curr_block()
1007 prb_run_all_ft_ops(pkc, ppd); in prb_fill_curr_block()
1016 struct tpacket_kbdq_core *pkc; in __packet_lookup_frame_in_block() local
1020 pkc = GET_PBDQC_FROM_RB(&po->rx_ring); in __packet_lookup_frame_in_block()
1021 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in __packet_lookup_frame_in_block()
1024 if (prb_queue_frozen(pkc)) { in __packet_lookup_frame_in_block()
1039 prb_open_block(pkc, pbd); in __packet_lookup_frame_in_block()
1044 curr = pkc->nxt_offset; in __packet_lookup_frame_in_block()
1045 pkc->skb = skb; in __packet_lookup_frame_in_block()
1046 end = (char *)pbd + pkc->kblk_size; in __packet_lookup_frame_in_block()
1050 prb_fill_curr_block(curr, pkc, pbd, len); in __packet_lookup_frame_in_block()
1055 prb_retire_current_block(pkc, po, 0); in __packet_lookup_frame_in_block()
1058 curr = (char *)prb_dispatch_next_block(pkc, po); in __packet_lookup_frame_in_block()
1060 pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); in __packet_lookup_frame_in_block()
1061 prb_fill_curr_block(curr, pkc, pbd, len); in __packet_lookup_frame_in_block()
1097 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb); in prb_lookup_block() local
1098 struct tpacket_block_desc *pbd = GET_PBLOCK_DESC(pkc, idx); in prb_lookup_block()