Re: Traffic shaping in the driver.

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

 



I'm new into the Drivers field. I've few relevant questions below.

----- Original Message -----
From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Vinay Vernekar <vinay.vernekar@wipro.com>
Cc: <linux-net@vger.rutgers.edu>; <linux-atm@lrc.di.epfl.ch>
Sent: Wednesday, July 12, 2000 6:51 PM
Subject: Re: Traffic shaping in the driver.


> This doesn't really belong on linux-net, follow-ups are welcome to remove
> that list, IMO.
>
> Vinay Vernekar wrote:
> > I am developing a driver for ADSL modem. I need to implement traffic
> > shaping with a certain upstream bit rate. Can anyone suggest how is
> > this done. I want to know what calls I have to use for this purpose. It
> > will be helpful if anybody can tell an already existing driver where it
> > is done.
>
> Look at pretty much any ATM driver for example code, at least if your
> card supports shaping in hardware.

What about Efficient SpeadStream 3010 card? Does it support shaping? Or,
Does this card contain Usage Parameter Control function?

>
> When your driver's ->open(vcc,vpi,vci) method is called on a vcc, you can
> inspect the requested QoS in vcc->qos.  Specifically, you'd do something
> like:
>
> switch (vcc->qos.txtp.traffic_class) {
> case ATM_UBR:
> mydriver_no_qos_requested();
> break;
> case ATM_CBR:
> pcr = atm_pcr_goal(&vcc->qos.txtp);
> if (pcr == 0)
> pcr = MYDRIVER_MAXIMUM_CELLS_PER_SECOND;
> if (pcr < 0) /* This means round donw, technically */
> pcr = -pcr;
> mydriver_cbr_tx_cells_per_sec(pcr);
> break;
> default: /* Unsupported QoS type */
> return -EINVAL;
> }
>
> Obviously fill in mydriver_*() with whatever code your device needs to
> set up hardware shaping on that vcc.  atm_pcr_goal() is a utility
> function provided in net/atm/atm_misc.c -- look at the documentation
there.

For UBR, how much bandwidth will be allocated for the first VCC opened. For
subsequent VCCs how the bandwidth will be distributed? How one can
support VBR?

>
> If your card does not support hardware shaping then you'd need to
> look at the higher level stuff like network schedulers and such.
> I'd be really surprised if this was the case, though -- for optimum
> performance the DSL modem's SAR chip  has to provide cells with the
> right gap to keep the small buffer on the PHY chip happy, so it
> almost certainly has at least rudimentary hardware shaping support.
>
> There's also a ->change_qos() entry point which can be called to
> modify the QoS of an open vcc.  It's optional to implement and
> rarely used in these types of applications, so I wouldn't worry about
> it right away.

What you will be going to do in this function? Even if you change the
QOS of your VC at your end, changing at the network of an established
VCC is not possible, I suppose. So, how much one will be gaining from
it?

-thanks,
dipak


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux