diff options
author | Mark Gray <mark.d.gray@redhat.com> | 2021-07-16 06:17:34 -0400 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2021-07-16 20:05:03 +0200 |
commit | 1325debb45955da14ecb35295c2cdfdf046f3dc3 (patch) | |
tree | 267198205052d14eacf7ba5504caa8914e614991 /ofproto/ofproto-dpif-upcall.c | |
parent | 3222a89d9aa2bc3ef317611d0a252f372a690d4a (diff) | |
download | openvswitch-1325debb45955da14ecb35295c2cdfdf046f3dc3.tar.gz |
ofproto: Change type of n_handlers and n_revalidators.
'n_handlers' and 'n_revalidators' are declared as type 'size_t'.
However, dpif_handlers_set() requires parameter 'n_handlers' as
type 'uint32_t'. This patch fixes this type mismatch.
Signed-off-by: Mark Gray <mark.d.gray@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-upcall.c')
-rw-r--r-- | ofproto/ofproto-dpif-upcall.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index ccf97266c..d22f7f073 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -129,10 +129,10 @@ struct udpif { struct dpif_backer *backer; /* Opaque dpif_backer pointer. */ struct handler *handlers; /* Upcall handlers. */ - size_t n_handlers; + uint32_t n_handlers; struct revalidator *revalidators; /* Flow revalidators. */ - size_t n_revalidators; + uint32_t n_revalidators; struct latch exit_latch; /* Tells child threads to exit. */ @@ -335,8 +335,8 @@ static int process_upcall(struct udpif *, struct upcall *, struct ofpbuf *odp_actions, struct flow_wildcards *); static void handle_upcalls(struct udpif *, struct upcall *, size_t n_upcalls); static void udpif_stop_threads(struct udpif *, bool delete_flows); -static void udpif_start_threads(struct udpif *, size_t n_handlers, - size_t n_revalidators); +static void udpif_start_threads(struct udpif *, uint32_t n_handlers, + uint32_t n_revalidators); static void udpif_pause_revalidators(struct udpif *); static void udpif_resume_revalidators(struct udpif *); static void *udpif_upcall_handler(void *); @@ -562,8 +562,8 @@ udpif_stop_threads(struct udpif *udpif, bool delete_flows) /* Starts the handler and revalidator threads. */ static void -udpif_start_threads(struct udpif *udpif, size_t n_handlers_, - size_t n_revalidators_) +udpif_start_threads(struct udpif *udpif, uint32_t n_handlers_, + uint32_t n_revalidators_) { if (udpif && n_handlers_ && n_revalidators_) { /* Creating a thread can take a significant amount of time on some @@ -632,8 +632,8 @@ udpif_resume_revalidators(struct udpif *udpif) * datapath handle must have packet reception enabled before starting * threads. */ void -udpif_set_threads(struct udpif *udpif, size_t n_handlers_, - size_t n_revalidators_) +udpif_set_threads(struct udpif *udpif, uint32_t n_handlers_, + uint32_t n_revalidators_) { ovs_assert(udpif); ovs_assert(n_handlers_ && n_revalidators_); @@ -691,8 +691,8 @@ udpif_get_memory_usage(struct udpif *udpif, struct simap *usage) void udpif_flush(struct udpif *udpif) { - size_t n_handlers_ = udpif->n_handlers; - size_t n_revalidators_ = udpif->n_revalidators; + uint32_t n_handlers_ = udpif->n_handlers; + uint32_t n_revalidators_ = udpif->n_revalidators; udpif_stop_threads(udpif, true); dpif_flow_flush(udpif->dpif); |