Lines Matching refs:_ring

932 #define IRDMA_RING_GET_NEXT_TAIL(_ring, _idx) \  argument
934 ((_ring).tail + (_idx)) % (_ring).size \
949 #define IRDMA_RING_INIT(_ring, _size) \ argument
951 (_ring).head = 0; \
952 (_ring).tail = 0; \
953 (_ring).size = (_size); \
955 #define IRDMA_RING_SIZE(_ring) ((_ring).size) argument
956 #define IRDMA_RING_CURRENT_HEAD(_ring) ((_ring).head) argument
957 #define IRDMA_RING_CURRENT_TAIL(_ring) ((_ring).tail) argument
959 #define IRDMA_RING_MOVE_HEAD(_ring, _retcode) \ argument
962 size = (_ring).size; \
963 if (!IRDMA_RING_FULL_ERR(_ring)) { \
964 (_ring).head = ((_ring).head + 1) % size; \
970 #define IRDMA_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \ argument
973 size = (_ring).size; \
974 if ((IRDMA_RING_USED_QUANTA(_ring) + (_count)) < size) { \
975 (_ring).head = ((_ring).head + (_count)) % size; \
981 #define IRDMA_SQ_RING_MOVE_HEAD(_ring, _retcode) \ argument
984 size = (_ring).size; \
985 if (!IRDMA_SQ_RING_FULL_ERR(_ring)) { \
986 (_ring).head = ((_ring).head + 1) % size; \
992 #define IRDMA_SQ_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \ argument
995 size = (_ring).size; \
996 if ((IRDMA_RING_USED_QUANTA(_ring) + (_count)) < (size - 256)) { \
997 (_ring).head = ((_ring).head + (_count)) % size; \
1003 #define IRDMA_RING_MOVE_HEAD_BY_COUNT_NOCHECK(_ring, _count) \ argument
1004 (_ring).head = ((_ring).head + (_count)) % (_ring).size
1006 #define IRDMA_RING_MOVE_TAIL(_ring) \ argument
1007 (_ring).tail = ((_ring).tail + 1) % (_ring).size
1009 #define IRDMA_RING_MOVE_HEAD_NOCHECK(_ring) \ argument
1010 (_ring).head = ((_ring).head + 1) % (_ring).size
1012 #define IRDMA_RING_MOVE_TAIL_BY_COUNT(_ring, _count) \ argument
1013 (_ring).tail = ((_ring).tail + (_count)) % (_ring).size
1015 #define IRDMA_RING_SET_TAIL(_ring, _pos) \ argument
1016 (_ring).tail = (_pos) % (_ring).size
1018 #define IRDMA_RING_FULL_ERR(_ring) \ argument
1020 (IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 1)) \
1023 #define IRDMA_ERR_RING_FULL2(_ring) \ argument
1025 (IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 2)) \
1028 #define IRDMA_ERR_RING_FULL3(_ring) \ argument
1030 (IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 3)) \
1033 #define IRDMA_SQ_RING_FULL_ERR(_ring) \ argument
1035 (IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 257)) \
1038 #define IRDMA_ERR_SQ_RING_FULL2(_ring) \ argument
1040 (IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 258)) \
1042 #define IRDMA_ERR_SQ_RING_FULL3(_ring) \ argument
1044 (IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 259)) \
1046 #define IRDMA_RING_MORE_WORK(_ring) \ argument
1048 (IRDMA_RING_USED_QUANTA(_ring) != 0) \
1051 #define IRDMA_RING_USED_QUANTA(_ring) \ argument
1053 (((_ring).head + (_ring).size - (_ring).tail) % (_ring).size) \
1056 #define IRDMA_RING_FREE_QUANTA(_ring) \ argument
1058 ((_ring).size - IRDMA_RING_USED_QUANTA(_ring) - 1) \
1061 #define IRDMA_SQ_RING_FREE_QUANTA(_ring) \ argument
1063 ((_ring).size - IRDMA_RING_USED_QUANTA(_ring) - 257) \
1066 #define IRDMA_ATOMIC_RING_MOVE_HEAD(_ring, index, _retcode) \ argument
1068 index = IRDMA_RING_CURRENT_HEAD(_ring); \
1069 IRDMA_RING_MOVE_HEAD(_ring, _retcode); \