On 20 Jun 2022, at 12:12, Eelco Chaudron wrote:

> On 27 May 2022, at 11:00, Jianbo Liu wrote:
>
>> Add API to offload meter to HW, and the corresponding functions to call
>> the meter callbacks from all the registered flow API providers.
>> The interfaces are like those related to meter in dpif_class, in order
>> to pass necessary info to HW.
>>
>> Signed-off-by: Jianbo Liu <[email protected]>
>> ---
>>  lib/netdev-offload-provider.h | 19 +++++++++++++
>>  lib/netdev-offload.c          | 51 +++++++++++++++++++++++++++++++++++
>>  lib/netdev-offload.h          |  8 ++++++
>>  3 files changed, 78 insertions(+)
>>
>> diff --git a/lib/netdev-offload-provider.h b/lib/netdev-offload-provider.h
>> index 8ff2de983..c3028606b 100644
>> --- a/lib/netdev-offload-provider.h
>> +++ b/lib/netdev-offload-provider.h
>> @@ -94,6 +94,25 @@ struct netdev_flow_api {
>>       * takes ownership of a packet if errno != EOPNOTSUPP. */
>>      int (*hw_miss_packet_recover)(struct netdev *, struct dp_packet *);
>
> Your code seems to assume that the stats structure is already initialized, 
> this includes setting up all the possible bands, the stats->n_bands is also 
> set up and should be used in your code (see also my comments on patch  6). If 
> this is true, you can remove the max_band variable from all your callback.
>
> If this is not the case, you should change your patch 6, to use the max_bands 
> value and increase/update the n_bands if it's currently not set to 1.

If you read patch 6, it should be patch 4 :(

<SNIP>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to