Virtualization Archive mirror
 help / color / mirror / Atom feed
From: Heng Qi <hengqi@linux.alibaba.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, virtualization@lists.linux.dev,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Jason Wang <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Ratheesh Kannoth <rkannoth@marvell.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Subject: Re: [PATCH net-next v6 2/4] ethtool: provide customized dim profile management
Date: Sat, 13 Apr 2024 18:14:30 +0800	[thread overview]
Message-ID: <a69d85f5-d11d-40e9-9c0b-1db210aaa359@linux.alibaba.com> (raw)
In-Reply-To: <20240412192645.2c0b745b@kernel.org>



在 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!


  reply	other threads:[~2024-04-13 10:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 14:12 [PATCH net-next v6 0/4] ethtool: provide the dim profile fine-tuning channel Heng Qi
2024-04-11 14:12 ` [PATCH net-next v6 1/4] linux/dim: move useful macros to .h file Heng Qi
2024-04-11 14:12 ` [PATCH net-next v6 2/4] ethtool: provide customized dim profile management Heng Qi
2024-04-11 15:19   ` Brett Creeley
2024-04-12  2:07     ` Heng Qi
2024-04-12 15:33       ` Brett Creeley
2024-04-12 16:05         ` Heng Qi
2024-04-12  3:56   ` kernel test robot
2024-04-12  4:39   ` kernel test robot
2024-04-12 17:44   ` kernel test robot
2024-04-13  2:26   ` Jakub Kicinski
2024-04-13 10:14     ` Heng Qi [this message]
2024-04-13  2:27   ` Jakub Kicinski
2024-04-11 14:12 ` [PATCH net-next v6 3/4] virtio-net: refactor dim initialization/destruction Heng Qi
2024-04-11 14:12 ` [PATCH net-next v6 4/4] virtio-net: support dim profile fine-tuning Heng Qi
2024-04-11 15:23   ` Brett Creeley
2024-04-12  2:19     ` Heng Qi

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=a69d85f5-d11d-40e9-9c0b-1db210aaa359@linux.alibaba.com \
    --to=hengqi@linux.alibaba.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=kuba@kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rkannoth@marvell.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).