[PATCH net-next v9 0/4] ethtool: provide the dim profile fine-tuning channel

2024-04-17 Thread Heng Qi
avoid the use of raw c structs. - Use per-device profile instead of global profile in the driver. v1->v2: - Use ethtool tool instead of net-sysfs Heng Qi (4): linux/dim: move useful macros to .h file ethtool: provide customized dim profile management virtio-net: refactor dim initialization

[PATCH net-next v9 3/4] virtio-net: refactor dim initialization/destruction

2024-04-17 Thread Heng Qi
Extract the initialization and destruction actions of dim for use in the next patch. Signed-off-by: Heng Qi --- drivers/net/virtio_net.c | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net

[PATCH net-next v9 4/4] virtio-net: support dim profile fine-tuning

2024-04-17 Thread Heng Qi
on similar to net_dim_get_rx_moderation_dev() with netdevice as argument is nice, but this would be better along with cleaning up the rest of the drivers, which we can get to very soon after this set. Signed-off-by: Heng Qi --- drivers/net/virtio_net.c | 8 ++-- 1 file changed, 6 insert

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

2024-04-17 Thread Heng Qi
orresponding "n/a" will display. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 33 +++ Documentation/networking/ethtool-netlink.rst | 8 + include/linux/ethtool.h | 11 +- include/linux/netdevice.h| 24 +++ inc

[PATCH net-next v9 1/4] linux/dim: move useful macros to .h file

2024-04-17 Thread Heng Qi
These will be used in subsequent patches, including newly declared profile arrays. Signed-off-by: Heng Qi --- include/linux/dim.h | 13 + lib/dim/net_dim.c | 18 ++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/include/linux/dim.h b/include/linux

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

