| /linux/include/net/ |
| H A D | fq_impl.h | 16 __fq_adjust_removal(struct fq *fq, struct fq_flow *flow, unsigned int packets, in __fq_adjust_removal() argument 25 fq->backlog -= packets; in __fq_adjust_removal() 26 fq->memory_usage -= truesize; in __fq_adjust_removal() 36 idx = flow - fq->flows; in __fq_adjust_removal() 37 __clear_bit(idx, fq->flows_bitmap); in __fq_adjust_removal() 40 static void fq_adjust_removal(struct fq *fq, in fq_adjust_removal() argument 44 __fq_adjust_removal(fq, flow, 1, skb->len, skb->truesize); in fq_adjust_removal() 47 static struct sk_buff *fq_flow_dequeue(struct fq *fq, in fq_flow_dequeue() argument 52 lockdep_assert_held(&fq->lock); in fq_flow_dequeue() 58 fq_adjust_removal(fq, flow, skb); in fq_flow_dequeue() [all …]
|
| H A D | ipv6_frag.h | 34 struct frag_queue *fq = container_of(q, struct frag_queue, q); in ip6frag_init() local 38 fq->ecn = 0; in ip6frag_init() 49 const struct inet_frag_queue *fq = data; in ip6frag_obj_hashfn() local 51 return jhash2((const u32 *)&fq->key.v6, in ip6frag_obj_hashfn() 59 const struct inet_frag_queue *fq = ptr; in ip6frag_obj_cmpfn() local 61 return !!memcmp(&fq->key, key, sizeof(*key)); in ip6frag_obj_cmpfn() 65 ip6frag_expire_frag_queue(struct net *net, struct frag_queue *fq) in ip6frag_expire_frag_queue() argument 72 spin_lock(&fq->q.lock); in ip6frag_expire_frag_queue() 74 if (fq->q.flags & INET_FRAG_COMPLETE) in ip6frag_expire_frag_queue() 77 fq->q.flags |= INET_FRAG_DROP; in ip6frag_expire_frag_queue() [all …]
|
| H A D | fq.h | 68 struct fq { struct 85 typedef struct sk_buff *fq_tin_dequeue_t(struct fq *, argument 89 typedef void fq_skb_free_t(struct fq *, 95 typedef bool fq_skb_filter_t(struct fq *,
|
| /linux/drivers/net/ethernet/intel/libeth/ |
| H A D | rx.c | 72 static bool libeth_rx_page_pool_params(struct libeth_fq *fq, in libeth_rx_page_pool_params() argument 75 pp->offset = fq->xdp ? LIBETH_XDP_HEADROOM : LIBETH_SKB_HEADROOM; in libeth_rx_page_pool_params() 80 switch (fq->type) { in libeth_rx_page_pool_params() 82 fq->buf_len = libeth_rx_hw_len_mtu(pp, fq->buf_len); in libeth_rx_page_pool_params() 85 fq->buf_len = libeth_rx_hw_len_truesize(pp, fq->buf_len, in libeth_rx_page_pool_params() 86 fq->truesize); in libeth_rx_page_pool_params() 89 fq->buf_len = ALIGN(LIBETH_MAX_HEAD, LIBETH_RX_BUF_STRIDE); in libeth_rx_page_pool_params() 96 fq->truesize = roundup_pow_of_two(SKB_HEAD_ALIGN(pp->offset + in libeth_rx_page_pool_params() 97 fq->buf_len)); in libeth_rx_page_pool_params() 116 static bool libeth_rx_page_pool_params_zc(struct libeth_fq *fq, in libeth_rx_page_pool_params_zc() argument [all …]
|
| H A D | xsk.c | 160 int libeth_xskfq_create(struct libeth_xskfq *fq) in libeth_xskfq_create() argument 162 fq->fqes = kvcalloc_node(fq->count, sizeof(*fq->fqes), GFP_KERNEL, in libeth_xskfq_create() 163 fq->nid); in libeth_xskfq_create() 164 if (!fq->fqes) in libeth_xskfq_create() 167 fq->pending = fq->count; in libeth_xskfq_create() 168 fq->thresh = libeth_xdp_queue_threshold(fq->count); in libeth_xskfq_create() 169 fq->buf_len = xsk_pool_get_rx_frame_size(fq->pool); in libeth_xskfq_create() 170 fq->truesize = xsk_pool_get_rx_frag_step(fq->pool); in libeth_xskfq_create() 182 void libeth_xskfq_destroy(struct libeth_xskfq *fq) in libeth_xskfq_destroy() argument 184 fq->buf_len = 0; in libeth_xskfq_destroy() [all …]
|
| /linux/fs/netfs/ |
| H A D | rolling_buffer.c | 28 struct folio_queue *fq; in netfs_folioq_alloc() local 30 fq = kmalloc_obj(*fq, gfp); in netfs_folioq_alloc() 31 if (fq) { in netfs_folioq_alloc() 33 folioq_init(fq, rreq_id); in netfs_folioq_alloc() 34 fq->debug_id = atomic_inc_return(&debug_ids); in netfs_folioq_alloc() 35 trace_netfs_folioq(fq, trace); in netfs_folioq_alloc() 37 return fq; in netfs_folioq_alloc() 65 struct folio_queue *fq; in rolling_buffer_init() local 67 fq = netfs_folioq_alloc(rreq_id, GFP_NOFS, netfs_trace_folioq_rollbuf_init); in rolling_buffer_init() 68 if (!fq) in rolling_buffer_init() [all …]
|
| /linux/net/ipv6/netfilter/ |
| H A D | nf_conntrack_reasm.c | 125 static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb, 137 struct frag_queue *fq; in nf_ct_frag6_expire() local 139 fq = container_of(frag, struct frag_queue, q); in nf_ct_frag6_expire() 141 ip6frag_expire_frag_queue(fq->q.fqdir->net, fq); in nf_ct_frag6_expire() 170 static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb, in nf_ct_frag6_queue() argument 180 if (fq->q.flags & INET_FRAG_COMPLETE) { in nf_ct_frag6_queue() 210 if (end < fq->q.len || in nf_ct_frag6_queue() 211 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len)) { in nf_ct_frag6_queue() 215 fq->q.flags |= INET_FRAG_LAST_IN; in nf_ct_frag6_queue() 216 fq->q.len = end; in nf_ct_frag6_queue() [all …]
|
| /linux/net/ieee802154/6lowpan/ |
| H A D | reassembly.c | 33 static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *skb, 48 struct frag_queue *fq; in lowpan_frag_expire() local 51 fq = container_of(frag, struct frag_queue, q); in lowpan_frag_expire() 53 spin_lock(&fq->q.lock); in lowpan_frag_expire() 55 if (fq->q.flags & INET_FRAG_COMPLETE) in lowpan_frag_expire() 58 inet_frag_kill(&fq->q, &refs); in lowpan_frag_expire() 60 spin_unlock(&fq->q.lock); in lowpan_frag_expire() 61 inet_frag_putn(&fq->q, refs); in lowpan_frag_expire() 86 static int lowpan_frag_queue(struct lowpan_frag_queue *fq, in lowpan_frag_queue() argument 100 if (fq->q.flags & INET_FRAG_COMPLETE) in lowpan_frag_queue() [all …]
|
| /linux/net/ipv6/ |
| H A D | reassembly.c | 70 static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *skb, 77 struct frag_queue *fq; in ip6_frag_expire() local 79 fq = container_of(frag, struct frag_queue, q); in ip6_frag_expire() 81 ip6frag_expire_frag_queue(fq->q.fqdir->net, fq); in ip6_frag_expire() 108 struct frag_queue *fq, struct sk_buff *skb, in ip6_frag_queue() argument 120 if (fq->q.flags & INET_FRAG_COMPLETE) { in ip6_frag_queue() 152 if (end < fq->q.len || in ip6_frag_queue() 153 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len)) in ip6_frag_queue() 155 fq->q.flags |= INET_FRAG_LAST_IN; in ip6_frag_queue() 156 fq->q.len = end; in ip6_frag_queue() [all …]
|
| /linux/drivers/soc/fsl/qbman/ |
| H A D | qman.c | 268 struct qm_mcc_fq fq; member 957 static inline void fq_set(struct qman_fq *fq, u32 mask) in fq_set() argument 959 fq->flags |= mask; in fq_set() 962 static inline void fq_clear(struct qman_fq *fq, u32 mask) in fq_clear() argument 964 fq->flags &= ~mask; in fq_clear() 967 static inline int fq_isset(struct qman_fq *fq, u32 mask) in fq_isset() argument 969 return fq->flags & mask; in fq_isset() 972 static inline int fq_isclear(struct qman_fq *fq, u32 mask) in fq_isclear() argument 974 return !(fq->flags & mask); in fq_isclear() 1121 struct qman_fq *fq; in idx_to_fq() local [all …]
|
| H A D | qman_test_api.c | 106 static int do_enqueues(struct qman_fq *fq) in do_enqueues() argument 112 if (qman_enqueue(fq, &fd)) { in do_enqueues() 126 struct qman_fq *fq = &fq_base; in qman_test_api() local 133 err = qman_create_fq(0, FQ_FLAGS, fq); in qman_test_api() 138 err = qman_init_fq(fq, QMAN_INITFQ_FLAG_LOCAL, NULL); in qman_test_api() 144 err = do_enqueues(fq); in qman_test_api() 149 err = qman_volatile_dequeue(fq, VDQCR_FLAGS, frmcnt); in qman_test_api() 154 err = do_enqueues(fq); in qman_test_api() 159 err = qman_volatile_dequeue(fq, VDQCR_FLAGS, frmcnt); in qman_test_api() 167 err = qman_volatile_dequeue(fq, VDQCR_FLAGS, frmcnt); in qman_test_api() [all …]
|
| /linux/drivers/net/ethernet/freescale/dpaa/ |
| H A D | dpaa_eth_trace.h | 32 struct qman_fq *fq, 36 TP_ARGS(netdev, fq, fd), 54 __entry->fqid = fq->fqid; 78 struct qman_fq *fq, 81 TP_ARGS(netdev, fq, fd) 88 struct qman_fq *fq, 91 TP_ARGS(netdev, fq, fd) 98 struct qman_fq *fq, 101 TP_ARGS(netdev, fq, fd)
|
| H A D | dpaa_eth_sysfs.c | 33 struct dpaa_fq *fq; in dpaa_eth_show_fqids() local 39 list_for_each_entry_safe(fq, tmp, &priv->dpaa_fq_list, list) { in dpaa_eth_show_fqids() 40 switch (fq->fq_type) { in dpaa_eth_show_fqids() 66 if (prev && (abs(fq->fqid - prev->fqid) != 1 || in dpaa_eth_show_fqids() 77 if (prev && abs(fq->fqid - prev->fqid) == 1 && in dpaa_eth_show_fqids() 79 last_fqid = fq->fqid; in dpaa_eth_show_fqids() 81 first_fqid = fq->fqid; in dpaa_eth_show_fqids() 82 last_fqid = fq->fqid; in dpaa_eth_show_fqids() 85 prev = fq; in dpaa_eth_show_fqids()
|
| H A D | dpaa_eth.c | 653 static inline void dpaa_assign_wq(struct dpaa_fq *fq, int idx) in dpaa_assign_wq() argument 655 switch (fq->fq_type) { in dpaa_assign_wq() 658 fq->wq = 1; in dpaa_assign_wq() 662 fq->wq = 5; in dpaa_assign_wq() 666 fq->wq = 6; in dpaa_assign_wq() 672 fq->wq = 6; in dpaa_assign_wq() 676 fq->wq = 2; in dpaa_assign_wq() 680 fq->wq = 1; in dpaa_assign_wq() 684 fq->wq = 0; in dpaa_assign_wq() 693 fq->fq_type, fq->fqid); in dpaa_assign_wq() [all …]
|
| /linux/drivers/crypto/caam/ |
| H A D | qi.c | 142 static void caam_fq_ern_cb(struct qman_portal *qm, struct qman_fq *fq, in caam_fq_ern_cb() argument 225 static int empty_retired_fq(struct device *qidev, struct qman_fq *fq) in empty_retired_fq() argument 229 ret = qman_volatile_dequeue(fq, QMAN_VOLATILE_FLAG_WAIT_INT | in empty_retired_fq() 234 dev_err(qidev, "Volatile dequeue fail for FQ: %u\n", fq->fqid); in empty_retired_fq() 243 } while (fq->flags & QMAN_FQ_STATE_NE); in empty_retired_fq() 248 static int kill_fq(struct device *qidev, struct qman_fq *fq) in kill_fq() argument 253 ret = qman_retire_fq(fq, &flags); in kill_fq() 267 } while (fq->state != qman_fq_state_retired); in kill_fq() 269 WARN_ON(fq->flags & QMAN_FQ_STATE_BLOCKOOS); in kill_fq() 270 WARN_ON(fq->flags & QMAN_FQ_STATE_ORL); in kill_fq() [all …]
|
| /linux/net/ipv4/ |
| H A D | inet_fragment.c | 133 struct inet_frag_queue *fq = ptr; in inet_frags_free_cb() local 136 count = timer_delete_sync(&fq->timer) ? 1 : 0; in inet_frags_free_cb() 138 spin_lock_bh(&fq->lock); in inet_frags_free_cb() 139 fq->flags |= INET_FRAG_DROP; in inet_frags_free_cb() 140 if (!(fq->flags & INET_FRAG_COMPLETE)) { in inet_frags_free_cb() 141 fq->flags |= INET_FRAG_COMPLETE; in inet_frags_free_cb() 143 } else if (fq->flags & INET_FRAG_HASH_DEAD) { in inet_frags_free_cb() 146 spin_unlock_bh(&fq->lock); in inet_frags_free_cb() 148 inet_frag_putn(fq, count); in inet_frags_free_cb() 223 struct inet_frag_queue *fq; in fqdir_pre_exit() local [all …]
|
| /linux/fs/afs/ |
| H A D | dir_search.c | 69 struct folio_queue *fq = iter->fq; in afs_dir_find_block() local 86 if (!fq || blpos < fpos) { in afs_dir_find_block() 87 fq = dvnode->directory; in afs_dir_find_block() 93 for (; fq; fq = fq->next) { in afs_dir_find_block() 94 for (; slot < folioq_count(fq); slot++) { in afs_dir_find_block() 95 size_t fsize = folioq_folio_size(fq, slot); in afs_dir_find_block() 99 folio = folioq_folio(fq, slot); in afs_dir_find_block() 102 iter->fq = fq; in afs_dir_find_block() 114 iter->fq = NULL; in afs_dir_find_block()
|
| /linux/drivers/net/ethernet/freescale/dpaa2/ |
| H A D | dpaa2-eth-debugfs.c | 47 static char *fq_type_to_str(struct dpaa2_eth_fq *fq) in fq_type_to_str() argument 49 switch (fq->type) { in fq_type_to_str() 62 struct dpaa2_eth_fq *fq; in dpaa2_dbg_fqs_show() local 71 fq = &priv->fq[i]; in dpaa2_dbg_fqs_show() 72 err = dpaa2_io_query_fq_count(NULL, fq->fqid, &fcnt, &bcnt); in dpaa2_dbg_fqs_show() 77 if (!fq->stats.frames && !fcnt) in dpaa2_dbg_fqs_show() 81 fq->fqid, in dpaa2_dbg_fqs_show() 82 fq->target_cpu, in dpaa2_dbg_fqs_show() 83 fq->tc, in dpaa2_dbg_fqs_show() 84 fq_type_to_str(fq), in dpaa2_dbg_fqs_show() [all …]
|
| H A D | dpaa2-eth.c | 335 struct dpaa2_eth_fq *fq, in dpaa2_eth_xdp_flush() argument 350 err = priv->enqueue(priv, fq, &fds[total_enqueued], in dpaa2_eth_xdp_flush() 365 struct dpaa2_eth_fq *fq) in dpaa2_eth_xdp_tx_flush() argument 374 enqueued = dpaa2_eth_xdp_flush(priv, fq, &fq->xdp_tx_fds); in dpaa2_eth_xdp_tx_flush() 378 fds = fq->xdp_tx_fds.fds; in dpaa2_eth_xdp_tx_flush() 383 for (i = enqueued; i < fq->xdp_tx_fds.num; i++) { in dpaa2_eth_xdp_tx_flush() 388 fq->xdp_tx_fds.num = 0; in dpaa2_eth_xdp_tx_flush() 398 struct dpaa2_eth_fq *fq; in dpaa2_eth_xdp_enqueue() local 415 fq = &priv->fq[queue_id]; in dpaa2_eth_xdp_enqueue() 416 dest_fd = &fq->xdp_tx_fds.fds[fq->xdp_tx_fds.num++]; in dpaa2_eth_xdp_enqueue() [all …]
|
| H A D | dpaa2-xsk.c | 17 struct dpaa2_eth_fq *fq; in dpaa2_eth_setup_consume_func() local 21 fq = &priv->fq[i]; in dpaa2_eth_setup_consume_func() 23 if (fq->type != type) in dpaa2_eth_setup_consume_func() 25 if (fq->channel != ch) in dpaa2_eth_setup_consume_func() 28 fq->consume = consume; in dpaa2_eth_setup_consume_func() 106 struct dpaa2_eth_fq *fq) in dpaa2_xsk_rx() argument 127 xdp_act = dpaa2_xsk_run_xdp(priv, ch, fq, (struct dpaa2_fd *)fd, vaddr); in dpaa2_xsk_rx() 143 dpaa2_eth_receive_skb(priv, ch, fd, vaddr, fq, percpu_stats, skb); in dpaa2_xsk_rx() 399 struct dpaa2_eth_fq *fq; in dpaa2_xsk_tx() local 408 fq = &priv->fq[ch->nctx.desired_cpu]; in dpaa2_xsk_tx() [all …]
|
| /linux/include/net/libeth/ |
| H A D | xsk.h | 623 int libeth_xskfq_create(struct libeth_xskfq *fq); 624 void libeth_xskfq_destroy(struct libeth_xskfq *fq); 645 libeth_xskfqe_alloc(struct libeth_xskfq_fp *fq, u32 n, in libeth_xskfqe_alloc() argument 646 void (*fill)(const struct libeth_xskfq_fp *fq, u32 i)) in libeth_xskfqe_alloc() argument 651 this = fq->count - fq->ntu; in libeth_xskfqe_alloc() 656 xskb = (typeof(xskb))&fq->fqes[fq->ntu]; in libeth_xskfqe_alloc() 657 ret = xsk_buff_alloc_batch(fq->pool, xskb, this); in libeth_xskfqe_alloc() 659 for (u32 i = 0, ntu = fq->ntu; likely(i < ret); i++) in libeth_xskfqe_alloc() 660 fill(fq, ntu + i); in libeth_xskfqe_alloc() 663 fq->ntu += ret; in libeth_xskfqe_alloc() [all …]
|
| H A D | rx.h | 93 int libeth_rx_fq_create(struct libeth_fq *fq, struct napi_struct *napi); 94 void libeth_rx_fq_destroy(struct libeth_fq *fq); 104 static inline dma_addr_t libeth_rx_alloc(const struct libeth_fq_fp *fq, u32 i) in libeth_rx_alloc() argument 106 struct libeth_fqe *buf = &fq->fqes[i]; in libeth_rx_alloc() 108 buf->truesize = fq->truesize; in libeth_rx_alloc() 109 buf->netmem = page_pool_dev_alloc_netmem(fq->pp, &buf->offset, in libeth_rx_alloc() 115 fq->pp->p.offset; in libeth_rx_alloc()
|
| /linux/drivers/iommu/ |
| H A D | dma-iommu.c | 121 #define fq_ring_for_each(i, fq) \ argument 122 for ((i) = (fq)->head; (i) != (fq)->tail; (i) = ((i) + 1) & (fq)->mod_mask) 124 static inline bool fq_full(struct iova_fq *fq) in fq_full() argument 126 assert_spin_locked(&fq->lock); in fq_full() 127 return (((fq->tail + 1) & fq->mod_mask) == fq->head); in fq_full() 130 static inline unsigned int fq_ring_add(struct iova_fq *fq) in fq_ring_add() argument 132 unsigned int idx = fq->tail; in fq_ring_add() 134 assert_spin_locked(&fq->lock); in fq_ring_add() 136 fq->tail = (idx + 1) & fq->mod_mask; in fq_ring_add() 141 static void fq_ring_free_locked(struct iommu_dma_cookie *cookie, struct iova_fq *fq) in fq_ring_free_locked() argument [all …]
|
| /linux/drivers/net/ethernet/intel/idpf/ |
| H A D | xsk.c | 342 static void idpf_xskfqe_init(const struct libeth_xskfq_fp *fq, u32 i) in idpf_xskfqe_init() argument 344 struct virtchnl2_splitq_rx_buf_desc *desc = fq->descs; in idpf_xskfqe_init() 352 desc->pkt_addr = cpu_to_le64(libeth_xsk_buff_xdp_get_dma(fq->fqes[i])); in idpf_xskfqe_init() 357 struct libeth_xskfq_fp fq = { in idpf_xskfq_refill_thresh() local 366 done = libeth_xskfqe_alloc(&fq, count, idpf_xskfqe_init); in idpf_xskfq_refill_thresh() 367 writel(fq.ntu, bufq->tail); in idpf_xskfq_refill_thresh() 369 bufq->next_to_use = fq.ntu; in idpf_xskfq_refill_thresh() 391 struct libeth_xskfq fq = { in idpf_xskfq_init() local 398 ret = libeth_xskfq_create(&fq); in idpf_xskfq_init() 402 bufq->xsk_buf = fq.fqes; in idpf_xskfq_init() [all …]
|
| /linux/net/xdp/ |
| H A D | xsk_buff_pool.c | 96 pool->fq = xs->fq_tmp; in xp_create_and_assign_umem() 280 if (pool->fq) { in xp_release_deferred() 281 xskq_destroy(pool->fq); in xp_release_deferred() 282 pool->fq = NULL; in xp_release_deferred() 528 if (!xskq_cons_peek_addr_unchecked(pool->fq, &addr)) { in __xp_alloc() 529 pool->fq->queue_empty_descs++; in __xp_alloc() 536 pool->fq->invalid_descs++; in __xp_alloc() 537 xskq_cons_release(pool->fq); in __xp_alloc() 545 xskq_cons_release(pool->fq); in __xp_alloc() 581 max = xskq_cons_nb_entries(pool->fq, max); in xp_alloc_new_from_fq() [all …]
|