Discussion:
where is ifp->if_baudrate used?
(too old to reply)
Izumi Tsutsui
2007-03-18 02:41:12 UTC
Permalink
Hi,

struct ifnet has if_baudrate (which is actually if_data.ifi_baudrate),
member, but where is the member used?

Should it be initilized to proper values in attachments of each driver?
Or is it initialized in the MII layer later?

Currently only a few drivers have it, and if it isn't initialized
in the driver attacments, it will be set to default 10Mbps in
sys/net/if_ethersubr.c:ether_ifattach().
I wonder if we should set it to proper speed manually or not.
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2007-03-18 05:42:33 UTC
Permalink
It may be intended for use by SNMP agents.
Hmm, intended but currently unused?
Post by Izumi Tsutsui
Currently only a few drivers have it, and if it isn't initialized
in the driver attacments, it will be set to default 10Mbps in
sys/net/if_ethersubr.c:ether_ifattach().
I wonder if we should set it to proper speed manually or not.
A lot of device drivers know the link speed; it's even reportable via
ifconfig. It would be nice if they could set it.
If a device has MII, if_baudrate will be set in mii_phy_statusmsg()
via mii_phy_update(), so I guess we don't have to have explicit
initialization on such interface during attach, right?
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Steven M. Bellovin
2007-03-18 05:34:18 UTC
Permalink
On Sun, 18 Mar 2007 11:41:12 +0900
Post by Izumi Tsutsui
Hi,
struct ifnet has if_baudrate (which is actually if_data.ifi_baudrate),
member, but where is the member used?
It may be intended for use by SNMP agents.
Post by Izumi Tsutsui
Should it be initilized to proper values in attachments of each
driver? Or is it initialized in the MII layer later?
Currently only a few drivers have it, and if it isn't initialized
in the driver attacments, it will be set to default 10Mbps in
sys/net/if_ethersubr.c:ether_ifattach().
I wonder if we should set it to proper speed manually or not.
A lot of device drivers know the link speed; it's even reportable via
ifconfig. It would be nice if they could set it.


--Steve Bellovin, http://www.cs.columbia.edu/~smb

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young
2007-03-18 10:41:52 UTC
Permalink
Post by Izumi Tsutsui
Hi,
struct ifnet has if_baudrate (which is actually if_data.ifi_baudrate),
member, but where is the member used?
Perhaps ifi_baudrate was intended to inform a routing protocol about the
link speed, so that it could synthesize a link metric (10^6/ifi_baudrate).

I question whether any single rate suffices to describe many links.
Consider that commonplace link technologies use multirate PHYs (56k
modems, WLAN, powerline). Also, a single ethernet/WLAN/powerline link
may connect multiple stations. The NIC may use a different rate to
transmit to each station. How can a single rate characterize such a link?

Now, suppose we treat ifi_baudrate as a maximum PHY bit rate. I feel
dissatisfied comparing a 108 Mb/s WiFi link with a 100 Mb/s ethernet link
by their ifi_baudrate, if the former ifi_baudrate is set to 108 * 10^6,
and the latter to 100 * 10^6. To make an "apples with apples" comparison
of the two links, I need more information than the ifi_baudrate.

A slightly more practical measure of link speed tells how many
ifi_mtu-sized link-layer payloads you can send using the top PHY bitrate,
figuring in all of the overheads; call this the "speed limit" on the link.

Dave
--
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jason Thorpe
2007-03-19 18:13:27 UTC
Permalink
Post by David Young
I question whether any single rate suffices to describe many links.
Consider that commonplace link technologies use multirate PHYs (56k
modems, WLAN, powerline). Also, a single ethernet/WLAN/powerline link
may connect multiple stations. The NIC may use a different rate to
transmit to each station. How can a single rate characterize such a link?
The intent would be to update the value with the current rate being
used by the link.
Post by David Young
Now, suppose we treat ifi_baudrate as a maximum PHY bit rate. I feel
dissatisfied comparing a 108 Mb/s WiFi link with a 100 Mb/s ethernet link
by their ifi_baudrate, if the former ifi_baudrate is set to 108 * 10^6,
and the latter to 100 * 10^6. To make an "apples with apples"
comparison
of the two links, I need more information than the ifi_baudrate.
A slightly more practical measure of link speed tells how many
ifi_mtu-sized link-layer payloads you can send using the top PHY bitrate,
figuring in all of the overheads; call this the "speed limit" on the link.
Dave
--
David Young OJC Technologies
-- thorpej


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Greg Troxel
2007-03-19 18:35:43 UTC
Permalink
Post by Jason Thorpe
Post by David Young
I question whether any single rate suffices to describe many links.
Consider that commonplace link technologies use multirate PHYs (56k
modems, WLAN, powerline). Also, a single ethernet/WLAN/powerline link
may connect multiple stations. The NIC may use a different rate to
transmit to each station. How can a single rate characterize such a link?
The intent would be to update the value with the current rate being
used by the link.
The problem is that because of per-recipient rate adapation, there is
in general no such rate. David's point really is that there are
interfaces for which the "baud rate" (which I will interpret at bit
rate) abstraction is inadequate.

really more to dyoung now:

Given that, until the entire networking stack has some richer
abstraction (and doing this isn't clearly a good idea), it makes sense
for some value to be reported, using the "if I know the reader of this
value will be interpreting it like a single speed as if for an
Ethernet, what should I tell them" test. So perhaps some long term
average of the rates used, derated by inter-packet gaps. In IBSS or
AP mode, this is pretty tough. In STA mode, one could simply use the
value used to send packets to the AP.

Loading...