2024-04-22 Thread Heng Qi
在 2024/4/19 上午8:48, Jakub Kicinski 写道: On Wed, 17 Apr 2024 23:55:44 +0800 Heng Qi wrote: $ ethtool -c ethx ... rx-eqe-profile: {.usec = 1, .pkts = 256, .comps = 0,}, {.usec = 8, .pkts = 256, .comps = 0,}, {.usec = 64, .pkts = 256, .comps = 0,}, {.usec = 128, .pkts = 256, .comps

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

2024-04-22 Thread Heng Qi
在 2024/4/21 下午11:53, Brett Creeley 写道: On 4/17/2024 8:55 AM, Heng Qi wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. The NetDIM library, currently leveraged by an array of NICs, delivers excellent

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

2024-04-24 Thread Heng Qi
@@ -227,7 +315,19 @@ const struct nla_policy ethnl_coalesce_set_policy[] = { [ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES] = { .type = NLA_U32 }, [ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES] = { .type = NLA_U32 }, [ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS] = { .type = NLA_U32 }, +

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

2024-04-24 Thread Heng Qi
+++ b/include/linux/ethtool.h @@ -284,7 +284,11 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,   #define ETHTOOL_COALESCE_TX_AGGR_MAX_BYTES    BIT(24)   #define ETHTOOL_COALESCE_TX_AGGR_MAX_FRAMES    BIT(25)   #define ETHTOOL_COALESCE_TX_AGGR_TIME_USECS    BIT(26) -#define E

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

2024-04-24 Thread Heng Qi
在 2024/4/25 上午12:18, Jakub Kicinski 写道: On Wed, 24 Apr 2024 21:41:55 +0800 Heng Qi wrote: +struct dim_irq_moder { +   /* See DIM_PROFILE_* */ +   u8 profile_flags; + +   /* See DIM_COALESCE_* for Rx and Tx */ +   u8 coal_flags; + +   /* Rx DIM period count mode: CQE or EQE

[PATCH net-next v10 0/4] ethtool: provide the dim profile fine-tuning channel

2024-04-25 Thread Heng Qi
iver has changed. v4->v5: - Update some snippets from Kuba, Thanks. v3->v4: - Some tiny updates and patch 1 only add a new comment. v2->v3: - Break up the attributes to avoid the use of raw c structs. - Use per-device profile instead of global profile in the driver. v1->v2: -

[PATCH net-next v10 3/4] dim: add new interfaces for initialization and getting results

2024-04-25 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi --- include/linux/dim.h | 48 + lib/dim/net_dim.c | 66 + 2 files changed

[PATCH net-next v10 1/4] linux/dim: move useful macros to .h file

2024-04-25 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi --- include/linux/dim.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/dim.h b/include/linux/dim.h index f343bc9aa2ec..43398f5eade2 100644 --- a

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

2024-04-25 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 23 ++ Documentation/networking/ethtool-netlink.rst | 4 + include/linux/dim.h | 60 +

[PATCH net-next v10 4/4] virtio-net: support dim profile fine-tuning

2024-04-25 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-b

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

2024-04-28 Thread Heng Qi
在 2024/4/27 上午9:33, Jakub Kicinski 写道: On Fri, 26 Apr 2024 00:59:46 +0800 Heng Qi wrote: The NetDIM library, currently leveraged by an array of NICs, delivers excellent acceleration benefits. Nevertheless, NICs vary significantly in their dim profile list prerequisites. Specifically, virtio

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

2024-04-29 Thread Heng Qi
On Mon, 29 Apr 2024 10:47:41 -0700, Jakub Kicinski wrote: > On Sun, 28 Apr 2024 22:49:09 +0800 Heng Qi wrote: > > >> +nla_for_each_nested_type(nest, > > >> ETHTOOL_A_PROFILE_IRQ_MODERATION, nests, rem) { > > >> +

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

2024-04-29 Thread Heng Qi
On Mon, 29 Apr 2024 20:13:00 -0700, Jakub Kicinski wrote: > On Tue, 30 Apr 2024 09:59:39 +0800 Heng Qi wrote: > > + if (moder[ETHTOOL_A_IRQ_MODERATION_USEC]) { > > + if (irq_moder->coal_flags & DIM_COALESCE_USEC) > > + new_profile[i].usec = > > +

[PATCH net-next v11 0/4] ethtool: provide the dim profile fine-tuning channel

2024-04-30 Thread Heng Qi
cts. - Use per-device profile instead of global profile in the driver. v1->v2: - Use ethtool tool instead of net-sysfs. Heng Qi (4): linux/dim: move useful macros to .h file ethtool: provide customized dim profile management dim: add new interfaces for initialization and getting r

[PATCH net-next v11 4/4] virtio-net: support dim profile fine-tuning

2024-04-30 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-b

[PATCH net-next v11 3/4] dim: add new interfaces for initialization and getting results

2024-04-30 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi --- include/linux/dim.h | 48 lib/dim/net_dim.c | 68 + 2 files changed, 116

[PATCH net-next v11 1/4] linux/dim: move useful macros to .h file

2024-04-30 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi --- include/linux/dim.h | 7 +++ lib/dim/net_dim.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/dim.h b/include/linux/dim.h

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

2024-04-30 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 31 +++ Documentation/networking/ethtool-netlink.rst | 4 + include/linux/dim.h | 62 +

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

2024-04-30 Thread Heng Qi
On Wed, 1 May 2024 10:36:03 +0800, kernel test robot wrote: > Hi Heng, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Heng-Qi/linux-dim-move

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

2024-05-01 Thread Heng Qi
On Wed, 1 May 2024 07:44:20 -0700, Jakub Kicinski wrote: > On Wed, 1 May 2024 12:45:36 +0800 Heng Qi wrote: > > >net/ethtool/coalesce.c: At top level: > > [...] > > > 446 | static int ethnl_update_pro

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

2024-05-01 Thread Heng Qi
On Wed, 1 May 2024 11:48:23 -0400, "Michael S. Tsirkin" wrote: > On Wed, May 01, 2024 at 11:11:47PM +0800, Heng Qi wrote: > > On Wed, 1 May 2024 07:44:20 -0700, Jakub Kicinski wrote: > > > On Wed, 1 May 2024 12:45:36 +0800 Heng Qi wrote: > > > > &

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

2024-05-03 Thread Heng Qi
On Fri, 3 May 2024 14:52:44 +0100, Simon Horman wrote: > On Wed, May 01, 2024 at 01:31:34AM +0800, Heng Qi wrote: > > ... > > > diff --git a/include/linux/dim.h b/include/linux/dim.h > > ... > > > @@ -198,6 +234,32 @@ enum dim_

[PATCH net-next v12 0/4] ethtool: provide the dim profile fine-tuning channel

2024-05-03 Thread Heng Qi
dd a new comment. v2->v3: - Break up the attributes to avoid the use of raw c structs. - Use per-device profile instead of global profile in the driver. v1->v2: - Use ethtool tool instead of net-sysfs. Heng Qi (4): linux/dim: move useful macros to .h file ethtool: provide cus

[PATCH net-next v12 3/4] dim: add new interfaces for initialization and getting results

2024-05-03 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi --- include/linux/dim.h | 48 lib/dim/net_dim.c | 68 + 2 files changed, 116

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

2024-05-03 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 31 +++ Documentation/networking/ethtool-netlink.rst | 4 + include/linux/dim.h | 59 +

[PATCH net-next v12 1/4] linux/dim: move useful macros to .h file

2024-05-03 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi --- include/linux/dim.h | 7 +++ lib/dim/net_dim.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/dim.h b/include/linux/dim.h

[PATCH net-next v12 4/4] virtio-net: support dim profile fine-tuning

2024-05-03 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-b

Re: [PATCH net-next v12 0/4] ethtool: provide the dim profile fine-tuning channel

2024-05-07 Thread Heng Qi
On Sat, 4 May 2024 14:44:43 +0800, Heng Qi wrote: > The NetDIM library provides excellent acceleration for many modern > network cards. However, the default profiles of DIM limits its maximum > capabilities for different NICs, so providing a way which the NIC can > be custom c

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

2024-05-08 Thread Heng Qi
On Tue, 7 May 2024 19:57:52 -0700, Jakub Kicinski wrote: > On Sat, 4 May 2024 14:44:45 +0800 Heng Qi wrote: > > @@ -1325,6 +1354,8 @@ operations: > > - tx-aggr-max-bytes > > - tx-aggr-max-frames > > - tx-aggr-time-usecs &g

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

2024-05-08 Thread Heng Qi
On Wed, 8 May 2024 08:11:39 -0700, Jakub Kicinski wrote: > On Wed, 8 May 2024 21:26:46 +0800 Heng Qi wrote: > > On Tue, 7 May 2024 19:57:52 -0700, Jakub Kicinski wrote: > > > On Sat, 4 May 2024 14:44:45 +0800 Heng Qi wrote: > > > > @@ -1325,6 +1354,8 @@ operati

Re: [PATCH net-next v12 0/4] ethtool: provide the dim profile fine-tuning channel

2024-05-08 Thread Heng Qi
On Tue, 7 May 2024 19:47:07 -0700, Jakub Kicinski wrote: > On Wed, 8 May 2024 10:12:35 +0800 Heng Qi wrote: > > I would like to confirm if there are still comments on the current version, > > since the current series and the just merged "Remove RTNL lock protection of >

[PATCH net-next v13 3/4] dim: add new interfaces for initialization and getting results

2024-05-08 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi --- include/linux/dim.h | 48 lib/dim/net_dim.c | 68 + 2 files changed, 116

[PATCH net-next v13 0/4] ethtool: provide the dim profile fine-tuning channel

2024-05-08 Thread Heng Qi
art of kernel <-> driver has changed. v4->v5: - Update some snippets from Kuba. v3->v4: - Some tiny updates and patch 1 only add a new comment. v2->v3: - Break up the attributes to avoid the use of raw c structs. - Use per-device profile instead of global profile in the driver. v1

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

2024-05-08 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 31 +++ Documentation/networking/ethtool-netlink.rst | 4 + Documentation/networking/net_dim.rst | 42 +++

[PATCH net-next v13 1/4] linux/dim: move useful macros to .h file

2024-05-08 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi --- include/linux/dim.h | 7 +++ lib/dim/net_dim.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/dim.h b/include/linux/dim.h

[PATCH net-next v13 4/4] virtio-net: support dim profile fine-tuning

2024-05-08 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-b

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

2024-05-12 Thread Heng Qi
On Fri, 10 May 2024 07:09:52 +0800, kernel test robot wrote: > Hi Heng, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Heng-Qi/linux-dim-move-useful-m

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

2024-05-13 Thread Heng Qi
On Mon, 13 May 2024 07:22:49 -0700, Jakub Kicinski wrote: > On Mon, 13 May 2024 00:36:58 +0800 Heng Qi wrote: > > This failed use case seems to come from this series triggering a problem > > that > > has not been triggered historically, namely lockdep_rtnl_is_held() is not

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

2024-05-13 Thread Heng Qi
On Mon, 13 May 2024 08:24:12 -0700, Jakub Kicinski wrote: > On Mon, 13 May 2024 22:52:13 +0800 Heng Qi wrote: > > > > So I think we should declare "CONFIG_PROVE_LOCKING depends on > > > > CONFIG_NET". > > > > How do you think? > > > &g

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

2024-05-13 Thread Heng Qi
On Mon, 13 May 2024 11:42:33 -0700, Jakub Kicinski wrote: > On Mon, 13 May 2024 23:39:04 +0800 Heng Qi wrote: > > config PROVE_LOCKING > > bool "Lock debugging: prove locking correctness" > > - depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPP

[PATCH net-next v14 0/5] ethtool: provide the dim profile fine-tuning channel

2024-06-03 Thread Heng Qi
device profile instead of global profile in the driver. v1->v2: - Use ethtool tool instead of net-sysfs. Heng Qi (5): linux/dim: move useful macros to .h file dim: make DIMLIB dependent on NET ethtool: provide customized dim profile management dim: add new interfaces for initialization

[PATCH net-next v14 1/5] linux/dim: move useful macros to .h file

2024-06-03 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi --- include/linux/dim.h | 7 +++ lib/dim/net_dim.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/dim.h b/include/linux/dim.h

[PATCH net-next v14 5/5] virtio-net: support dim profile fine-tuning

2024-06-03 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-b

[PATCH net-next v14 4/5] dim: add new interfaces for initialization and getting results

2024-06-03 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi --- include/linux/dim.h | 48 lib/dim/net_dim.c | 68 + 2 files changed, 116

[PATCH net-next v14 2/5] dim: make DIMLIB dependent on NET

2024-06-03 Thread Heng Qi
he soc/fsl driver. In this patch, net_dim relies on some NET's interfaces, thus DIMLIB needs to explicitly depend on the NET Kconfig. The soc/fsl driver uses the functions provided by net_dim, so it also needs to depend on NET. Signed-off-by: Heng Qi --- drivers/soc/fsl/Kconfig | 2

[PATCH net-next v14 3/5] ethtool: provide customized dim profile management

2024-06-03 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 31 +++ Documentation/networking/ethtool-netlink.rst | 4 + Documentation/networking/net_dim.rst | 42 +++

Re: [PATCH net-next v14 3/5] ethtool: provide customized dim profile management

2024-06-03 Thread Heng Qi
On Tue, 4 Jun 2024 07:00:35 +0800, kernel test robot wrote: > Hi Heng, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Heng-Qi/linux-dim-move

Re: [PATCH net-next v14 3/5] ethtool: provide customized dim profile management

2024-06-04 Thread Heng Qi
On Tue, 4 Jun 2024 13:13:26 +0800, Heng Qi wrote: > On Tue, 4 Jun 2024 07:00:35 +0800, kernel test robot wrote: > > Hi Heng, > > > > kernel test robot noticed the following build warnings: > > > > [auto build test WARNING on net-next/main] > > > >

Re: [PATCH net-next v14 0/5] ethtool: provide the dim profile fine-tuning channel

2024-06-07 Thread Heng Qi
Gentle ping. Thanks. 在 2024/6/3 下午11:47, Heng Qi 写道: The NetDIM library provides excellent acceleration for many modern network cards. However, the default profiles of DIM limits its maximum capabilities for different NICs, so providing a way which the NIC can be custom configured is necessary

[PATCH RESEND net-next v14 0/5] ethtool: provide the dim profile fine-tuning channel

2024-06-17 Thread Heng Qi
ttributes to avoid the use of raw c structs. - Use per-device profile instead of global profile in the driver. v1->v2: - Use ethtool tool instead of net-sysfs. Heng Qi (5): linux/dim: move useful macros to .h file dim: make DIMLIB dependent on NET ethtool: provide customized dim p

[PATCH RESEND net-next v14 2/5] dim: make DIMLIB dependent on NET

2024-06-17 Thread Heng Qi
he soc/fsl driver. In this patch, net_dim relies on some NET's interfaces, thus DIMLIB needs to explicitly depend on the NET Kconfig. The soc/fsl driver uses the functions provided by net_dim, so it also needs to depend on NET. Signed-off-by: Heng Qi --- drivers/soc/fsl/Kconfig | 2

[PATCH RESEND net-next v14 1/5] linux/dim: move useful macros to .h file

2024-06-17 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi --- include/linux/dim.h | 7 +++ lib/dim/net_dim.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/dim.h b/include/linux/dim.h

[PATCH RESEND net-next v14 3/5] ethtool: provide customized dim profile management

2024-06-17 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi --- Documentation/netlink/specs/ethtool.yaml | 31 +++ Documentation/networking/ethtool-netlink.rst | 4 + Documentation/networking/net_dim.rst | 42 +++

[PATCH RESEND net-next v14 4/5] dim: add new interfaces for initialization and getting results

2024-06-17 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi --- include/linux/dim.h | 48 lib/dim/net_dim.c | 68 + 2 files changed, 116

[PATCH RESEND net-next v14 5/5] virtio-net: support dim profile fine-tuning

2024-06-17 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-b

Re: [PATCH RESEND net-next v14 3/5] ethtool: provide customized dim profile management

2024-06-20 Thread Heng Qi
On Thu, 20 Jun 2024 20:39:18 -0700, Jakub Kicinski wrote: > On Tue, 18 Jun 2024 10:56:42 +0800 Heng Qi wrote: > > + if (dev->irq_moder && dev->irq_moder->profile_flags & DIM_PROFILE_RX) { > > + ret = ethnl_update_prof

Re: [PATCH RESEND net-next v14 3/5] ethtool: provide customized dim profile management

2024-06-20 Thread Heng Qi
On Thu, 20 Jun 2024 20:44:45 -0700, Jakub Kicinski wrote: > On Tue, 18 Jun 2024 10:56:42 +0800 Heng Qi wrote: > > --- a/Documentation/networking/ethtool-netlink.rst > > +++ b/Documentation/networking/ethtool-netlink.rst > > @@ -1033,6 +1033,8 @@ Ker

Re: [PATCH RESEND net-next v14 0/5] ethtool: provide the dim profile fine-tuning channel

2024-06-20 Thread Heng Qi
On Thu, 20 Jun 2024 20:40:25 -0700, Jakub Kicinski wrote: > On Tue, 18 Jun 2024 10:56:39 +0800 Heng Qi wrote: > > The NetDIM library provides excellent acceleration for many modern > > network cards. However, the default profiles of DIM limits its maximum > > capabilities f

[PATCH net-next v15 0/5] ethtool: provide the dim profile fine-tuning channel

2024-06-21 Thread Heng Qi
utes to avoid the use of raw c structs. - Use per-device profile instead of global profile in the driver. v1->v2: - Use ethtool tool instead of net-sysfs. Heng Qi (5): linux/dim: move useful macros to .h file dim: make DIMLIB dependent on NET ethtool: provide customized dim profile manage

[PATCH net-next v15 1/5] linux/dim: move useful macros to .h file

2024-06-21 Thread Heng Qi
Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi Reviewed-by: Simon Horman --- include/linux/dim.h | 7 +++ lib/dim/net_dim.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux

[PATCH net-next v15 4/5] dim: add new interfaces for initialization and getting results

2024-06-21 Thread Heng Qi
DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi Reviewed-by: Simon Horman --- include/linux/dim.h | 48 lib/dim/net_dim.c | 68

[PATCH net-next v15 2/5] dim: make DIMLIB dependent on NET

2024-06-21 Thread Heng Qi
he soc/fsl driver. In this patch, net_dim relies on some NET's interfaces, thus DIMLIB needs to explicitly depend on the NET Kconfig. The soc/fsl driver uses the functions provided by net_dim, so it also needs to depend on NET. Signed-off-by: Heng Qi Reviewed-by: Simon Horman --- drivers/soc/

[PATCH net-next v15 3/5] ethtool: provide customized dim profile management

2024-06-21 Thread Heng Qi
ot; will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi Reviewed-by: Simon Horman --- Documentation/netlink/specs/ethtool.yaml | 31 +++ Documentation/networking/ethtool-netlink.rst | 8 + Documentation/networking/

[PATCH net-next v15 5/5] virtio-net: support dim profile fine-tuning

2024-06-21 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-by: Heng Qi