| /linux/drivers/media/common/videobuf2/ |
| H A D | videobuf2-core.c | 36 #define PLANE_INDEX_MASK (BIT_MASK(PLANE_INDEX_BITS) - 1) 38 #define BUFFER_INDEX_MASK (MAX_BUFFER_INDEX - 1) 47 #define dprintk(q, level, fmt, arg...) \ argument 50 pr_info("[%s] %s: " fmt, (q)->name, __func__, \ 103 #define log_qop(q, op) \ argument 104 dprintk(q, 2, "call_qop(%s)%s\n", #op, \ 105 (q)->ops->op ? "" : " (nop)") 107 #define call_qop(q, op, args...) \ argument 111 log_qop(q, op); \ 112 err = (q)->ops->op ? (q)->ops->op(args) : 0; \ [all …]
|
| /linux/net/sched/ |
| H A D | sch_choke.c | 46 #define CHOKE_MAX_QUEUE (128*1024 - 1) 69 unsigned int tab_mask; /* size - 1 */ 75 static unsigned int choke_len(const struct choke_sched_data *q) in choke_len() argument 77 return (q->tail - q->head) & q->tab_mask; in choke_len() 81 static int use_ecn(const struct choke_sched_data *q) in use_ecn() argument 83 return q->flags & TC_RED_ECN; in use_ecn() 87 static int use_harddrop(const struct choke_sched_data *q) in use_harddrop() argument 89 return q->flags & TC_RED_HARDDROP; in use_harddrop() 93 static void choke_zap_head_holes(struct choke_sched_data *q) in choke_zap_head_holes() argument 96 q->head = (q->head + 1) & q->tab_mask; in choke_zap_head_holes() [all …]
|
| H A D | sch_dualpi2.c | 14 * - Supports ECN L4S-identifier (IP.ECN==0b*1) 41 /* 32b enable to support flows with windows up to ~8.6 * 1e9 packets 52 * netlink-provided values can use at most 31b, i.e. be at most (2^23)-1 53 * (~4MHz) as those are given in 1/256th. This enable to tune alpha/beta to 56 #define ALPHA_BETA_MAX ((1U << 31) - 1) 61 * scale_alpha_beta(1) will not round down to 0. 88 bool step_in_packets; /* Step thresh in packets (1) or time (0) */ 101 bool drop_early; /* Drop at enqueue (1) instead of dequeue (0) */ 102 bool drop_overload; /* Drop (1) o 147 head_enqueue_time(struct Qdisc * q) head_enqueue_time() argument 170 next_pi2_timeout(struct dualpi2_sched_data * q) next_pi2_timeout() argument 185 skb_apply_step(struct sk_buff * skb,struct dualpi2_sched_data * q) skb_apply_step() argument 190 dualpi2_mark(struct dualpi2_sched_data * q,struct sk_buff * skb) dualpi2_mark() argument 199 dualpi2_reset_c_protection(struct dualpi2_sched_data * q) dualpi2_reset_c_protection() argument 209 dualpi2_calculate_c_protection(struct Qdisc * sch,struct dualpi2_sched_data * q,u32 wc) dualpi2_calculate_c_protection() argument 230 dualpi2_classic_marking(struct dualpi2_sched_data * q,struct sk_buff * skb,u32 prob,bool overload) dualpi2_classic_marking() argument 253 dualpi2_scalable_marking(struct dualpi2_sched_data * q,struct sk_buff * skb,u64 local_l_prob,u32 prob,bool overload) dualpi2_scalable_marking() argument 282 must_drop(struct Qdisc * sch,struct dualpi2_sched_data * q,struct sk_buff * skb) must_drop() argument 341 dualpi2_skb_classify(struct dualpi2_sched_data * q,struct sk_buff * skb) dualpi2_skb_classify() argument 388 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_enqueue_skb() local 444 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_qdisc_enqueue() local 517 dequeue_packet(struct Qdisc * sch,struct dualpi2_sched_data * q,int * credit_change,u64 now) dequeue_packet() argument 551 do_step_aqm(struct dualpi2_sched_data * q,struct sk_buff * skb,u64 now) do_step_aqm() argument 574 drop_and_retry(struct dualpi2_sched_data * q,struct sk_buff * skb,struct Qdisc * sch,enum skb_drop_reason reason) drop_and_retry() argument 585 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_qdisc_dequeue() local 626 get_queue_delays(struct dualpi2_sched_data * q,u64 * qdelay_c,u64 * qdelay_l) get_queue_delays() argument 641 struct dualpi2_sched_data *q = qdisc_priv(sch); calculate_probability() local 711 struct dualpi2_sched_data *q = timer_container_of(q, timer, pi2_timer); dualpi2_timer() local 762 struct dualpi2_sched_data *q; dualpi2_change() local 890 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_reset_default() local 916 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_init() local 947 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_dump() local 1023 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_dump_stats() local 1050 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_reset() local 1069 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_destroy() local 1094 dualpi2_unbind(struct Qdisc * q,unsigned long cl) dualpi2_unbind() argument 1101 struct dualpi2_sched_data *q = qdisc_priv(sch); dualpi2_tcf_block() local [all...] |
| H A D | sch_netem.c | 35 Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based 60 [1] NetemCLG Home http://netgroup.uniroma2.it/NetemCLG 63 in the Netem module in the Linux kernel", available in [1] 125 TX_IN_GAP_PERIOD = 1, 132 GOOD_STATE = 1, 145 u32 a4; /* p14 for 4-states or 1-k for GE */ 200 rho = (u64)state->rho + 1; in get_crandom() 201 answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; in get_crandom() 210 static bool loss_4state(struct netem_sched_data *q) in loss_4state() argument 212 struct clgstate *clg = &q in loss_4state() 275 loss_gilb_ell(struct netem_sched_data * q) loss_gilb_ell() argument 297 loss_event(struct netem_sched_data * q) loss_event() argument 357 packet_time_ns(u64 len,const struct netem_sched_data * q) packet_time_ns() argument 374 struct netem_sched_data *q = qdisc_priv(sch); tfifo_reset() local 393 struct netem_sched_data *q = qdisc_priv(sch); tfifo_enqueue() local 452 struct netem_sched_data *q = qdisc_priv(sch); netem_enqueue() local 655 get_slot_next(struct netem_sched_data * q,u64 now) get_slot_next() argument 674 netem_peek(struct netem_sched_data * q) netem_peek() argument 691 netem_erase_head(struct netem_sched_data * q,struct sk_buff * skb) netem_erase_head() argument 704 struct netem_sched_data *q = qdisc_priv(sch); netem_dequeue() local 788 struct netem_sched_data *q = qdisc_priv(sch); netem_reset() local 829 get_slot(struct netem_sched_data * q,const struct nlattr * attr) get_slot() argument 851 get_correlation(struct netem_sched_data * q,const struct nlattr * attr) get_correlation() argument 860 get_reorder(struct netem_sched_data * q,const struct nlattr * attr) get_reorder() argument 868 get_corrupt(struct netem_sched_data * q,const struct nlattr * attr) get_corrupt() argument 876 get_rate(struct netem_sched_data * q,const struct nlattr * attr) get_rate() argument 890 get_loss_clg(struct netem_sched_data * q,const struct nlattr * attr) get_loss_clg() argument 982 struct Qdisc *root, *q; check_netem_in_tree() local 1016 struct netem_sched_data *q = qdisc_priv(sch); netem_change() local 1132 struct netem_sched_data *q = qdisc_priv(sch); netem_init() local 1149 struct netem_sched_data *q = qdisc_priv(sch); netem_destroy() local 1158 dump_loss_model(const struct netem_sched_data * q,struct sk_buff * skb) dump_loss_model() argument 1210 const struct netem_sched_data *q = qdisc_priv(sch); netem_dump() local 1297 struct netem_sched_data *q = qdisc_priv(sch); netem_dump_class() local 1311 struct netem_sched_data *q = qdisc_priv(sch); netem_graft() local 1319 struct netem_sched_data *q = qdisc_priv(sch); netem_leaf() local [all...] |
| H A D | sch_sfq.c | 68 - max mtu to 2^18-1; 76 #define SFQ_MAX_FLOWS (0x10000 - SFQ_MAX_DEPTH - 1) /* max number of flows */ 80 /* This type should contain at least SFQ_MAX_DEPTH + 1 + SFQ_MAX_FLOWS values */ 85 * Small indexes [0 ... SFQ_MAX_FLOWS - 1] are 'pointers' to slots[] array 126 struct sfq_head dep[SFQ_MAX_DEPTH + 1]; 129 * dep[1] : list of flows with 1 packet 143 static inline struct sfq_head *sfq_dep_head(struct sfq_sched_data *q, sfq_index val) in sfq_dep_head() argument 146 return &q->slots[val].dep; in sfq_dep_head() 147 return &q->dep[val - SFQ_MAX_FLOWS]; in sfq_dep_head() 150 static unsigned int sfq_hash(const struct sfq_sched_data *q, in sfq_hash() argument [all …]
|
| H A D | sch_skbprio.c | 40 static u16 calc_new_high_prio(const struct skbprio_sched_data *q) in calc_new_high_prio() argument 44 for (prio = q->highest_prio - 1; prio >= q->lowest_prio; prio--) { in calc_new_high_prio() 45 if (!skb_queue_empty(&q->qdiscs[prio])) in calc_new_high_prio() 53 static u16 calc_new_low_prio(const struct skbprio_sched_data *q) in calc_new_low_prio() argument 57 for (prio = q->lowest_prio + 1; prio <= q->highest_prio; prio++) { in calc_new_low_prio() 58 if (!skb_queue_empty(&q->qdiscs[prio])) in calc_new_low_prio() 62 /* SKB queue is empty, return SKBPRIO_MAX_PRIORITY - 1 in calc_new_low_prio() 65 return SKBPRIO_MAX_PRIORITY - 1; in calc_new_low_prio() 71 const unsigned int max_priority = SKBPRIO_MAX_PRIORITY - 1; in skbprio_enqueue() 72 struct skbprio_sched_data *q = qdisc_priv(sch); in skbprio_enqueue() local [all …]
|
| H A D | sch_fq.c | 66 * If packets have monotically increasing time_to_send, they are placed in O(1) 75 unsigned long age; /* (jiffies | 1UL) when flow was emptied, for gc */ 79 /* Following field is only used for q->internal, 80 * because q->internal is not hashed in fq_root[] 93 struct rb_node rate_node; /* anchor in q->delayed tree */ 109 #define FQ_PRIO2BAND_CRUMB_SIZE ((TC_PRIO_MAX + 1) >> 2) 176 f->age = jiffies | 1UL; in fq_flow_set_detached() 181 return !!(f->age & 1UL); in fq_flow_is_detached() 197 static void fq_flow_add_tail(struct fq_sched_data *q, struct fq_flow *flow, in fq_flow_add_tail() argument 200 struct fq_perband_flows *pband = &q->band_flows[flow->band]; in fq_flow_add_tail() [all …]
|
| H A D | sch_cake.c | 102 * @rec_inv_sqrt: reciprocal value of sqrt(count) >> 1 272 CAKE_FLAG_AUTORATE_INGRESS = BIT(1), 311 static u16 quantum_div[CAKE_QUEUES + 1] = {0}; 317 1, 1, 1, 1, 1, 1, 1, 1, 327 2, 0, 1, 2, 4, 2, 2, 2, 328 1, 2, 1, 2, 1, 2, 1, 2, 338 0, 1, 0, 0, 2, 0, 0, 0, 339 1, 0, 0, 0, 0, 0, 0, 0, 349 0, 1, 0, 0, 2, 0, 0, 0, 350 1, 0, 0, 0, 0, 0, 0, 0, [all …]
|
| H A D | sch_multiq.c | 32 struct multiq_sched_data *q = qdisc_priv(sch); in multiq_classify() local 35 struct tcf_proto *fl = rcu_dereference_bh(q->filter_list); in multiq_classify() 53 if (band >= q->bands) in multiq_classify() 54 return q->queues[0]; in multiq_classify() 56 return q->queues[band]; in multiq_classify() 79 sch->q.qlen++; in multiq_enqueue() 89 struct multiq_sched_data *q = qdisc_priv(sch); in multiq_dequeue() local 94 for (band = 0; band < q->bands; band++) { in multiq_dequeue() 96 q->curband++; in multiq_dequeue() 97 if (q->curband >= q->bands) in multiq_dequeue() [all …]
|
| H A D | sch_qfq.c | 25 [1] Paolo Valente, 52 aggregates. See [1] and [2] for a full description. 73 Lmax=1<<MTU_SHIFT, w_min = 1 . 80 inv_w = (1<<FRAC_BITS)/w_i 98 * in the range [1, 2^MAX_WSHIFT], and we try to map each aggregate i to the 108 #define QFQ_MAX_WEIGHT (1<<QFQ_MAX_WSHIFT) /* see qfq_slot_insert */ 112 #define ONE_FP (1UL << FRAC_BITS) 116 #define QFQ_MAX_LMAX (1UL << QFQ_MTU_SHIFT) 189 struct qfq_group groups[QFQ_MAX_INDEX + 1]; /* The groups. */ 212 struct qfq_sched *q = qdisc_priv(sch); in qfq_find_class() local [all …]
|
| H A D | sch_prio.c | 25 u8 prio2band[TC_PRIO_MAX+1]; 33 struct prio_sched_data *q = qdisc_priv(sch); in prio_classify() local 41 fl = rcu_dereference_bh(q->filter_list); in prio_classify() 57 return q->queues[q->prio2band[band & TC_PRIO_MAX]]; in prio_classify() 61 band = TC_H_MIN(band) - 1; in prio_classify() 62 if (band >= q->bands) in prio_classify() 63 return q->queues[q->prio2band[0]]; in prio_classify() 65 return q->queues[band]; in prio_classify() 89 sch->q.qlen++; in prio_enqueue() 99 struct prio_sched_data *q = qdisc_priv(sch); in prio_peek() local [all …]
|
| /linux/drivers/net/ethernet/fungible/funeth/ |
| H A D | funeth_rx.c | 22 /* Per packet headroom in non-XDP mode. Present only for 1-frag packets. */ 33 FUN_XDP_FLUSH_REDIR = 1, 50 static void cache_offer(struct funeth_rxq *q, const struct funeth_rxbuf *buf) in cache_offer() argument 52 struct funeth_rx_cache *c = &q->cache; in cache_offer() 58 dma_unmap_page_attrs(q->dma_dev, buf->dma_addr, PAGE_SIZE, in cache_offer() 67 static bool cache_get(struct funeth_rxq *q, struct funeth_rxbuf *rb) in cache_get() argument 69 struct funeth_rx_cache *c = &q->cache; in cache_get() 77 dma_sync_single_for_device(q->dma_dev, buf->dma_addr, in cache_get() 88 dma_unmap_page_attrs(q->dma_dev, buf->dma_addr, PAGE_SIZE, in cache_get() 98 static int funeth_alloc_page(struct funeth_rxq *q, struct funeth_rxbuf *rb, in funeth_alloc_page() argument [all …]
|
| H A D | funeth_tx.c | 48 dma_unmap_single(dev, addr[-1], data_len, DMA_TO_DEVICE); in fun_map_pkt() 56 static void *txq_end(const struct funeth_txq *q) in txq_end() argument 58 return (void *)q->hw_wb; in txq_end() 64 static unsigned int txq_to_end(const struct funeth_txq *q, void *p) in txq_to_end() argument 66 return txq_end(q) - p; in txq_to_end() 78 static struct fun_dataop_gl *fun_write_gl(const struct funeth_txq *q, in fun_write_gl() argument 90 i < ngle && txq_to_end(q, gle); i++, gle++) in fun_write_gl() 93 if (txq_to_end(q, gle) == 0) { in fun_write_gl() 94 gle = (struct fun_dataop_gl *)q->desc; in fun_write_gl() 107 static struct sk_buff *fun_tls_tx(struct sk_buff *skb, struct funeth_txq *q, in fun_tls_tx() argument [all …]
|
| /linux/drivers/net/wireless/broadcom/b43/ |
| H A D | pio.c | 24 static u16 generate_cookie(struct b43_pio_txqueue *q, in generate_cookie() argument 37 cookie = (((u16)q->index + 1) << 12); in generate_cookie() 49 struct b43_pio_txqueue *q = NULL; in parse_cookie() local 54 q = pio->tx_queue_AC_BK; in parse_cookie() 57 q = pio->tx_queue_AC_BE; in parse_cookie() 60 q = pio->tx_queue_AC_VI; in parse_cookie() 63 q = pio->tx_queue_AC_VO; in parse_cookie() 66 q = pio->tx_queue_mcast; in parse_cookie() 69 if (B43_WARN_ON(!q)) in parse_cookie() 72 if (B43_WARN_ON(pack_index >= ARRAY_SIZE(q->packets))) in parse_cookie() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb3/ |
| H A D | sge.c | 66 #define FL1_PG_ORDER (PAGE_SIZE > 8192 ? 0 : 1) 94 TXQ_RUNNING = 1 << 0, /* fetch engine is running */ 95 TXQ_LAST_PKT_DB = 1 << 1, /* last packet rang the doorbell */ 141 dma_addr_t addr[MAX_SKB_FRAGS + 1]; 148 * desc = 1 + (flits - 2) / (WR_FLITS - 1). 154 #if SGE_NUM_GENBITS == 1 155 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 160 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 165 # error "SGE_NUM_GENBITS must be 1 or 2" 169 static inline struct sge_qset *rspq_to_qset(const struct sge_rspq *q) in rspq_to_qset() argument [all …]
|
| /linux/drivers/s390/cio/ |
| H A D | qdio_main.c | 44 " lgr 1,%[schid]\n" in do_siga_sync() 52 : CC_CLOBBER_LIST("0", "1", "2", "3")); in do_siga_sync() 63 " lgr 1,%[schid]\n" in do_siga_input() 69 : CC_CLOBBER_LIST("0", "1", "2")); in do_siga_input() 92 " lgr 1,%[schid]\n" in do_siga_output() 100 : CC_CLOBBER_LIST("0", "1", "2", "3")); in do_siga_output() 107 * @q: queue to manipulate 116 static int qdio_do_eqbs(struct qdio_q *q, unsigned char *state, in qdio_do_eqbs() argument 119 int tmp_count = count, tmp_start = start, nr = q->nr; in qdio_do_eqbs() 122 qperf_inc(q, eqbs); in qdio_do_eqbs() [all …]
|
| /linux/lib/crypto/ |
| H A D | gf128mul.c | 25 1. distributions of this source code include the above copyright 57 #define gf128mul_dat(q) { \ argument 58 q(0x00), q(0x01), q(0x02), q(0x03), q(0x04), q(0x05), q(0x06), q(0x07),\ 59 q(0x08), q(0x09), q(0x0a), q(0x0b), q(0x0c), q(0x0d), q(0x0e), q(0x0f),\ 60 q(0x10), q(0x11), q(0x12), q(0x13), q(0x14), q(0x15), q(0x16), q(0x17),\ 61 q(0x18), q(0x19), q(0x1a), q(0x1b), q(0x1c), q(0x1d), q(0x1e), q(0x1f),\ 62 q(0x20), q(0x21), q(0x22), q(0x23), q(0x24), q(0x25), q(0x26), q(0x27),\ 63 q(0x28), q(0x29), q(0x2a), q(0x2b), q(0x2c), q(0x2d), q(0x2e), q(0x2f),\ 64 q(0x30), q(0x31), q(0x32), q(0x33), q(0x34), q(0x35), q(0x36), q(0x37),\ 65 q(0x38), q(0x39), q(0x3a), q(0x3b), q(0x3c), q(0x3d), q(0x3e), q(0x3f),\ [all …]
|
| /linux/sound/core/seq/oss/ |
| H A D | seq_oss_readq.c | 20 //#define SNDRV_SEQ_OSS_MAX_TIMEOUT (unsigned long)(-1) 35 struct seq_oss_readq *q; in snd_seq_oss_readq_new() local 37 q = kzalloc_obj(*q); in snd_seq_oss_readq_new() 38 if (!q) in snd_seq_oss_readq_new() 41 q->q = kzalloc_objs(union evrec, maxlen); in snd_seq_oss_readq_new() 42 if (!q->q) { in snd_seq_oss_readq_new() 43 kfree(q); in snd_seq_oss_readq_new() 47 q->maxlen = maxlen; in snd_seq_oss_readq_new() 48 q->qlen = 0; in snd_seq_oss_readq_new() 49 q->head = q->tail = 0; in snd_seq_oss_readq_new() [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_guc_submit.c | 54 exec_queue_to_guc(struct xe_exec_queue *q) in exec_queue_to_guc() argument 56 return &q->gt->uc.guc; in exec_queue_to_guc() 64 #define EXEC_QUEUE_STATE_REGISTERED (1 << 0) 65 #define EXEC_QUEUE_STATE_ENABLED (1 << 1) 66 #define EXEC_QUEUE_STATE_PENDING_ENABLE (1 << 2) 67 #define EXEC_QUEUE_STATE_PENDING_DISABLE (1 << 3) 68 #define EXEC_QUEUE_STATE_DESTROYED (1 << 4) 69 #define EXEC_QUEUE_STATE_SUSPENDED (1 << 5) 70 #define EXEC_QUEUE_STATE_RESET (1 << 6) 71 #define EXEC_QUEUE_STATE_KILLED (1 << 7) [all …]
|
| /linux/drivers/infiniband/sw/rxe/ |
| H A D | rxe_queue.h | 18 * - The driver indices are always masked off to q->index_mask 26 * - By passing the type in the parameter list separate from q 83 void rxe_queue_reset(struct rxe_queue *q); 88 int rxe_queue_resize(struct rxe_queue *q, unsigned int *num_elem_p, 95 static inline u32 queue_next_index(struct rxe_queue *q, int index) in queue_next_index() argument 97 return (index + 1) & q->index_mask; in queue_next_index() 100 static inline u32 queue_get_producer(const struct rxe_queue *q, in queue_get_producer() argument 108 prod = smp_load_acquire(&q->buf->producer_index); in queue_get_producer() 112 prod = q->index; in queue_get_producer() 116 prod = q->buf->producer_index; in queue_get_producer() [all …]
|
| /linux/sound/core/seq/ |
| H A D | seq_queue.c | 50 static int queue_list_add(struct snd_seq_queue *q) in queue_list_add() argument 57 queue_list[i] = q; in queue_list_add() 58 q->queue = i; in queue_list_add() 63 return -1; in queue_list_add() 68 struct snd_seq_queue *q; in queue_list_remove() local 71 q = queue_list[id]; in queue_list_remove() 72 if (q) { in queue_list_remove() 73 guard(spinlock)(&q->owner_lock); in queue_list_remove() 74 if (q->owner == client) { in queue_list_remove() 76 q->klocked = 1; in queue_list_remove() [all …]
|
| /linux/drivers/net/ethernet/pensando/ionic/ |
| H A D | ionic_txrx.c | 15 static dma_addr_t ionic_tx_map_single(struct ionic_queue *q, 18 static dma_addr_t ionic_tx_map_frag(struct ionic_queue *q, 22 static void ionic_tx_desc_unmap_bufs(struct ionic_queue *q, 25 static void ionic_tx_clean(struct ionic_queue *q, 30 static inline void ionic_txq_post(struct ionic_queue *q, bool ring_dbell) in ionic_txq_post() argument 36 ionic_q_post(q, ring_dbell); in ionic_txq_post() 39 static inline void ionic_rxq_post(struct ionic_queue *q, bool ring_dbell) in ionic_rxq_post() argument 41 ionic_q_post(q, ring_dbell); in ionic_rxq_post() 44 bool ionic_txq_poke_doorbell(struct ionic_queue *q) in ionic_txq_poke_doorbell() argument 50 netdev = q->lif->netdev; in ionic_txq_poke_doorbell() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | pci.c | 101 struct mlxsw_pci_queue *q; member 174 static char *__mlxsw_pci_queue_elem_get(struct mlxsw_pci_queue *q, in __mlxsw_pci_queue_elem_get() argument 177 return q->mem_item.buf + (elem_size * elem_index); in __mlxsw_pci_queue_elem_get() 181 mlxsw_pci_queue_elem_info_get(struct mlxsw_pci_queue *q, int elem_index) in mlxsw_pci_queue_elem_info_get() argument 183 return &q->elem_info[elem_index]; in mlxsw_pci_queue_elem_info_get() 187 mlxsw_pci_queue_elem_info_producer_get(struct mlxsw_pci_queue *q) in mlxsw_pci_queue_elem_info_producer_get() argument 189 int index = q->producer_counter & (q->count - 1); in mlxsw_pci_queue_elem_info_producer_get() 191 if ((u16) (q->producer_counter - q->consumer_counter) == q->count) in mlxsw_pci_queue_elem_info_producer_get() 193 return mlxsw_pci_queue_elem_info_get(q, index); in mlxsw_pci_queue_elem_info_producer_get() 197 mlxsw_pci_queue_elem_info_consumer_get(struct mlxsw_pci_queue *q) in mlxsw_pci_queue_elem_info_consumer_get() argument [all …]
|
| /linux/drivers/accel/habanalabs/common/ |
| H A D | hw_queue.c | 23 ptr &= ((HL_QUEUE_LENGTH << 1) - 1); in hl_hw_queue_add_ptr() 28 return atomic_read(ci) & ((queue_len << 1) - 1); in queue_ci_get() 31 static inline int queue_free_slots(struct hl_hw_queue *q, u32 queue_len) in queue_free_slots() argument 33 int delta = (q->pi - queue_ci_get(&q->ci, queue_len)); in queue_free_slots() 44 struct hl_hw_queue *q; in hl_hw_queue_update_ci() local 50 q = &hdev->kernel_queues[0]; in hl_hw_queue_update_ci() 53 if (!hdev->asic_prop.max_queues || q->queue_type == QUEUE_TYPE_HW) in hl_hw_queue_update_ci() 58 * 1. All queues of a non completion CS will never get a completion. in hl_hw_queue_update_ci() 61 for (i = 0 ; i < hdev->asic_prop.max_queues ; i++, q++) { in hl_hw_queue_update_ci() 62 if (!cs_needs_completion(cs) || q->queue_type == QUEUE_TYPE_INT) in hl_hw_queue_update_ci() [all …]
|
| /linux/tools/testing/selftests/ublk/ |
| H A D | kublk.h | 36 /****************** part 1: libublk ********************/ 44 #define UBLK_IO_MAX_BYTES (1 << 20) 46 #define UBLK_MAX_QUEUES (1 << UBLK_MAX_QUEUES_SHIFT) 48 #define UBLK_MAX_THREADS (1 << UBLK_MAX_THREADS_SHIFT) 74 unsigned int logging:1; 75 unsigned int all:1; 76 unsigned int fg:1; 77 unsigned int recovery:1; 78 unsigned int auto_zc_fallback:1; 79 unsigned int per_io_tasks:1; [all …]
|