Lines Matching defs:ring
423 "bnxt: ring busy w/ flush pending!\n");
1709 * -EBUSY - completion ring does not have all the agg buffers yet
1932 /* In netpoll mode, if we are using a combined completion ring, we need to
2156 netdev_warn(bp->dev, "Ring monitor event, ring type %lu id 0x%x\n",
2163 netdev_warn(bp->dev, "Unknown RX agg ring id 0x%x\n",
2263 /* disable ring IRQ */
2387 /* ACK completion ring before freeing tx ring and producing new
2389 * ring.
2449 "Invalid completion received on special ring\n");
2926 struct bnxt_ring_struct *ring;
2940 ring = &rxr->rx_ring_struct;
2941 bnxt_free_ring(bp, &ring->ring_mem);
2943 ring = &rxr->rx_agg_ring_struct;
2944 bnxt_free_ring(bp, &ring->ring_mem);
2980 struct bnxt_ring_struct *ring;
2982 ring = &rxr->rx_ring_struct;
3000 rc = bnxt_alloc_ring(bp, &ring->ring_mem);
3004 ring->grp_idx = i;
3008 ring = &rxr->rx_agg_ring_struct;
3009 rc = bnxt_alloc_ring(bp, &ring->ring_mem);
3013 ring->grp_idx = i;
3036 struct bnxt_ring_struct *ring;
3044 ring = &txr->tx_ring_struct;
3046 bnxt_free_ring(bp, &ring->ring_mem);
3072 struct bnxt_ring_struct *ring;
3075 ring = &txr->tx_ring_struct;
3077 rc = bnxt_alloc_ring(bp, &ring->ring_mem);
3081 ring->grp_idx = txr->bnapi->index;
3101 ring->queue_id = bp->q_info[qidx].queue_id;
3120 struct bnxt_ring_struct *ring;
3127 ring = &cpr->cp_ring_struct;
3129 bnxt_free_ring(bp, &ring->ring_mem);
3135 ring = &cpr2->cp_ring_struct;
3136 bnxt_free_ring(bp, &ring->ring_mem);
3147 struct bnxt_ring_struct *ring;
3155 ring = &cpr->cp_ring_struct;
3156 rmem = &ring->ring_mem;
3181 struct bnxt_ring_struct *ring;
3188 ring = &cpr->cp_ring_struct;
3190 rc = bnxt_alloc_ring(bp, &ring->ring_mem);
3195 ring->map_idx = i + ulp_msix;
3197 ring->map_idx = i;
3235 struct bnxt_ring_struct *ring;
3241 ring = &cpr->cp_ring_struct;
3242 rmem = &ring->ring_mem;
3253 ring = &rxr->rx_ring_struct;
3254 rmem = &ring->ring_mem;
3262 ring = &rxr->rx_agg_ring_struct;
3263 rmem = &ring->ring_mem;
3276 ring = &txr->tx_ring_struct;
3277 rmem = &ring->ring_mem;
3287 static void bnxt_init_rxbd_pages(struct bnxt_ring_struct *ring, u32 type)
3293 rx_buf_ring = (struct rx_bd **)ring->ring_mem.pg_arr;
3294 for (i = 0, prod = 0; i < ring->ring_mem.nr_pages; i++) {
3319 netdev_warn(dev, "init'ed rx ring %d with %d/%d skbs only\n",
3333 netdev_warn(dev, "init'ed rx ring %d with %d/%d pages only\n",
3361 struct bnxt_ring_struct *ring;
3371 ring = &rxr->rx_ring_struct;
3372 bnxt_init_rxbd_pages(ring, type);
3378 ring->fw_ring_id = INVALID_HW_RING_ID;
3380 ring = &rxr->rx_agg_ring_struct;
3381 ring->fw_ring_id = INVALID_HW_RING_ID;
3387 bnxt_init_rxbd_pages(ring, type);
3399 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct;
3401 ring->fw_ring_id = INVALID_HW_RING_ID;
3410 ring = &cpr2->cp_ring_struct;
3411 ring->fw_ring_id = INVALID_HW_RING_ID;
3448 struct bnxt_ring_struct *ring = &txr->tx_ring_struct;
3450 ring->fw_ring_id = INVALID_HW_RING_ID;
3607 netdev_warn(bp->dev, "rx agg ring size %d reduced to %d.\n",
3630 * the RX ring size.
3642 netdev_warn(bp->dev, "completion ring size %d reduced to %d.\n",
4356 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct;
4358 if (ring->fw_ring_id != INVALID_HW_RING_ID)
5068 static u16 bnxt_cp_ring_from_grp(struct bnxt *bp, struct bnxt_ring_struct *ring)
5072 grp_info = &bp->grp_info[ring->grp_idx];
5168 /* Fill the RSS indirection table with ring group ids */
5336 unsigned int ring = 0, grp_idx;
5380 ring = 0;
5382 ring = vnic_id - 1;
5384 ring = bp->rx_nr_rings - 1;
5386 grp_idx = bp->rx_ring[ring].bnapi->index;
5440 /* map ring groups to this vnic */
5444 netdev_err(bp->dev, "Not enough ring groups avail:%x req:%x\n",
5568 struct bnxt_ring_struct *ring,
5574 struct bnxt_ring_mem_info *rmem = &ring->ring_mem;
5590 /* Association of ring index with doorbell index and MSIX number */
5597 txr = container_of(ring, struct bnxt_tx_ring_info,
5600 /* Association of transmit ring with completion ring */
5601 grp_info = &bp->grp_info[ring->grp_idx];
5605 req.queue_id = cpu_to_le16(ring->queue_id);
5614 /* Association of rx ring with stats context */
5615 grp_info = &bp->grp_info[ring->grp_idx];
5628 /* Association of agg ring with rx ring */
5629 grp_info = &bp->grp_info[ring->grp_idx];
5645 /* Association of cp ring with nq */
5648 req.cq_handle = cpu_to_le64(ring->handle);
5662 netdev_err(bp->dev, "hwrm alloc invalid ring type %d\n",
5678 ring->fw_ring_id = ring_id;
5760 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct;
5761 u32 map_idx = ring->map_idx;
5766 rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx);
5771 bnxt_set_db(bp, &cpr->cp_db, type, map_idx, ring->fw_ring_id);
5774 bp->grp_info[i].cp_fw_ring_id = ring->fw_ring_id;
5777 rc = bnxt_hwrm_set_async_event_cr(bp, ring->fw_ring_id);
5779 netdev_warn(bp->dev, "Failed to set async event completion ring.\n");
5786 struct bnxt_ring_struct *ring;
5796 ring = &cpr2->cp_ring_struct;
5797 ring->handle = BNXT_TX_HDL;
5799 rc = hwrm_ring_alloc_send_msg(bp, ring, type2, map_idx);
5803 ring->fw_ring_id);
5806 ring = &txr->tx_ring_struct;
5808 rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx);
5811 bnxt_set_db(bp, &txr->tx_db, type, map_idx, ring->fw_ring_id);
5817 struct bnxt_ring_struct *ring = &rxr->rx_ring_struct;
5821 rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx);
5824 bnxt_set_db(bp, &rxr->rx_db, type, map_idx, ring->fw_ring_id);
5828 bp->grp_info[map_idx].rx_fw_ring_id = ring->fw_ring_id;
5835 ring = &cpr2->cp_ring_struct;
5836 ring->handle = BNXT_RX_HDL;
5837 rc = hwrm_ring_alloc_send_msg(bp, ring, type2, map_idx);
5841 ring->fw_ring_id);
5850 struct bnxt_ring_struct *ring =
5852 u32 grp_idx = ring->grp_idx;
5855 rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx);
5860 ring->fw_ring_id);
5863 bp->grp_info[grp_idx].agg_fw_ring_id = ring->fw_ring_id;
5871 struct bnxt_ring_struct *ring,
5884 req.ring_id = cpu_to_le16(ring->fw_ring_id);
5909 struct bnxt_ring_struct *ring = &txr->tx_ring_struct;
5911 if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5914 hwrm_ring_free_send_msg(bp, ring,
5918 ring->fw_ring_id = INVALID_HW_RING_ID;
5924 struct bnxt_ring_struct *ring = &rxr->rx_ring_struct;
5927 if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5930 hwrm_ring_free_send_msg(bp, ring,
5934 ring->fw_ring_id = INVALID_HW_RING_ID;
5946 struct bnxt_ring_struct *ring = &rxr->rx_agg_ring_struct;
5949 if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5952 hwrm_ring_free_send_msg(bp, ring, type,
5955 ring->fw_ring_id = INVALID_HW_RING_ID;
5974 struct bnxt_ring_struct *ring;
5981 ring = &cpr2->cp_ring_struct;
5982 if (ring->fw_ring_id == INVALID_HW_RING_ID)
5984 hwrm_ring_free_send_msg(bp, ring,
5987 ring->fw_ring_id = INVALID_HW_RING_ID;
5990 ring = &cpr->cp_ring_struct;
5991 if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5992 hwrm_ring_free_send_msg(bp, ring, type,
5994 ring->fw_ring_id = INVALID_HW_RING_ID;
6290 /* Old firmware does not need RX ring reservations but we still
6292 * we go through RX ring reservations first and then set up the
8164 /* configure default vnic, ring grp */
8325 netdev_err(bp->dev, "hwrm ring alloc failure rc: %x\n", rc);
8770 netdev_err(bp->dev, "ring reservation/IRQ init failure rc: %d\n", rc);
8775 netdev_err(bp->dev, "tx ring reservation failure\n");
8843 netdev_warn(bp->dev, "failed adding irq rmap for ring %d\n",
10033 /* Save ring stats before shutdown */
10877 /* Disable and flush TPA before resetting the RX ring */
10891 netdev_info_once(bp->dev, "RX ring reset not supported by firmware, falling back to global reset\n");
10893 netdev_warn(bp->dev, "RX ring reset failed, rc = %d, falling back to global reset\n",
12432 /* In initial default shared ring setting, each shared ring must have a
12433 * RX/TX ring pair.