All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: ahmed amamou <ahmed.amamou@lip6.fr>
Cc: "chrisw@sous-sol.org" <chrisw@sous-sol.org>,
	"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: [advices] patch for dynamically changing vif rate via proc file
Date: Fri, 03 Sep 2010 12:43:38 -0700	[thread overview]
Message-ID: <4C814FEA.5030604@goop.org> (raw)
In-Reply-To: <AANLkTinph=1Ua7gSV845gUBOkfuUnmw43XX9R7jq04EE@mail.gmail.com>

 On 09/02/2010 03:03 AM, ahmed amamou wrote:
> Hi Jermey and Chris,
> Sorry to bother you with this but as Maintainers  of XEN HYPERVISOR
> INTERFACE ,i wanted to ask you something
>
> I trying to make a patch that would allow me to dynamically change vif
> rate from a /proc file
> change written in proc file will be saved and value of
> netif->credit_usec and netif->credit_bytes will be assigned on the
> next tx_credit_exceeded check
> the patch mat be ready before the end of the day if you want i'll send
> you it as soon as i finish
>
> i just wanted to ask you if it was a good way to change vif rate from
> a proc file,as a beginner i don't really know to much of best
> practises in modules programming

/proc is definitely the wrong API for this.

For this kind of thing, its probably better to either use netlink, or
xenbus (xenstore) to keep this kind of per-interface parameter tuning.

But it isn't even clear that doing it at the device level is correct
anyway.  If the guest wants to control its own network traffic, or if
dom0 wants to control the guest traffic, there are many generic
mechanisms for doing traffic shaping.

What are you trying to achieve?

Thanks,
    J

       reply	other threads:[~2010-09-03 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTinph=1Ua7gSV845gUBOkfuUnmw43XX9R7jq04EE@mail.gmail.com>
2010-09-03 19:43 ` Jeremy Fitzhardinge [this message]
2010-09-03 23:22   ` [advices] patch for dynamically changing vif rate via proc file ahmed amamou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C814FEA.5030604@goop.org \
    --to=jeremy@goop.org \
    --cc=Xen-devel@lists.xensource.com \
    --cc=ahmed.amamou@lip6.fr \
    --cc=chrisw@sous-sol.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.