[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType
From: |
Alberto Garcia |
Subject: |
Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType |
Date: |
Mon, 26 Jun 2023 21:24:48 +0000 |
On Sun 25 Jun 2023 04:56:27 PM +08, zhenwei pi wrote:
> Use enum ThrottleTimerType instead of number index.
> +typedef enum {
> + THROTTLE_TIMER_READ = 0,
> + THROTTLE_TIMER_WRITE,
> + THROTTLE_TIMER_MAX
> +} ThrottleTimerType;
If you're doing this I suppose you could also change 'bool is_write'
with something like 'ThrottleTimerType timer', i.e
static bool throttle_compute_timer(ThrottleState *ts,
ThrottleTimerType timer,
int64_t now,
int64_t *next_timestamp)
Berto
- [PATCH 0/5] Misc fixes for throttle, zhenwei pi, 2023/06/25
- [PATCH 1/5] throttle: introduce enum ThrottleTimerType, zhenwei pi, 2023/06/25
- Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType,
Alberto Garcia <=
- [PATCH 2/5] test-throttle: use enum ThrottleTimerType, zhenwei pi, 2023/06/25
- [PATCH 3/5] throttle: support read-only and write-only, zhenwei pi, 2023/06/25
- [PATCH 4/5] test-throttle: test read only and write only, zhenwei pi, 2023/06/25
- [PATCH 5/5] cryptodev: use NULL throttle timer cb for read direction, zhenwei pi, 2023/06/25