Dmitry Eremin-Solenikov(lumag) replied on github web page:

platform/linux-generic/include/odp/api/std_types.h
line 4
@@ -29,6 +29,8 @@ extern "C" {
 
 typedef int odp_bool_t;
 
+typedef uint16_t odp_percent_t;


Comment:
In my opinion, let's just push it into `odp/api/spec/std_types.h`.

> Balasubramanian Manoharan(bala-manoharan) wrote:
> Okay. 
> @muvarov Travis does not check doxygen?


>> Balasubramanian Manoharan(bala-manoharan) wrote:
>> BP in HW is implemented as edge triggered and the interface is configured to 
>> send Back pressure to the peer when the level increases the threshold. 
>> Current our HW only supports only threshold value and is not monitored as a 
>> range.
>> If any HW later implements this as a range we can add in the future.


>>> Petri Savolainen(psavol) wrote:
>>> Although this is single param now, it's better to wrap it into a struct, so 
>>> that it's easy to add more params later (if needed). Also the 100th percent 
>>> units should be used.
>>> 
>>> struct {
>>>   uint16_t ena_threshold;
>>> } bp;
>>> 
>>> Could there be other thresholds params later? ena_threshold would leave 
>>> room for other (high, low, ...etc) threshold params.


>>>> Petri Savolainen(psavol) wrote:
>>>> 
>>>> 
>>>> Missing /**
>>>> 
>>>> "Enable back pressure
>>>> 
>>>> When true, back pressure is enabled and configured with the parameters 
>>>> below.
>>>> Otherwise, back pressure parameters are ignored. When back pressure is 
>>>> enabled 
>>>> for a particular flow, the HW can send back pressure information to the 
>>>> remote 
>>>> peer indicating a network congestion."


>>>>> Petri Savolainen(psavol) wrote:
>>>>> Wrap these two into "struct red". Add missing doxygen tagging. We should 
>>>>> use 100th parts of a percent. So, that API is not bottle neck if HW can 
>>>>> offer higher resolution than 1 percent. TM API uses the same unit.
>>>>> 
>>>>> /** RED parameters
>>>>> struct {
>>>>>   Maximum threshold percentage for RED in one-hundredths of a percent. 
>>>>>   Hence 100% is represented as the integer value 10000.
>>>>>   uint16_t max_threshold;
>>>>> 
>>>>>   uint16_t min_threshold;
>>>>> } red;


>>>>>> Petri Savolainen(psavol) wrote:
>>>>>> Missing /**
>>>>>> 
>>>>>> "Enable RED
>>>>>> 
>>>>>> When true, RED is enabled and configured with the red parameters below.
>>>>>> Otherwise, RED parameters are ignored."


>>>>>>> Petri Savolainen(psavol) wrote:
>>>>>>> Missing Doxygen tag /**
>>>>>>> 
>>>>>>> Run 'make doxygen-doc' locally before pushing and correct all doxygen 
>>>>>>> warnings.


>>>>>>>> Petri Savolainen(psavol) wrote:
>>>>>>>> For consistency, it's better to define probability as 100% here, as we 
>>>>>>>> use percents below.


>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>> As noted above, Detection.


>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>>> The correct term is Random Early Detection, not Discard. See [RFC 
>>>>>>>>>> 7567](https://tools.ietf.org/html/rfc7567).


https://github.com/Linaro/odp/pull/172#discussion_r145344423
updated_at 2017-10-18 08:19:46

Reply via email to