[PATCH bpf-next 1/6] tools/include: add ethtool_ringparam definition to UAPI header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux