19b8d05b8SZbigniew Bodek /*- 20835cc78SMarcin Wojtas * SPDX-License-Identifier: BSD-2-Clause 39b8d05b8SZbigniew Bodek * 48d6806cdSOsama Abboud * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. 59b8d05b8SZbigniew Bodek * All rights reserved. 69b8d05b8SZbigniew Bodek * 79b8d05b8SZbigniew Bodek * Redistribution and use in source and binary forms, with or without 89b8d05b8SZbigniew Bodek * modification, are permitted provided that the following conditions 99b8d05b8SZbigniew Bodek * are met: 109b8d05b8SZbigniew Bodek * 119b8d05b8SZbigniew Bodek * 1. Redistributions of source code must retain the above copyright 129b8d05b8SZbigniew Bodek * notice, this list of conditions and the following disclaimer. 139b8d05b8SZbigniew Bodek * 149b8d05b8SZbigniew Bodek * 2. Redistributions in binary form must reproduce the above copyright 159b8d05b8SZbigniew Bodek * notice, this list of conditions and the following disclaimer in the 169b8d05b8SZbigniew Bodek * documentation and/or other materials provided with the distribution. 179b8d05b8SZbigniew Bodek * 189b8d05b8SZbigniew Bodek * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 199b8d05b8SZbigniew Bodek * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 209b8d05b8SZbigniew Bodek * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 219b8d05b8SZbigniew Bodek * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 229b8d05b8SZbigniew Bodek * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 239b8d05b8SZbigniew Bodek * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 249b8d05b8SZbigniew Bodek * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 259b8d05b8SZbigniew Bodek * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 269b8d05b8SZbigniew Bodek * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 279b8d05b8SZbigniew Bodek * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 289b8d05b8SZbigniew Bodek * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 299b8d05b8SZbigniew Bodek * 309b8d05b8SZbigniew Bodek */ 319b8d05b8SZbigniew Bodek 329b8d05b8SZbigniew Bodek #ifndef ENA_SYSCTL_H 339b8d05b8SZbigniew Bodek #define ENA_SYSCTL_H 349b8d05b8SZbigniew Bodek 359b8d05b8SZbigniew Bodek #include <sys/types.h> 369b8d05b8SZbigniew Bodek #include <sys/sysctl.h> 379b8d05b8SZbigniew Bodek 389b8d05b8SZbigniew Bodek #include "ena.h" 399b8d05b8SZbigniew Bodek 4002a2a7ceSMarcin Wojtas void ena_sysctl_add_nodes(struct ena_adapter *adapter); 410e7d31f6SMarcin Wojtas void ena_sysctl_update_queue_node_nb(struct ena_adapter *adapter, int old, 420e7d31f6SMarcin Wojtas int new); 43f97993adSOsama Abboud int ena_sysctl_allocate_customer_metrics_buffer(struct ena_adapter *adapter); 449b8d05b8SZbigniew Bodek 4504cf2b88SMarcin Wojtas extern int ena_enable_9k_mbufs; 4604cf2b88SMarcin Wojtas #define ena_mbuf_sz (ena_enable_9k_mbufs ? MJUM9BYTES : MJUMPAGESIZE) 4704cf2b88SMarcin Wojtas 48beaadec9SMarcin Wojtas /* Force the driver to use large LLQ (Low Latency Queue) headers. */ 49*b1c38df0SOsama Abboud extern int ena_force_large_llq_header; 50beaadec9SMarcin Wojtas 519b8d05b8SZbigniew Bodek #endif /* !(ENA_SYSCTL_H) */ 52