|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] vif rate dynamically change
Good morning every one,
I'm a new XEN developer I've seen that changing vif rate is not possible dynamically.
I decided to change the code so it would be possible the change it dynamically the code change will affect this file "DOM0/drivers/xen/netback/xenbus.c" for the moment the rate is fixed inside the connect function
static void connect(struct backend_info *be) { ... if (err) { xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename); return; }
xen_net_read_rate(dev, &be->netif->credit_bytes, &be->netif->credit_usec); be->netif->remaining_credit = be->netif->credit_bytes; ...
I want to add a function that read the rate dynamically from a /proc file but to change rate i need to have a pointer to the backend_info struct i found in xen XEN/tools/blktap/lib/xenbus.c a function that return backend_info struct pointer from backendpath
static struct backend_info *be_lookup_be(const char *bepath) { struct backend_info *be;
list_for_each_entry(be, &belist, list) if (strcmp(bepath, be->backpath) == 0) return be; return (struct backend_info *)NULL; }
but don't reallt know how to use it.
so my questions are : 1- is it a good way to send new rate values from proc file ? 2- is it possible to use the function be_lookup_be(implimented in xen tool code) in dom0 code to find backend_info from backendpath ? 3- if the ansower of 2 is yes witch format the backendpath is exemple form vif1.3, is the backedpath like this "backend/vif/0/3" ?
thanks in advance for an respoonse concerning any question.
|
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] vif rate dynamically change,
ahmed amamou <=
|
|
|
|
|