All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit
@ 2017-12-14 20:31 Jason Baron
  2017-12-20 15:00 ` [virtio-dev] " Michael S. Tsirkin
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Baron @ 2017-12-14 20:31 UTC (permalink / raw)
  To: virtio-dev; +Cc: Michael S. Tsirkin, jasowang

Hi,

We have found it useful to have the virtio net device export a linkspeed
and duplex setting, such that a guest linkspeed and duplex settings can
be set automatically from the host side. We have some guest software
that relies on this setting, and fails without a valid value provided.
Thus, I would like to propose adding a new feature bit:

VIRTIO_NET_F_SPEED_DUPLEX (4) Device provides a linkspeed and duplex setting

I have provided sample qemu hypervisor and linux kernel guest code to
implement this feature here:

http://lkml.iu.edu/hypermail/linux/kernel/1712.1/05692.html

Thanks,

-Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [virtio-dev] Re: Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit
  2017-12-14 20:31 [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit Jason Baron
@ 2017-12-20 15:00 ` Michael S. Tsirkin
  2017-12-21 11:37   ` [virtio-dev] " Yan Vugenfirer
  0 siblings, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2017-12-20 15:00 UTC (permalink / raw)
  To: Jason Baron; +Cc: virtio-dev, jasowang

On Thu, Dec 14, 2017 at 03:31:54PM -0500, Jason Baron wrote:
> Hi,
> 
> We have found it useful to have the virtio net device export a linkspeed
> and duplex setting, such that a guest linkspeed and duplex settings can
> be set automatically from the host side. We have some guest software
> that relies on this setting, and fails without a valid value provided.

That software really should be fixed btw. You can't always reliably
figure out the speed, and it might change at any time.

> Thus, I would like to propose adding a new feature bit:
> 
> VIRTIO_NET_F_SPEED_DUPLEX (4) Device provides a linkspeed and duplex setting


I think a high feature bit would be better. Low bits can be
backported to legacy devices, so better used for things
like mtu, where communication just breaks otherwise,
and for net we are running out of these.


> I have provided sample qemu hypervisor and linux kernel guest code to
> implement this feature here:
> 
> http://lkml.iu.edu/hypermail/linux/kernel/1712.1/05692.html
> 
> Thanks,
> 
> -Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit
  2017-12-20 15:00 ` [virtio-dev] " Michael S. Tsirkin
@ 2017-12-21 11:37   ` Yan Vugenfirer
  2017-12-21 18:44     ` Jason Baron
  2017-12-21 20:31     ` Michael S. Tsirkin
  0 siblings, 2 replies; 6+ messages in thread
From: Yan Vugenfirer @ 2017-12-21 11:37 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Jason Baron, virtio-dev, jasowang


> On 20 Dec 2017, at 17:00, Michael S. Tsirkin <mst@redhat.com> wrote:
> 
> On Thu, Dec 14, 2017 at 03:31:54PM -0500, Jason Baron wrote:
>> Hi,
>> 
>> We have found it useful to have the virtio net device export a linkspeed
>> and duplex setting, such that a guest linkspeed and duplex settings can
>> be set automatically from the host side. We have some guest software
>> that relies on this setting, and fails without a valid value provided.
> 
> That software really should be fixed btw. You can't always reliably
> figure out the speed, and it might change at any time.
> 
Good point. Each time when there is a linked up indication from the host, we should expect that the settings can be different (for example backend changed).

>> Thus, I would like to propose adding a new feature bit:
>> 
>> VIRTIO_NET_F_SPEED_DUPLEX (4) Device provides a linkspeed and duplex setting
> 
> 
> I think a high feature bit would be better. Low bits can be
> backported to legacy devices, so better used for things
> like mtu, where communication just breaks otherwise,
> and for net we are running out of these.
> 
> 
>> I have provided sample qemu hypervisor and linux kernel guest code to
>> implement this feature here:
>> 
>> http://lkml.iu.edu/hypermail/linux/kernel/1712.1/05692.html
>> 
>> Thanks,
>> 
>> -Jason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit
  2017-12-21 11:37   ` [virtio-dev] " Yan Vugenfirer
@ 2017-12-21 18:44     ` Jason Baron
  2017-12-21 20:31     ` Michael S. Tsirkin
  1 sibling, 0 replies; 6+ messages in thread
From: Jason Baron @ 2017-12-21 18:44 UTC (permalink / raw)
  To: Yan Vugenfirer, Michael S. Tsirkin; +Cc: virtio-dev, jasowang



On 12/21/2017 06:37 AM, Yan Vugenfirer wrote:
> 
>> On 20 Dec 2017, at 17:00, Michael S. Tsirkin <mst@redhat.com> wrote:
>>
>> On Thu, Dec 14, 2017 at 03:31:54PM -0500, Jason Baron wrote:
>>> Hi,
>>>
>>> We have found it useful to have the virtio net device export a linkspeed
>>> and duplex setting, such that a guest linkspeed and duplex settings can
>>> be set automatically from the host side. We have some guest software
>>> that relies on this setting, and fails without a valid value provided.
>>
>> That software really should be fixed btw. You can't always reliably
>> figure out the speed, and it might change at any time.
>>
> Good point. Each time when there is a linked up indication from the host, we should expect that the settings can be different (for example backend changed).
> 

Indeed, I didn't implement the ability to dynamically update the
linkspeed via the host(say via a qemu monitor command), because I didn't
need it. But it could be added later if somebody wanted it...

Thanks,

-Jason

