[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] xl: Need help with overflow and error handling for vif rate support



Hi,

I'm working a patch to add support for vif rate limiting support to libxl/xl. [1]

I'm especially working on using uint64_t instead of uint32_t [2] and adding error handling. [3]

- How should I check for overflows when multiplying 2 uint64_t together?
  - I'm currently using math.h and log. Is it the correct approach?
- How should I handle errors?
  - Should I do something similar to libxlu_disk.c?
  - Should xlu_vif_parse_rate prints an error and returns an error code?
- If the error is from one of the "helpers", should they print an error too or should xlu_vif_parse_rate deals with it?

Any help would be greatly appreciated.

Regards,

[1] http://lists.xen.org/archives/html/xen-devel/2012-03/msg01596.html
[2] http://lists.xen.org/archives/html/xen-devel/2012-03/msg01627.html
[3] http://lists.xen.org/archives/html/xen-devel/2012-03/msg01738.html

--
Mathieu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.