> The commit message headline should be fixed: fro -> for

ack, I will fix it.

> 
> Should a test case be adjusted to confirm that this works? An existing
> test case can be reused.

sure, will do.

Regards,
Lorenzo

> 
> 
> On Thu, Apr 13, 2023 at 10:45 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 f375109d9..aa16c802b 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);
> >
> > @@ -249,9 +252,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) {
> > @@ -266,9 +272,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.39.2
> >
> 
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to