BPF List
 help / color / mirror / Atom feed
From: Tushar Vyavahare <tushar.vyavahare@intel.com>
To: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org, bjorn@kernel.org,
	magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
	jonathan.lemon@gmail.com, davem@davemloft.net, kuba@kernel.org,
	pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net,
	tirthendu.sarkar@intel.com, tushar.vyavahare@intel.com
Subject: [PATCH bpf-next 1/6] tools/include: add ethtool_ringparam definition to UAPI header
Date: Fri, 15 Mar 2024 14:07:21 +0000	[thread overview]
Message-ID: <20240315140726.22291-2-tushar.vyavahare@intel.com> (raw)
In-Reply-To: <20240315140726.22291-1-tushar.vyavahare@intel.com>

Introduce the definition for ethtool_ringparam in the UAPI header located
in the include directory. This is needed by the next patches as they run
tests with various ring sizes.

Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>
---
 tools/include/uapi/linux/ethtool.h | 41 ++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/tools/include/uapi/linux/ethtool.h b/tools/include/uapi/linux/ethtool.h
index 47afae3895ec..570afcd15bca 100644
--- a/tools/include/uapi/linux/ethtool.h
+++ b/tools/include/uapi/linux/ethtool.h
@@ -101,4 +101,45 @@ struct ethtool_drvinfo {
 
 #define ETHTOOL_GDRVINFO	0x00000003
 
+/**
+ * struct ethtool_ringparam - RX/TX ring parameters
+ * @cmd: Command number = %ETHTOOL_GRINGPARAM or %ETHTOOL_SRINGPARAM
+ * @rx_max_pending: Maximum supported number of pending entries per
+ *      RX ring.  Read-only.
+ * @rx_mini_max_pending: Maximum supported number of pending entries
+ *      per RX mini ring.  Read-only.
+ * @rx_jumbo_max_pending: Maximum supported number of pending entries
+ *      per RX jumbo ring.  Read-only.
+ * @tx_max_pending: Maximum supported number of pending entries per
+ *      TX ring.  Read-only.
+ * @rx_pending: Current maximum number of pending entries per RX ring
+ * @rx_mini_pending: Current maximum number of pending entries per RX
+ *      mini ring
+ * @rx_jumbo_pending: Current maximum number of pending entries per RX
+ *      jumbo ring
+ * @tx_pending: Current maximum supported number of pending entries
+ *      per TX ring
+ *
+ * If the interface does not have separate RX mini and/or jumbo rings,
+ * @rx_mini_max_pending and/or @rx_jumbo_max_pending will be 0.
+ *
+ * There may also be driver-dependent minimum values for the number
+ * of entries per ring.
+ */
+
+struct ethtool_ringparam {
+	__u32   cmd;
+	__u32   rx_max_pending;
+	__u32   rx_mini_max_pending;
+	__u32   rx_jumbo_max_pending;
+	__u32   tx_max_pending;
+	__u32   rx_pending;
+	__u32   rx_mini_pending;
+	__u32   rx_jumbo_pending;
+	__u32   tx_pending;
+};
+
+#define ETHTOOL_GRINGPARAM      0x00000010 /* Get ring parameters. */
+#define ETHTOOL_SRINGPARAM      0x00000011 /* Set ring parameters. */
+
 #endif /* _UAPI_LINUX_ETHTOOL_H */
-- 
2.34.1


  reply	other threads:[~2024-03-15 14:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 14:07 [PATCH bpf-next 0/6] Enhancing selftests/xsk Framework: Maximum and Minimum Ring Configurations Tushar Vyavahare
2024-03-15 14:07 ` Tushar Vyavahare [this message]
2024-03-15 17:33   ` [PATCH bpf-next 1/6] tools/include: add ethtool_ringparam definition to UAPI header Stanislav Fomichev
2024-03-19  6:42     ` Vyavahare, Tushar
2024-03-15 14:07 ` [PATCH bpf-next 2/6] selftests/xsk: make batch size variable Tushar Vyavahare
2024-03-15 14:07 ` [PATCH bpf-next 3/6] selftests/xsk: implement get_hw_ring_size function to retrieve current and max interface size Tushar Vyavahare
2024-03-15 17:40   ` Stanislav Fomichev
2024-03-19  6:47     ` Vyavahare, Tushar
2024-03-15 14:07 ` [PATCH bpf-next 4/6] selftests/xsk: implement set_hw_ring_size function to configure interface ring size Tushar Vyavahare
2024-03-15 15:47   ` Alexei Starovoitov
2024-03-19  6:54     ` Vyavahare, Tushar
2024-03-15 17:44   ` Stanislav Fomichev
2024-03-19  6:52     ` Vyavahare, Tushar
2024-03-15 14:07 ` [PATCH bpf-next 5/6] selftests/xsk: test AF_XDP functionality under minimal ring configurations Tushar Vyavahare
2024-03-15 14:07 ` [PATCH bpf-next 6/6] selftests/xsk: enhance framework with a new test case for AF_XDP under max ring sizes Tushar Vyavahare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240315140726.22291-2-tushar.vyavahare@intel.com \
    --to=tushar.vyavahare@intel.com \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tirthendu.sarkar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox