Lines Matching refs:ring_size
348 static inline RING_IDX name##_mask(RING_IDX idx, RING_IDX ring_size) \
350 return idx & (ring_size - 1); \
355 RING_IDX ring_size) \
357 return buf + name##_mask(idx, ring_size); \
365 RING_IDX ring_size) \
368 size <= ring_size - *masked_cons) { \
371 memcpy(opaque, buf + *masked_cons, ring_size - *masked_cons); \
372 memcpy((unsigned char *)opaque + ring_size - *masked_cons, buf, \
373 size - (ring_size - *masked_cons)); \
375 *masked_cons = name##_mask(*masked_cons + size, ring_size); \
383 RING_IDX ring_size) \
386 size <= ring_size - *masked_prod) { \
389 memcpy(buf + *masked_prod, opaque, ring_size - *masked_prod); \
390 memcpy(buf, (unsigned char *)opaque + (ring_size - *masked_prod), \
391 size - (ring_size - *masked_prod)); \
393 *masked_prod = name##_mask(*masked_prod + size, ring_size); \
398 RING_IDX ring_size) \
405 prod = name##_mask(prod, ring_size); \
406 cons = name##_mask(cons, ring_size); \
409 return ring_size; \
414 size = ring_size - (cons - prod); \