Re: [PATCH net-next v6 2/4] ethtool: provide customized dim profile management

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

 





在 2024/4/13 上午10:26, Jakub Kicinski 写道:
On Thu, 11 Apr 2024 22:12:29 +0800 Heng Qi wrote:
+#include <linux/dim.h>
  #include <net/net_trackers.h>
  #include <net/net_debug.h>
  #include <net/dropreason-core.h>
@@ -1649,6 +1650,9 @@ struct net_device_ops {
   * @IFF_SEE_ALL_HWTSTAMP_REQUESTS: device wants to see calls to
   *	ndo_hwtstamp_set() for all timestamp requests regardless of source,
   *	even if those aren't HWTSTAMP_SOURCE_NETDEV.
+ * @IFF_PROFILE_USEC: device supports adjusting the DIM profile's usec field
+ * @IFF_PROFILE_PKTS: device supports adjusting the DIM profile's pkts field
+ * @IFF_PROFILE_COMPS: device supports adjusting the DIM profile's comps field
   */
  enum netdev_priv_flags {
  	IFF_802_1Q_VLAN			= 1<<0,
@@ -1685,6 +1689,9 @@ enum netdev_priv_flags {
  	IFF_TX_SKB_NO_LINEAR		= BIT_ULL(31),
  	IFF_CHANGE_PROTO_DOWN		= BIT_ULL(32),
  	IFF_SEE_ALL_HWTSTAMP_REQUESTS	= BIT_ULL(33),
+	IFF_PROFILE_USEC		= BIT_ULL(34),
+	IFF_PROFILE_PKTS		= BIT_ULL(35),
+	IFF_PROFILE_COMPS		= BIT_ULL(36),
  };
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -2400,6 +2407,14 @@ struct net_device {
  	/** @page_pools: page pools created for this netdevice */
  	struct hlist_head	page_pools;
  #endif
+
+#if IS_ENABLED(CONFIG_DIMLIB)
+	/* DIM profile lists for different dim cq modes */
+	struct dim_cq_moder *rx_eqe_profile;
+	struct dim_cq_moder *rx_cqe_profile;
+	struct dim_cq_moder *tx_eqe_profile;
+	struct dim_cq_moder *tx_cqe_profile;
+#endif
just one pointer to a new wrapper struct, put the pointers and a flag
field in there.

netdevice.h is included by thousands of files, please use a forward
declaration for the type and avoid including dim.h

I will update this.

Thanks for the constructive comments!





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux