This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] vif rate dynamically change proposal

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] vif rate dynamically change proposal
From: ahmed amamou <ahmed.amamou@xxxxxxxxxxx>
Date: Mon, 30 Aug 2010 10:19:02 +0200
Delivery-date: Mon, 30 Aug 2010 01:20:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
In-reply-to: <BAY156-w350401E0112409A0796D139E860@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BAY156-w9069BC783FD94CAE4D6EA9E860@xxxxxxx>, <BAY156-w350401E0112409A0796D139E860@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Good morning every one,

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);

    xen_net_read_rate(dev, &be->netif->credit_bytes,
    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 or a least to xen_netif one
so i can change in the netback.c file in function

static bool tx_credit_exceeded(struct xen_netif *netif, unsigned size)
static void tx_add_credit(struct xen_netif *netif)
to impose readinh the value of crdit bye ans credit_usec from proc

so my questions are :
1- is it a good way to send new rate values from proc file ?
2-how to get pointer to correct xen_netif from vif name

thanks in advance for an respoonse concerning any question.
Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>