drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ include/uapi/linux/virtio_net.h | 14 +++ 2 files changed, 154 insertions(+), 29 deletions(-)
Currently, coalescing parameters are grouped for all transmit and receive virtqueues. This patch series add support to set or get the parameters for a specified virtqueue. When the traffic between virtqueues is unbalanced, for example, one virtqueue is busy and another virtqueue is idle, then it will be very useful to control coalescing parameters at the virtqueue granularity. Example command: $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 Would set max_packets=10 to VQ 1. $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 Would set max_packets=10 to VQ 0. $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce Queue: 0 Adaptive RX: off TX: off stats-block-usecs: 0 sample-interval: 0 pkt-rate-low: 0 pkt-rate-high: 0 rx-usecs: 222 rx-frames: 0 rx-usecs-irq: 0 rx-frames-irq: 256 tx-usecs: 222 tx-frames: 0 tx-usecs-irq: 0 tx-frames-irq: 256 rx-usecs-low: 0 rx-frame-low: 0 tx-usecs-low: 0 tx-frame-low: 0 rx-usecs-high: 0 rx-frame-high: 0 tx-usecs-high: 0 tx-frame-high: 0 In this patch series: Patch-1: Extract interrupt coalescing settings to a structure. Patch-2: Extract get/set interrupt coalesce to a function. Patch-3: Support per queue interrupt coalesce command. Patch-4: Enable per queue interrupt coalesce feature. Gavin Li (4): virtio_net: extract interrupt coalescing settings to a structure virtio_net: extract get/set interrupt coalesce to a function virtio_net: support per queue interrupt coalesce command virtio_net: enable per queue interrupt coalesce feature drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ include/uapi/linux/virtio_net.h | 14 +++ 2 files changed, 154 insertions(+), 29 deletions(-) -- 2.39.1
On Mon, Jul 10, 2023 at 12:20:01PM +0300, Gavin Li wrote: > Currently, coalescing parameters are grouped for all transmit and receive > virtqueues. This patch series add support to set or get the parameters for > a specified virtqueue. > > When the traffic between virtqueues is unbalanced, for example, one virtqueue > is busy and another virtqueue is idle, then it will be very useful to > control coalescing parameters at the virtqueue granularity. series: Acked-by: Michael S. Tsirkin <mst@redhat.com> > Example command: > $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 > Would set max_packets=10 to VQ 1. > $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 > Would set max_packets=10 to VQ 0. > $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce > Queue: 0 > Adaptive RX: off TX: off > stats-block-usecs: 0 > sample-interval: 0 > pkt-rate-low: 0 > pkt-rate-high: 0 > > rx-usecs: 222 > rx-frames: 0 > rx-usecs-irq: 0 > rx-frames-irq: 256 > > tx-usecs: 222 > tx-frames: 0 > tx-usecs-irq: 0 > tx-frames-irq: 256 > > rx-usecs-low: 0 > rx-frame-low: 0 > tx-usecs-low: 0 > tx-frame-low: 0 > > rx-usecs-high: 0 > rx-frame-high: 0 > tx-usecs-high: 0 > tx-frame-high: 0 > > In this patch series: > Patch-1: Extract interrupt coalescing settings to a structure. > Patch-2: Extract get/set interrupt coalesce to a function. > Patch-3: Support per queue interrupt coalesce command. > Patch-4: Enable per queue interrupt coalesce feature. > > Gavin Li (4): > virtio_net: extract interrupt coalescing settings to a structure > virtio_net: extract get/set interrupt coalesce to a function > virtio_net: support per queue interrupt coalesce command > virtio_net: enable per queue interrupt coalesce feature > > drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ > include/uapi/linux/virtio_net.h | 14 +++ > 2 files changed, 154 insertions(+), 29 deletions(-) > > -- > 2.39.1
On Thu, 13 Jul 2023 07:40:12 -0400, "Michael S. Tsirkin" <mst@redhat.com> wrote: > On Mon, Jul 10, 2023 at 12:20:01PM +0300, Gavin Li wrote: > > Currently, coalescing parameters are grouped for all transmit and receive > > virtqueues. This patch series add support to set or get the parameters for > > a specified virtqueue. > > > > When the traffic between virtqueues is unbalanced, for example, one virtqueue > > is busy and another virtqueue is idle, then it will be very useful to > > control coalescing parameters at the virtqueue granularity. > > series: > > Acked-by: Michael S. Tsirkin <mst@redhat.com> Why? This series has the bug I reported. Are you thinking that is ok? Or this is not a bug? Thanks. > > > > > Example command: > > $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 > > Would set max_packets=10 to VQ 1. > > $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 > > Would set max_packets=10 to VQ 0. > > $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce > > Queue: 0 > > Adaptive RX: off TX: off > > stats-block-usecs: 0 > > sample-interval: 0 > > pkt-rate-low: 0 > > pkt-rate-high: 0 > > > > rx-usecs: 222 > > rx-frames: 0 > > rx-usecs-irq: 0 > > rx-frames-irq: 256 > > > > tx-usecs: 222 > > tx-frames: 0 > > tx-usecs-irq: 0 > > tx-frames-irq: 256 > > > > rx-usecs-low: 0 > > rx-frame-low: 0 > > tx-usecs-low: 0 > > tx-frame-low: 0 > > > > rx-usecs-high: 0 > > rx-frame-high: 0 > > tx-usecs-high: 0 > > tx-frame-high: 0 > > > > In this patch series: > > Patch-1: Extract interrupt coalescing settings to a structure. > > Patch-2: Extract get/set interrupt coalesce to a function. > > Patch-3: Support per queue interrupt coalesce command. > > Patch-4: Enable per queue interrupt coalesce feature. > > > > Gavin Li (4): > > virtio_net: extract interrupt coalescing settings to a structure > > virtio_net: extract get/set interrupt coalesce to a function > > virtio_net: support per queue interrupt coalesce command > > virtio_net: enable per queue interrupt coalesce feature > > > > drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ > > include/uapi/linux/virtio_net.h | 14 +++ > > 2 files changed, 154 insertions(+), 29 deletions(-) > > > > -- > > 2.39.1 >
On Fri, Jul 14, 2023 at 10:10:51AM +0800, Xuan Zhuo wrote: > On Thu, 13 Jul 2023 07:40:12 -0400, "Michael S. Tsirkin" <mst@redhat.com> wrote: > > On Mon, Jul 10, 2023 at 12:20:01PM +0300, Gavin Li wrote: > > > Currently, coalescing parameters are grouped for all transmit and receive > > > virtqueues. This patch series add support to set or get the parameters for > > > a specified virtqueue. > > > > > > When the traffic between virtqueues is unbalanced, for example, one virtqueue > > > is busy and another virtqueue is idle, then it will be very useful to > > > control coalescing parameters at the virtqueue granularity. > > > > series: > > > > Acked-by: Michael S. Tsirkin <mst@redhat.com> > > > Why? > > This series has the bug I reported. > > Are you thinking that is ok? Or this is not a bug? > > Thanks. > > I missed that mail. What's the bug? > > > > > > > > > Example command: > > > $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 > > > Would set max_packets=10 to VQ 1. > > > $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 > > > Would set max_packets=10 to VQ 0. > > > $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce > > > Queue: 0 > > > Adaptive RX: off TX: off > > > stats-block-usecs: 0 > > > sample-interval: 0 > > > pkt-rate-low: 0 > > > pkt-rate-high: 0 > > > > > > rx-usecs: 222 > > > rx-frames: 0 > > > rx-usecs-irq: 0 > > > rx-frames-irq: 256 > > > > > > tx-usecs: 222 > > > tx-frames: 0 > > > tx-usecs-irq: 0 > > > tx-frames-irq: 256 > > > > > > rx-usecs-low: 0 > > > rx-frame-low: 0 > > > tx-usecs-low: 0 > > > tx-frame-low: 0 > > > > > > rx-usecs-high: 0 > > > rx-frame-high: 0 > > > tx-usecs-high: 0 > > > tx-frame-high: 0 > > > > > > In this patch series: > > > Patch-1: Extract interrupt coalescing settings to a structure. > > > Patch-2: Extract get/set interrupt coalesce to a function. > > > Patch-3: Support per queue interrupt coalesce command. > > > Patch-4: Enable per queue interrupt coalesce feature. > > > > > > Gavin Li (4): > > > virtio_net: extract interrupt coalescing settings to a structure > > > virtio_net: extract get/set interrupt coalesce to a function > > > virtio_net: support per queue interrupt coalesce command > > > virtio_net: enable per queue interrupt coalesce feature > > > > > > drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ > > > include/uapi/linux/virtio_net.h | 14 +++ > > > 2 files changed, 154 insertions(+), 29 deletions(-) > > > > > > -- > > > 2.39.1 > >
On Mon, 10 Jul 2023 12:20:01 +0300, Gavin Li <gavinl@nvidia.com> wrote: As far as I know, Heng Qi does that. I'm not sure, it's the same piece. cc @Heng Qi Thanks. > Currently, coalescing parameters are grouped for all transmit and receive > virtqueues. This patch series add support to set or get the parameters for > a specified virtqueue. > > When the traffic between virtqueues is unbalanced, for example, one virtqueue > is busy and another virtqueue is idle, then it will be very useful to > control coalescing parameters at the virtqueue granularity. > > Example command: > $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 > Would set max_packets=10 to VQ 1. > $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 > Would set max_packets=10 to VQ 0. > $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce > Queue: 0 > Adaptive RX: off TX: off > stats-block-usecs: 0 > sample-interval: 0 > pkt-rate-low: 0 > pkt-rate-high: 0 > > rx-usecs: 222 > rx-frames: 0 > rx-usecs-irq: 0 > rx-frames-irq: 256 > > tx-usecs: 222 > tx-frames: 0 > tx-usecs-irq: 0 > tx-frames-irq: 256 > > rx-usecs-low: 0 > rx-frame-low: 0 > tx-usecs-low: 0 > tx-frame-low: 0 > > rx-usecs-high: 0 > rx-frame-high: 0 > tx-usecs-high: 0 > tx-frame-high: 0 > > In this patch series: > Patch-1: Extract interrupt coalescing settings to a structure. > Patch-2: Extract get/set interrupt coalesce to a function. > Patch-3: Support per queue interrupt coalesce command. > Patch-4: Enable per queue interrupt coalesce feature. > > Gavin Li (4): > virtio_net: extract interrupt coalescing settings to a structure > virtio_net: extract get/set interrupt coalesce to a function > virtio_net: support per queue interrupt coalesce command > virtio_net: enable per queue interrupt coalesce feature > > drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ > include/uapi/linux/virtio_net.h | 14 +++ > 2 files changed, 154 insertions(+), 29 deletions(-) > > -- > 2.39.1 >
On 7/10/2023 5:25 PM, Xuan Zhuo wrote: > External email: Use caution opening links or attachments > > > On Mon, 10 Jul 2023 12:20:01 +0300, Gavin Li <gavinl@nvidia.com> wrote: > > As far as I know, Heng Qi does that. I'm not sure, it's the same piece. > > cc @Heng Qi > > Thanks. Do you mean the one below? https://lists.oasis-open.org/archives/virtio-dev/202303/msg00415.html The code is to implement what it described and I don't have better words. So, I copied the text from Heng Qi's. > > >> Currently, coalescing parameters are grouped for all transmit and receive >> virtqueues. This patch series add support to set or get the parameters for >> a specified virtqueue. >> >> When the traffic between virtqueues is unbalanced, for example, one virtqueue >> is busy and another virtqueue is idle, then it will be very useful to >> control coalescing parameters at the virtqueue granularity. >> >> Example command: >> $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 >> Would set max_packets=10 to VQ 1. >> $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 >> Would set max_packets=10 to VQ 0. >> $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce >> Queue: 0 >> Adaptive RX: off TX: off >> stats-block-usecs: 0 >> sample-interval: 0 >> pkt-rate-low: 0 >> pkt-rate-high: 0 >> >> rx-usecs: 222 >> rx-frames: 0 >> rx-usecs-irq: 0 >> rx-frames-irq: 256 >> >> tx-usecs: 222 >> tx-frames: 0 >> tx-usecs-irq: 0 >> tx-frames-irq: 256 >> >> rx-usecs-low: 0 >> rx-frame-low: 0 >> tx-usecs-low: 0 >> tx-frame-low: 0 >> >> rx-usecs-high: 0 >> rx-frame-high: 0 >> tx-usecs-high: 0 >> tx-frame-high: 0 >> >> In this patch series: >> Patch-1: Extract interrupt coalescing settings to a structure. >> Patch-2: Extract get/set interrupt coalesce to a function. >> Patch-3: Support per queue interrupt coalesce command. >> Patch-4: Enable per queue interrupt coalesce feature. >> >> Gavin Li (4): >> virtio_net: extract interrupt coalescing settings to a structure >> virtio_net: extract get/set interrupt coalesce to a function >> virtio_net: support per queue interrupt coalesce command >> virtio_net: enable per queue interrupt coalesce feature >> >> drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ >> include/uapi/linux/virtio_net.h | 14 +++ >> 2 files changed, 154 insertions(+), 29 deletions(-) >> >> -- >> 2.39.1 >>
On Tue, 11 Jul 2023 10:34:33 +0800, Gavin Li <gavinl@nvidia.com> wrote: > > On 7/10/2023 5:25 PM, Xuan Zhuo wrote: > > External email: Use caution opening links or attachments > > > > > > On Mon, 10 Jul 2023 12:20:01 +0300, Gavin Li <gavinl@nvidia.com> wrote: > > > > As far as I know, Heng Qi does that. I'm not sure, it's the same piece. > > > > cc @Heng Qi > > > > Thanks. > Do you mean the one below? YES > > https://lists.oasis-open.org/archives/virtio-dev/202303/msg00415.html > > The code is to implement what it described and I don't have better > words. So, I copied the text from Heng Qi's. Maybe he wrote code for it. I think you should ask him about his plans first. Thanks. > > > > > > >> Currently, coalescing parameters are grouped for all transmit and receive > >> virtqueues. This patch series add support to set or get the parameters for > >> a specified virtqueue. > >> > >> When the traffic between virtqueues is unbalanced, for example, one virtqueue > >> is busy and another virtqueue is idle, then it will be very useful to > >> control coalescing parameters at the virtqueue granularity. > >> > >> Example command: > >> $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 > >> Would set max_packets=10 to VQ 1. > >> $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 > >> Would set max_packets=10 to VQ 0. > >> $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce > >> Queue: 0 > >> Adaptive RX: off TX: off > >> stats-block-usecs: 0 > >> sample-interval: 0 > >> pkt-rate-low: 0 > >> pkt-rate-high: 0 > >> > >> rx-usecs: 222 > >> rx-frames: 0 > >> rx-usecs-irq: 0 > >> rx-frames-irq: 256 > >> > >> tx-usecs: 222 > >> tx-frames: 0 > >> tx-usecs-irq: 0 > >> tx-frames-irq: 256 > >> > >> rx-usecs-low: 0 > >> rx-frame-low: 0 > >> tx-usecs-low: 0 > >> tx-frame-low: 0 > >> > >> rx-usecs-high: 0 > >> rx-frame-high: 0 > >> tx-usecs-high: 0 > >> tx-frame-high: 0 > >> > >> In this patch series: > >> Patch-1: Extract interrupt coalescing settings to a structure. > >> Patch-2: Extract get/set interrupt coalesce to a function. > >> Patch-3: Support per queue interrupt coalesce command. > >> Patch-4: Enable per queue interrupt coalesce feature. > >> > >> Gavin Li (4): > >> virtio_net: extract interrupt coalescing settings to a structure > >> virtio_net: extract get/set interrupt coalesce to a function > >> virtio_net: support per queue interrupt coalesce command > >> virtio_net: enable per queue interrupt coalesce feature > >> > >> drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ > >> include/uapi/linux/virtio_net.h | 14 +++ > >> 2 files changed, 154 insertions(+), 29 deletions(-) > >> > >> -- > >> 2.39.1 > >>
在 2023/7/10 下午5:20, Gavin Li 写道: > Currently, coalescing parameters are grouped for all transmit and receive > virtqueues. This patch series add support to set or get the parameters for > a specified virtqueue. > > When the traffic between virtqueues is unbalanced, for example, one virtqueue > is busy and another virtqueue is idle, then it will be very useful to > control coalescing parameters at the virtqueue granularity. We definitely did the same thing, and I'm waiting for our hardware implementation to be ready to push the ethtool + netdim implementation. Since this commit log is completely copied from the implementation of the virtio spec, consulting each other's scheduling plan in advance can be friendly to avoid us doing the same thing and consuming an extra effort. Thanks. > > Example command: > $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 > Would set max_packets=10 to VQ 1. > $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 > Would set max_packets=10 to VQ 0. > $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce > Queue: 0 > Adaptive RX: off TX: off > stats-block-usecs: 0 > sample-interval: 0 > pkt-rate-low: 0 > pkt-rate-high: 0 > > rx-usecs: 222 > rx-frames: 0 > rx-usecs-irq: 0 > rx-frames-irq: 256 > > tx-usecs: 222 > tx-frames: 0 > tx-usecs-irq: 0 > tx-frames-irq: 256 > > rx-usecs-low: 0 > rx-frame-low: 0 > tx-usecs-low: 0 > tx-frame-low: 0 > > rx-usecs-high: 0 > rx-frame-high: 0 > tx-usecs-high: 0 > tx-frame-high: 0 > > In this patch series: > Patch-1: Extract interrupt coalescing settings to a structure. > Patch-2: Extract get/set interrupt coalesce to a function. > Patch-3: Support per queue interrupt coalesce command. > Patch-4: Enable per queue interrupt coalesce feature. > > Gavin Li (4): > virtio_net: extract interrupt coalescing settings to a structure > virtio_net: extract get/set interrupt coalesce to a function > virtio_net: support per queue interrupt coalesce command > virtio_net: enable per queue interrupt coalesce feature > > drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ > include/uapi/linux/virtio_net.h | 14 +++ > 2 files changed, 154 insertions(+), 29 deletions(-) >
On 7/12/2023 4:34 PM, Heng Qi wrote: > > > 在 2023/7/10 下午5:20, Gavin Li 写道: >> Currently, coalescing parameters are grouped for all transmit and receive >> virtqueues. This patch series add support to set or get the parameters >> for >> a specified virtqueue. >> >> When the traffic between virtqueues is unbalanced, for example, one >> virtqueue >> is busy and another virtqueue is idle, then it will be very useful to >> control coalescing parameters at the virtqueue granularity. > > > We definitely did the same thing, and I'm waiting for our hardware > implementation to be ready to > push the ethtool + netdim implementation. > > Since this commit log is completely copied from the implementation of > the virtio spec, consulting > each other's scheduling plan in advance can be friendly to avoid us > doing the same thing and consuming an extra effort. > > Thanks. > I didn't know about the effort you made and the progress of it. Since the code has been done and tested, I'll continue submission. >> >> Example command: >> $ ethtool -Q eth5 queue_mask 0x1 --coalesce tx-packets 10 >> Would set max_packets=10 to VQ 1. >> $ ethtool -Q eth5 queue_mask 0x1 --coalesce rx-packets 10 >> Would set max_packets=10 to VQ 0. >> $ ethtool -Q eth5 queue_mask 0x1 --show-coalesce >> Queue: 0 >> Adaptive RX: off TX: off >> stats-block-usecs: 0 >> sample-interval: 0 >> pkt-rate-low: 0 >> pkt-rate-high: 0 >> >> rx-usecs: 222 >> rx-frames: 0 >> rx-usecs-irq: 0 >> rx-frames-irq: 256 >> >> tx-usecs: 222 >> tx-frames: 0 >> tx-usecs-irq: 0 >> tx-frames-irq: 256 >> >> rx-usecs-low: 0 >> rx-frame-low: 0 >> tx-usecs-low: 0 >> tx-frame-low: 0 >> >> rx-usecs-high: 0 >> rx-frame-high: 0 >> tx-usecs-high: 0 >> tx-frame-high: 0 >> >> In this patch series: >> Patch-1: Extract interrupt coalescing settings to a structure. >> Patch-2: Extract get/set interrupt coalesce to a function. >> Patch-3: Support per queue interrupt coalesce command. >> Patch-4: Enable per queue interrupt coalesce feature. >> >> Gavin Li (4): >> virtio_net: extract interrupt coalescing settings to a structure >> virtio_net: extract get/set interrupt coalesce to a function >> virtio_net: support per queue interrupt coalesce command >> virtio_net: enable per queue interrupt coalesce feature >> >> drivers/net/virtio_net.c | 169 ++++++++++++++++++++++++++------ >> include/uapi/linux/virtio_net.h | 14 +++ >> 2 files changed, 154 insertions(+), 29 deletions(-) >> >
© 2016 - 2026 Red Hat, Inc.