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
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
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
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
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
在 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
在 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
@@ -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 },
+
+++ 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
在 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
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:
-
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
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
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 +
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
在 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
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) {
> > >> +
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 =
> > +
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
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
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
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
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 +
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
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
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:
> > > > &
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_
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
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
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 +
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
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
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
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
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
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
>
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
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
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 +++
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
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
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
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
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
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
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
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
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
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
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
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 +++
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
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]
> >
> >
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
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
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
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
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 +++
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
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
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
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
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
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
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
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
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/
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/
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
69 matches
Mail list logo