2020-07-23 19:38:26

by Michal Kubecek

[permalink] [raw]
Subject: Re: [PATCH v7 net-next] net: hyperv: dump TX indirection table to ethtool regs

On Wed, Jul 22, 2020 at 11:59:09PM -0700, Chi Song wrote:
> An imbalanced TX indirection table causes netvsc to have low
> performance. This table is created and managed during runtime. To help
> better diagnose performance issues caused by imbalanced tables, it needs
> make TX indirection tables visible.
>
> Because TX indirection table is driver specified information, so
> display it via ethtool register dump.

Is the Tx indirection table really unique to netvsc or can we expect
other drivers to support similar feature? Also, would it make sense to
allow also setting the table with ethtool? (AFAICS it can be only set
from hypervisor at the moment.)

It kind of feels that the actual reason for using register dump was that
it's there and it was easy to use rather than that the information would
logically belong there. We already have a specific interface for getting
and seting receive indirection table; perhaps it would make sense to
have also one for the transmit indirection table.

Michal


2020-07-23 19:56:02

by Haiyang Zhang

[permalink] [raw]
Subject: RE: [PATCH v7 net-next] net: hyperv: dump TX indirection table to ethtool regs



> -----Original Message-----
> From: Michal Kubecek <[email protected]>
> Sent: Thursday, July 23, 2020 3:36 PM
> To: Chi Song <[email protected]>
> Cc: KY Srinivasan <[email protected]>; Haiyang Zhang
> <[email protected]>; Stephen Hemminger <[email protected]>;
> Wei Liu <[email protected]>; David S. Miller <[email protected]>; Jakub
> Kicinski <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH v7 net-next] net: hyperv: dump TX indirection table to
> ethtool regs
>
> On Wed, Jul 22, 2020 at 11:59:09PM -0700, Chi Song wrote:
> > An imbalanced TX indirection table causes netvsc to have low
> > performance. This table is created and managed during runtime. To help
> > better diagnose performance issues caused by imbalanced tables, it needs
> > make TX indirection tables visible.
> >
> > Because TX indirection table is driver specified information, so
> > display it via ethtool register dump.
>
> Is the Tx indirection table really unique to netvsc or can we expect
> other drivers to support similar feature? Also, would it make sense to
> allow also setting the table with ethtool? (AFAICS it can be only set
> from hypervisor at the moment.)

Currently, TX indirection table is only used by the Hyper-V synthetic NIC. I'm
not aware of any other NIC planning to use this.
This table is created by host dynamically based on host side CPU usage,
and provided to the VM periodically. Our protocol doesn't let the guest side
to change it.

Thanks,
- Haiyang

2020-07-23 20:25:56

by Michal Kubecek

[permalink] [raw]
Subject: Re: [PATCH v7 net-next] net: hyperv: dump TX indirection table to ethtool regs

On Thu, Jul 23, 2020 at 07:55:20PM +0000, Haiyang Zhang wrote:
> > -----Original Message-----
> > From: Michal Kubecek <[email protected]>
> > Sent: Thursday, July 23, 2020 3:36 PM
> > To: Chi Song <[email protected]>
> > Cc: KY Srinivasan <[email protected]>; Haiyang Zhang
> > <[email protected]>; Stephen Hemminger <[email protected]>;
> > Wei Liu <[email protected]>; David S. Miller <[email protected]>; Jakub
> > Kicinski <[email protected]>; [email protected];
> > [email protected]; [email protected]
> > Subject: Re: [PATCH v7 net-next] net: hyperv: dump TX indirection table to
> > ethtool regs
> >
> > On Wed, Jul 22, 2020 at 11:59:09PM -0700, Chi Song wrote:
> > > An imbalanced TX indirection table causes netvsc to have low
> > > performance. This table is created and managed during runtime. To help
> > > better diagnose performance issues caused by imbalanced tables, it needs
> > > make TX indirection tables visible.
> > >
> > > Because TX indirection table is driver specified information, so
> > > display it via ethtool register dump.
> >
> > Is the Tx indirection table really unique to netvsc or can we expect
> > other drivers to support similar feature? Also, would it make sense to
> > allow also setting the table with ethtool? (AFAICS it can be only set
> > from hypervisor at the moment.)
>
> Currently, TX indirection table is only used by the Hyper-V synthetic NIC. I'm
> not aware of any other NIC planning to use this.
> This table is created by host dynamically based on host side CPU usage,
> and provided to the VM periodically. Our protocol doesn't let the guest side
> to change it.

If host is expected to rewrite the table periodically, it would indeed
be of little use to set it on guest side. OK, let's do it as register
dump and see if someone else comes with similar feature.

Michal