Lines Matching +full:free +full:- +full:running

1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT)
4 * Copyright (C) 2015-2024 Google LLC
10 #include <linux/dma-mapping.h>
49 #define GVE_DATA_SLOT_ADDR_PAGE_MASK (~(PAGE_SIZE - 1))
69 (GVE_ADMINQ_BUFFER_SIZE / sizeof(((struct gve_adminq_queried_flow_rule *)0)->location))
84 /* 2K buffers for DQO-QPL */
89 /* If number of free/recyclable buffers are less than this threshold; driver
90 * allocs and uses a non-qpl page on the receive path of DQO QPL to free
184 * which point every other offset is free to be reused.
188 /* Linked list index to next element in the list, or -1 if none */
192 /* `head` and `tail` are indices into an array, or -1 if empty. */
245 * buf_states, or -1 if empty.
250 * buf_states, or -1 if empty.
262 * buf_states, or -1 if empty.
278 /* Address info of the buffers for header-split */
285 u64 rbytes; /* free-running bytes received */
286 u64 rx_hsplit_bytes; /* free-running header bytes received */
287 u64 rpackets; /* free-running packets received */
288 u32 cnt; /* free-running total number of completed packets */
289 u32 fill_cnt; /* free-running total number of descs and buffs posted */
291 u64 rx_hsplit_pkt; /* free-running packets with headers split */
292 u64 rx_copybreak_pkt; /* free-running count of copybreak packets */
293 u64 rx_copied_pkt; /* free-running total number of copied packets */
294 u64 rx_skb_alloc_fail; /* free-running count of skb alloc fails */
295 u64 rx_buf_alloc_fail; /* free-running count of buffer alloc fails */
296 u64 rx_desc_err_dropped_pkt; /* free-running count of packets dropped by descriptor error */
297 /* free-running count of unsplit packets due to header buffer overflow or hdr_len is 0 */
299 u64 rx_cont_packet_cnt; /* free-running multi-fragment packets received */
300 u64 rx_frag_flip_cnt; /* free-running count of rx segments where page_flip was used */
301 u64 rx_frag_copy_cnt; /* free-running count of rx segments copied */
302 u64 rx_frag_alloc_cnt; /* free-running count of rx page allocations */
357 /* A TX buffer - each queue has one */
374 /* Packet is in free list, available to be allocated.
381 * re-injection completion.
407 /* Linked list index to next element in the list, or -1 if none */
410 /* Linked list index to prev element in the list, or -1 if none.
422 * freed if the corresponding re-injection completion is not received
430 /* Cacheline 0 -- Accessed & dirtied during transmit */
442 * pending_packets, or -1 if empty.
460 /* free running number of packet buf descriptors posted */
462 /* free running number of packet buf descriptors completed */
468 * tx_qpl_buf_next, or -1 if empty.
477 /* Free running count of the number of QPL tx buffers
488 /* Cacheline 1 -- Accessed & dirtied during gve_clean_tx_done */
506 * pending_packets, or -1 if empty.
532 * tx_qpl_buf_next, or -1 if empty.
541 /* Free running count of the number of tx buffers
548 u64 pkt_done; /* free-running - total packets completed */
549 u64 bytes_done; /* free-running - total bytes completed */
550 u64 dropped_pkt; /* free-running - total packets dropped */
553 /* Cacheline 2 -- Read-mostly fields */
595 /* Slow-path fields */
767 /* Admin queue - see gve_adminq.h*/
773 u32 adminq_prod_cnt; /* free-running count of AQ cmds executed */
774 u32 adminq_cmd_fail; /* free-running count of AQ cmds failed */
775 u32 adminq_timeouts; /* free-running count of AQ cmds timeouts */
776 /* free-running count of per AQ cmd executed */
802 u32 stats_report_trigger_cnt; /* count of device-requested stats-reports since last reset */
835 u16 header_buf_size; /* device configured, header-split supported if non-zero */
867 return test_bit(GVE_PRIV_FLAGS_DO_RESET, &priv->service_task_flags); in gve_get_do_reset()
872 set_bit(GVE_PRIV_FLAGS_DO_RESET, &priv->service_task_flags); in gve_set_do_reset()
877 clear_bit(GVE_PRIV_FLAGS_DO_RESET, &priv->service_task_flags); in gve_clear_do_reset()
883 &priv->service_task_flags); in gve_get_reset_in_progress()
888 set_bit(GVE_PRIV_FLAGS_RESET_IN_PROGRESS, &priv->service_task_flags); in gve_set_reset_in_progress()
893 clear_bit(GVE_PRIV_FLAGS_RESET_IN_PROGRESS, &priv->service_task_flags); in gve_clear_reset_in_progress()
899 &priv->service_task_flags); in gve_get_probe_in_progress()
904 set_bit(GVE_PRIV_FLAGS_PROBE_IN_PROGRESS, &priv->service_task_flags); in gve_set_probe_in_progress()
909 clear_bit(GVE_PRIV_FLAGS_PROBE_IN_PROGRESS, &priv->service_task_flags); in gve_clear_probe_in_progress()
915 &priv->service_task_flags); in gve_get_do_report_stats()
920 set_bit(GVE_PRIV_FLAGS_DO_REPORT_STATS, &priv->service_task_flags); in gve_set_do_report_stats()
925 clear_bit(GVE_PRIV_FLAGS_DO_REPORT_STATS, &priv->service_task_flags); in gve_clear_do_report_stats()
930 return test_bit(GVE_PRIV_FLAGS_ADMIN_QUEUE_OK, &priv->state_flags); in gve_get_admin_queue_ok()
935 set_bit(GVE_PRIV_FLAGS_ADMIN_QUEUE_OK, &priv->state_flags); in gve_set_admin_queue_ok()
940 clear_bit(GVE_PRIV_FLAGS_ADMIN_QUEUE_OK, &priv->state_flags); in gve_clear_admin_queue_ok()
945 return test_bit(GVE_PRIV_FLAGS_DEVICE_RESOURCES_OK, &priv->state_flags); in gve_get_device_resources_ok()
950 set_bit(GVE_PRIV_FLAGS_DEVICE_RESOURCES_OK, &priv->state_flags); in gve_set_device_resources_ok()
955 clear_bit(GVE_PRIV_FLAGS_DEVICE_RESOURCES_OK, &priv->state_flags); in gve_clear_device_resources_ok()
960 return test_bit(GVE_PRIV_FLAGS_DEVICE_RINGS_OK, &priv->state_flags); in gve_get_device_rings_ok()
965 set_bit(GVE_PRIV_FLAGS_DEVICE_RINGS_OK, &priv->state_flags); in gve_set_device_rings_ok()
970 clear_bit(GVE_PRIV_FLAGS_DEVICE_RINGS_OK, &priv->state_flags); in gve_clear_device_rings_ok()
975 return test_bit(GVE_PRIV_FLAGS_NAPI_ENABLED, &priv->state_flags); in gve_get_napi_enabled()
980 set_bit(GVE_PRIV_FLAGS_NAPI_ENABLED, &priv->state_flags); in gve_set_napi_enabled()
985 clear_bit(GVE_PRIV_FLAGS_NAPI_ENABLED, &priv->state_flags); in gve_clear_napi_enabled()
990 return test_bit(GVE_PRIV_FLAGS_REPORT_STATS, &priv->ethtool_flags); in gve_get_report_stats()
995 clear_bit(GVE_PRIV_FLAGS_REPORT_STATS, &priv->ethtool_flags); in gve_clear_report_stats()
1003 return &priv->db_bar2[be32_to_cpu(*block->irq_db_index)]; in gve_irq_doorbell()
1017 return (priv->num_ntfy_blks / 2) + queue_idx; in gve_rx_idx_to_ntfy()
1022 return priv->queue_format == GVE_GQI_QPL_FORMAT || in gve_is_qpl()
1023 priv->queue_format == GVE_DQO_QPL_FORMAT; in gve_is_qpl()
1033 return tx_cfg->num_queues + num_xdp_queues; in gve_num_tx_qpls()
1040 if (priv->queue_format != GVE_GQI_QPL_FORMAT) in gve_num_xdp_qpls()
1043 return priv->num_xdp_queues; in gve_num_xdp_qpls()
1052 return rx_cfg->num_queues; in gve_num_rx_qpls()
1062 return priv->tx_cfg.max_queues + rx_qid; in gve_rx_qpl_id()
1067 return tx_cfg->max_queues + rx_qid; in gve_get_rx_qpl_id()
1083 * out-of-order completions. Set it to two times of ring size. in gve_get_rx_pages_per_qpl_dqo()
1092 if (id < gve_rx_start_qpl_id(&priv->tx_cfg)) in gve_qpl_dma_dir()
1100 return priv->queue_format == GVE_GQI_RDA_FORMAT || in gve_is_gqi()
1101 priv->queue_format == GVE_GQI_QPL_FORMAT; in gve_is_gqi()
1106 return priv->tx_cfg.num_queues + priv->num_xdp_queues; in gve_num_tx_queues()
1111 return priv->tx_cfg.num_queues + queue_id; in gve_xdp_tx_queue_id()
1121 switch (priv->queue_format) { in gve_supports_xdp_xmit()