Ah right, I missed that!

Acked-By: Ihar Hrachyshka <ihrac...@redhat.com>

On Tue, Apr 18, 2023 at 12:23 PM Lorenzo Bianconi
<lorenzo.bianc...@redhat.com> wrote:
>
> > I think it still misses a test case adjustment to cover the large values.
>
> Actually I added it to patch 6/8.
>
> Regards,
> Lorenzo
>
> >
> >
> > On Tue, Apr 18, 2023 at 10:15 AM Lorenzo Bianconi
> > <lorenzo.bianc...@redhat.com> wrote:
> > >
> > > This patch allow to configure max/min rate greater than 4Gbps
> > >
> > > https://bugzilla.redhat.com/show_bug.cgi?id=2129742
> > > Tested-by: Rodolfo Alonso <ralon...@redhat.com>
> > > Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com>
> > > ---
> > >  controller/binding.c | 30 ++++++++++++++++++------------
> > >  1 file changed, 18 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/controller/binding.c b/controller/binding.c
> > > index 2f41ff593..f19ca077e 100644
> > > --- a/controller/binding.c
> > > +++ b/controller/binding.c
> > > @@ -114,9 +114,9 @@ struct qos_queue {
> > >      struct hmap_node node;
> > >      char *network;
> > >      uint32_t queue_id;
> > > -    uint32_t min_rate;
> > > -    uint32_t max_rate;
> > > -    uint32_t burst;
> > > +    unsigned long long min_rate;
> > > +    unsigned long long max_rate;
> > > +    unsigned long long burst;
> > >  };
> > >
> > >  void
> > > @@ -153,9 +153,12 @@ static void
> > >  get_qos_params(const struct sbrec_port_binding *pb, struct hmap 
> > > *queue_map,
> > >                 struct smap *egress_ifaces)
> > >  {
> > > -    uint32_t min_rate = smap_get_int(&pb->options, "qos_min_rate", 0);
> > > -    uint32_t max_rate = smap_get_int(&pb->options, "qos_max_rate", 0);
> > > -    uint32_t burst = smap_get_int(&pb->options, "qos_burst", 0);
> > > +    unsigned long long int min_rate = smap_get_ullong(
> > > +            &pb->options, "qos_min_rate", 0);
> > > +    unsigned long long int max_rate = smap_get_ullong(
> > > +            &pb->options, "qos_max_rate", 0);
> > > +    unsigned long long int burst = smap_get_ullong(
> > > +            &pb->options, "qos_burst", 0);
> > >      uint32_t queue_id = smap_get_int(&pb->options, "qdisc_queue_id", 0);
> > >      const char *network = smap_get(egress_ifaces, pb->logical_port);
> > >
> > > @@ -243,9 +246,12 @@ add_ovs_qos_table_entry(struct ovsdb_idl_txn 
> > > *ovs_idl_txn,
> > >              continue;
> > >          }
> > >
> > > -        uint32_t max_rate = smap_get_int(&queue->other_config, 
> > > "max-rate", 0);
> > > -        uint32_t min_rate = smap_get_int(&queue->other_config, 
> > > "min-rate", 0);
> > > -        uint32_t burst = smap_get_int(&queue->other_config, "burst", 0);
> > > +        unsigned long long int max_rate =
> > > +            smap_get_ullong(&queue->other_config, "max-rate", 0);
> > > +        unsigned long long int min_rate =
> > > +            smap_get_ullong(&queue->other_config, "min-rate", 0);
> > > +        unsigned long long int burst =
> > > +            smap_get_ullong(&queue->other_config, "burst", 0);
> > >
> > >          if (max_rate != q->max_rate || min_rate != q->min_rate ||
> > >              burst != q->burst) {
> > > @@ -260,9 +266,9 @@ add_ovs_qos_table_entry(struct ovsdb_idl_txn 
> > > *ovs_idl_txn,
> > >          ovsrec_qos_update_queues_setkey(qos, q->queue_id, queue);
> > >      }
> > >
> > > -    smap_add_format(&other_config, "max-rate", "%d", q->max_rate);
> > > -    smap_add_format(&other_config, "min-rate", "%d", q->min_rate);
> > > -    smap_add_format(&other_config, "burst", "%d", q->burst);
> > > +    smap_add_format(&other_config, "max-rate", "%lld", q->max_rate);
> > > +    smap_add_format(&other_config, "min-rate", "%lld", q->min_rate);
> > > +    smap_add_format(&other_config, "burst", "%lld", q->burst);
> > >      ovsrec_queue_verify_other_config(queue);
> > >      ovsrec_queue_set_other_config(queue, &other_config);
> > >      smap_destroy(&other_config);
> > > --
> > > 2.40.0
> > >
> >

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to