>>> Thus, I would like to propose adding a new feature bit:
>>>
>>> VIRTIO_NET_F_SPEED_DUPLEX (4) Device provides a linkspeed and duplex setting
>>
>>
>> I think a high feature bit would be better. Low bits can be
>> backported to legacy devices, so better used for things
>> like mtu, where communication just breaks otherwise,
>> and for net we are running out of these.
>>
>>
>>> I have provided sample qemu hypervisor and linux kernel guest code to
>>> implement this feature here:
>>>
>>> http://lkml.iu.edu/hypermail/linux/kernel/1712.1/05692.html
>>>
>>> Thanks,
>>>
>>> -Jason
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit
  2017-12-21 11:37   ` [virtio-dev] " Yan Vugenfirer
  2017-12-21 18:44     ` Jason Baron
@ 2017-12-21 20:31     ` Michael S. Tsirkin
  2017-12-21 21:17       ` Jason Baron
  1 sibling, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2017-12-21 20:31 UTC (permalink / raw)
  To: Yan Vugenfirer; +Cc: Jason Baron, virtio-dev, jasowang

On Thu, Dec 21, 2017 at 01:37:29PM +0200, Yan Vugenfirer wrote:
> 
> > On 20 Dec 2017, at 17:00, Michael S. Tsirkin <mst@redhat.com> wrote:
> > 
> > On Thu, Dec 14, 2017 at 03:31:54PM -0500, Jason Baron wrote:
> >> Hi,
> >> 
> >> We have found it useful to have the virtio net device export a linkspeed
> >> and duplex setting, such that a guest linkspeed and duplex settings can
> >> be set automatically from the host side. We have some guest software
> >> that relies on this setting, and fails without a valid value provided.
> > 
> > That software really should be fixed btw. You can't always reliably
> > figure out the speed, and it might change at any time.
> > 
> Good point. Each time when there is a linked up indication from the host, we should expect that the settings can be different (for example backend changed).

Interesting.

So far the motivation was just to trick some proprietary software,
for that a static field might be enough.

If not - what is the motivation exactly? 


> >> Thus, I would like to propose adding a new feature bit:
> >> 
> >> VIRTIO_NET_F_SPEED_DUPLEX (4) Device provides a linkspeed and duplex setting
> > 
> > 
> > I think a high feature bit would be better. Low bits can be
> > backported to legacy devices, so better used for things
> > like mtu, where communication just breaks otherwise,
> > and for net we are running out of these.
> > 
> > 
> >> I have provided sample qemu hypervisor and linux kernel guest code to
> >> implement this feature here:
> >> 
> >> http://lkml.iu.edu/hypermail/linux/kernel/1712.1/05692.html
> >> 
> >> Thanks,
> >> 
> >> -Jason
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> > 

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit
  2017-12-21 20:31     ` Michael S. Tsirkin
@ 2017-12-21 21:17       ` Jason Baron
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Baron @ 2017-12-21 21:17 UTC (permalink / raw)
  To: Michael S. Tsirkin, Yan Vugenfirer; +Cc: virtio-dev, jasowang



On 12/21/2017 03:31 PM, Michael S. Tsirkin wrote:
> On Thu, Dec 21, 2017 at 01:37:29PM +0200, Yan Vugenfirer wrote:
>>
>>> On 20 Dec 2017, at 17:00, Michael S. Tsirkin <mst@redhat.com> wrote:
>>>
>>> On Thu, Dec 14, 2017 at 03:31:54PM -0500, Jason Baron wrote:
>>>> Hi,
>>>>
>>>> We have found it useful to have the virtio net device export a linkspeed
>>>> and duplex setting, such that a guest linkspeed and duplex settings can
>>>> be set automatically from the host side. We have some guest software
>>>> that relies on this setting, and fails without a valid value provided.
>>>
>>> That software really should be fixed btw. You can't always reliably
>>> figure out the speed, and it might change at any time.
>>>
>> Good point. Each time when there is a linked up indication from the host, we should expect that the settings can be different (for example backend changed).
> 
> Interesting.
> 
> So far the motivation was just to trick some proprietary software,
> for that a static field might be enough.
> 
> If not - what is the motivation exactly? 
> 

I think this was addressed to me.

For me, yes the motivation is that we have internal tools that both
alert and make decisions based on the linkspeed. So an unknown value
will raise monitoring alerts.

I could set these in the guest via ethtool, but I didn't want to special
case virtio_net. And I was hoping this change would be more generally
useful to others.

Thanks,

-Jason


> 
>>>> Thus, I would like to propose adding a new feature bit:
>>>>
>>>> VIRTIO_NET_F_SPEED_DUPLEX (4) Device provides a linkspeed and duplex setting
>>>
>>>
>>> I think a high feature bit would be better. Low bits can be
>>> backported to legacy devices, so better used for things
>>> like mtu, where communication just breaks otherwise,
>>> and for net we are running out of these.
>>>
>>>
>>>> I have provided sample qemu hypervisor and linux kernel guest code to
>>>> implement this feature here:
>>>>
>>>> http://lkml.iu.edu/hypermail/linux/kernel/1712.1/05692.html
>>>>
>>>> Thanks,
>>>>
>>>> -Jason
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
>>> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-21 21:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 20:31 [virtio-dev] Add VIRTIO_NET_F_SPEED_DUPLEX (4) feature bit Jason Baron
2017-12-20 15:00 ` [virtio-dev] " Michael S. Tsirkin
2017-12-21 11:37   ` [virtio-dev] " Yan Vugenfirer
2017-12-21 18:44     ` Jason Baron
2017-12-21 20:31     ` Michael S. Tsirkin
2017-12-21 21:17       ` Jason Baron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.