Re: [vpp-dev] Semantics of field 'link_speed' in 'sw_interface_details' API.

2018-03-30 Thread Dmitry Vakhrushev
 Ok. Thank you.
Seems 1kbps steps looks fine for me too.

Regards,
--Dmitry


On Thu, Mar 29, 2018 at 10:46 PM, Damjan Marion 
wrote:

>
> Yes, but too late for 18.04. We can do that change later after rc1 is out.
> I personally prefer that we simply keep speed as numeric value in 1kbps
> steps.
> That should be fine for up to 4Tbps.
>
>
> On 27 Mar 2018, at 14:58, Dmitry Vakhrushev  wrote:
>
> Hi,
>
> Changes in commit: 03f47f1e738051db1412a93c2b90a7426f81f648
>
>
> This commit provided new ethernet speeds which store as speed bit in a
> variable. And the current version of API for 'sw_interface_details' is
> not correct for that changes.
> Current variable in sw_interface_details API interface doesn't support all
> speeds because it was limited to 8 bits (this field has type u8).
>
> I'd like to change the type to u32.
>
> Can I do that?
> Or can we change the semantics of representation of speed?
> For example, speed in Mb or enum of speeds.
>
>
> Now we have:
> 1) link_speed (now is u8, but need at least u16):
> 1 = 10M,
> 2 = 100M,
> 4 = 1G,
> 8 = 2_5G,
> 16 = 5G,
> 32 = 10G, etc.
>
> We can do it like (need u32):
> a) 10 = 10M.
> 100 = 100M,
> 1000 = 1G,
> 2500 = 2_5G,
> 5000 = 5G, etc.
> or like this (need u8 field without changes):
> b) 1 = 10M.
> 2 = 100M,
> 3 = 1G,
> 4 = 2_5G,
> 5 = 5G, etc.
>
>
> Thank you,
> -dmitry
> 
>
>
>


-- 

*--*
*Dmitry VakhrushevSystem Software Developer*
SperaSoft, Inc.
www.sperasoft.com
Mobile:  +7(999) 205-97-46 Russia

*LEGAL CONFIDENTIAL:* The information in this e-mail and in any attachment
may contain INFORMATION WHICH IS LEGALLY PRIVILEGED. It is intended only
for the attention and use of the named recipient. If you are not the
intended recipient, you are not authorized to retain, disclose, copy or
distribute the message and/or any of its attachments. If you received this
e-mail in error, please notify me and delete this message. Thank you.


Re: [vpp-dev] Semantics of field 'link_speed' in 'sw_interface_details' API.

2018-03-29 Thread Chris Luke
That only really leaves us one order of magnitude of growth…! :)

Chris

From: <vpp-dev@lists.fd.io> on behalf of Damjan Marion <dmarion.li...@gmail.com>
Date: Thursday, March 29, 2018 at 12:53
To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Cc: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] Semantics of field 'link_speed' in 
'sw_interface_details' API.


Yes, but too late for 18.04. We can do that change later after rc1 is out.
I personally prefer that we simply keep speed as numeric value in 1kbps steps.
That should be fine for up to 4Tbps.


On 27 Mar 2018, at 14:58, Dmitry Vakhrushev 
<dmi...@netgate.com<mailto:dmi...@netgate.com>> wrote:

Hi,

Changes in commit: 03f47f1e738051db1412a93c2b90a7426f81f648

This commit provided new ethernet speeds which store as speed bit in a 
variable. And the current version of API for 'sw_interface_details' is not 
correct for that changes.
Current variable in sw_interface_details API interface doesn't support all 
speeds because it was limited to 8 bits (this field has type u8).

I'd like to change the type to u32.

Can I do that?
Or can we change the semantics of representation of speed?
For example, speed in Mb or enum of speeds.

Now we have:
1) link_speed (now is u8, but need at least u16):
1 = 10M,
2 = 100M,
4 = 1G,
8 = 2_5G,
16 = 5G,
32 = 10G, etc.

We can do it like (need u32):
a) 10 = 10M.
100 = 100M,
1000 = 1G,
2500 = 2_5G,
5000 = 5G, etc.
or like this (need u8 field without changes):
b) 1 = 10M.
2 = 100M,
3 = 1G,
4 = 2_5G,
5 = 5G, etc.

Thank you,
-dmitry




Re: [vpp-dev] Semantics of field 'link_speed' in 'sw_interface_details' API.

2018-03-29 Thread Damjan Marion

Yes, but too late for 18.04. We can do that change later after rc1 is out.
I personally prefer that we simply keep speed as numeric value in 1kbps steps.
That should be fine for up to 4Tbps.

> On 27 Mar 2018, at 14:58, Dmitry Vakhrushev  wrote:
> 
> Hi,
> 
> Changes in commit: 03f47f1e738051db1412a93c2b90a7426f81f648
> 
> This commit provided new ethernet speeds which store as speed bit in a 
> variable. And the current version of API for 'sw_interface_details' is not 
> correct for that changes.
> Current variable in sw_interface_details API interface doesn't support all 
> speeds because it was limited to 8 bits (this field has type u8). 
> 
> I'd like to change the type to u32. 
> 
> Can I do that? 
> Or can we change the semantics of representation of speed?
> For example, speed in Mb or enum of speeds.
> 
> Now we have:
> 1) link_speed (now is u8, but need at least u16):
> 1 = 10M, 
> 2 = 100M, 
> 4 = 1G, 
> 8 = 2_5G,
> 16 = 5G,
> 32 = 10G, etc.
> 
> We can do it like (need u32):
> a) 10 = 10M. 
> 100 = 100M, 
> 1000 = 1G,
> 2500 = 2_5G,
> 5000 = 5G, etc.
> or like this (need u8 field without changes):
> b) 1 = 10M. 
> 2 = 100M, 
> 3 = 1G,
> 4 = 2_5G,
> 5 = 5G, etc.
> 
> Thank you,
> -dmitry
> 



[vpp-dev] Semantics of field 'link_speed' in 'sw_interface_details' API.

2018-03-27 Thread Dmitry Vakhrushev
Hi,

Changes in commit: 03f47f1e738051db1412a93c2b90a7426f81f648


This commit provided new ethernet speeds which store as speed bit in a
variable. And the current version of API for 'sw_interface_details' is not
correct for that changes.
Current variable in sw_interface_details API interface doesn't support all
speeds because it was limited to 8 bits (this field has type u8).

I'd like to change the type to u32.

Can I do that?
Or can we change the semantics of representation of speed?
For example, speed in Mb or enum of speeds.


Now we have:
1) link_speed (now is u8, but need at least u16):
1 = 10M,
2 = 100M,
4 = 1G,
8 = 2_5G,
16 = 5G,
32 = 10G, etc.

We can do it like (need u32):
a) 10 = 10M.
100 = 100M,
1000 = 1G,
2500 = 2_5G,
5000 = 5G, etc.
or like this (need u8 field without changes):
b) 1 = 10M.
2 = 100M,
3 = 1G,
4 = 2_5G,
5 = 5G, etc.


Thank you,
-dmitry