_ring 1545 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_INIT(_ring, _size) \ _ring 1547 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).head = 0; \ _ring 1548 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).tail = 0; \ _ring 1549 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).size = (_size); \ _ring 1551 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_GETSIZE(_ring) ((_ring).size) _ring 1552 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_GETCURRENT_HEAD(_ring) ((_ring).head) _ring 1553 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_GETCURRENT_TAIL(_ring) ((_ring).tail) _ring 1555 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_MOVE_HEAD(_ring, _retcode) \ _ring 1558 drivers/infiniband/hw/i40iw/i40iw_d.h size = (_ring).size; \ _ring 1559 drivers/infiniband/hw/i40iw/i40iw_d.h if (!I40IW_RING_FULL_ERR(_ring)) { \ _ring 1560 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).head = ((_ring).head + 1) % size; \ _ring 1567 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \ _ring 1570 drivers/infiniband/hw/i40iw/i40iw_d.h size = (_ring).size; \ _ring 1571 drivers/infiniband/hw/i40iw/i40iw_d.h if ((I40IW_RING_WORK_AVAILABLE(_ring) + (_count)) < size) { \ _ring 1572 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).head = ((_ring).head + (_count)) % size; \ _ring 1579 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_MOVE_TAIL(_ring) \ _ring 1580 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).tail = ((_ring).tail + 1) % (_ring).size _ring 1582 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_MOVE_HEAD_NOCHECK(_ring) \ _ring 1583 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).head = ((_ring).head + 1) % (_ring).size _ring 1585 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_MOVE_TAIL_BY_COUNT(_ring, _count) \ _ring 1586 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).tail = ((_ring).tail + (_count)) % (_ring).size _ring 1588 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_SET_TAIL(_ring, _pos) \ _ring 1589 drivers/infiniband/hw/i40iw/i40iw_d.h (_ring).tail = (_pos) % (_ring).size _ring 1591 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_FULL_ERR(_ring) \ _ring 1593 drivers/infiniband/hw/i40iw/i40iw_d.h (I40IW_RING_WORK_AVAILABLE(_ring) == ((_ring).size - 1)) \ _ring 1596 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_ERR_RING_FULL2(_ring) \ _ring 1598 drivers/infiniband/hw/i40iw/i40iw_d.h (I40IW_RING_WORK_AVAILABLE(_ring) == ((_ring).size - 2)) \ _ring 1601 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_ERR_RING_FULL3(_ring) \ _ring 1603 drivers/infiniband/hw/i40iw/i40iw_d.h (I40IW_RING_WORK_AVAILABLE(_ring) == ((_ring).size - 3)) \ _ring 1606 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_MORE_WORK(_ring) \ _ring 1608 drivers/infiniband/hw/i40iw/i40iw_d.h (I40IW_RING_WORK_AVAILABLE(_ring) != 0) \ _ring 1611 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_WORK_AVAILABLE(_ring) \ _ring 1613 drivers/infiniband/hw/i40iw/i40iw_d.h (((_ring).head + (_ring).size - (_ring).tail) % (_ring).size) \ _ring 1616 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_RING_GET_WQES_AVAILABLE(_ring) \ _ring 1618 drivers/infiniband/hw/i40iw/i40iw_d.h ((_ring).size - I40IW_RING_WORK_AVAILABLE(_ring) - 1) \ _ring 1621 drivers/infiniband/hw/i40iw/i40iw_d.h #define I40IW_ATOMIC_RING_MOVE_HEAD(_ring, index, _retcode) \ _ring 1623 drivers/infiniband/hw/i40iw/i40iw_d.h index = I40IW_RING_GETCURRENT_HEAD(_ring); \ _ring 1624 drivers/infiniband/hw/i40iw/i40iw_d.h I40IW_RING_MOVE_HEAD(_ring, _retcode); \ _ring 258 drivers/net/ethernet/amd/xgbe/xgbe.h #define XGBE_GET_DESC_DATA(_ring, _idx) \ _ring 259 drivers/net/ethernet/amd/xgbe/xgbe.h ((_ring)->rdata + \ _ring 260 drivers/net/ethernet/amd/xgbe/xgbe.h ((_idx) & ((_ring)->rdesc_count - 1))) _ring 338 drivers/net/ethernet/hisilicon/hns/hnae.h #define hnae_buf_size(_ring) ((_ring)->buf_size) _ring 339 drivers/net/ethernet/hisilicon/hns/hnae.h #define hnae_page_order(_ring) (get_order(hnae_buf_size(_ring))) _ring 340 drivers/net/ethernet/hisilicon/hns/hnae.h #define hnae_page_size(_ring) (PAGE_SIZE << hnae_page_order(_ring)) _ring 621 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h #define hns3_buf_size(_ring) ((_ring)->buf_size) _ring 632 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h #define hns3_page_size(_ring) (PAGE_SIZE << hns3_page_order(_ring)) _ring 480 drivers/net/ethernet/intel/i40e/i40e_txrx.h #define i40e_rx_pg_size(_ring) (PAGE_SIZE << i40e_rx_pg_order(_ring)) _ring 437 drivers/net/ethernet/intel/iavf/iavf_txrx.h #define iavf_rx_pg_size(_ring) (PAGE_SIZE << iavf_rx_pg_order(_ring)) _ring 356 drivers/net/ethernet/intel/igb/igb.h #define igb_rx_pg_size(_ring) (PAGE_SIZE << igb_rx_pg_order(_ring)) _ring 517 drivers/net/ethernet/intel/igc/igc.h #define igc_rx_pg_size(_ring) (PAGE_SIZE << igc_rx_pg_order(_ring)) _ring 418 drivers/net/ethernet/intel/ixgbe/ixgbe.h #define ixgbe_rx_pg_size(_ring) (PAGE_SIZE << ixgbe_rx_pg_order(_ring)) _ring 207 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h #define ixgbevf_rx_pg_size(_ring) (PAGE_SIZE << ixgbevf_rx_pg_order(_ring)) _ring 95 drivers/net/ethernet/synopsys/dwc-xlgmac.h typeof(ring) _ring = (ring); \ _ring 96 drivers/net/ethernet/synopsys/dwc-xlgmac.h ((_ring)->desc_data_head + \ _ring 97 drivers/net/ethernet/synopsys/dwc-xlgmac.h ((idx) & ((_ring)->dma_desc_count - 1))); \