Skip to contentSkip to conversation

WiMAX stack and drivers for Intel WiMAX Link 5050

ANN Inaky Perez-Gonzalez 8 participants 17 messages Apr 1, 2008 – Apr 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Intel would like to announce the initial release of a Linux WiMAX common stack and drivers for its WiMAX devices (eg: Intel(r) WiMAX/WiFi Link 5050, with estimated availability around third quarter of 2008).

The project follows a standard layered approach: a generic WiMAX kernel stack provides a common interface to control WiMAX devices. A user space daemon and libraries provide a high level API for control (network scanning, connection, disconnection, roaming management, etc) and access to the drivers.

Currently much of this higher level code is tailored to Intel's device, but we wanted to get it out as soon as possible.

You can find the code and additional information at
http://linuxwimax.org.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 12 lines · On Tue, 1 Apr 2008 11:07:37 -0700 Inaky Perez-Gonzalez…

Intel would like to announce the initial release of a Linux WiMAX common stack and drivers for its WiMAX devices (eg: Intel(r) WiMAX/WiFi Link 5050, with estimated availability around third quarter of 2008).

The project follows a standard layered approach: a generic WiMAX kernel stack provides a common interface to control WiMAX devices. A user space daemon and libraries provide a high level API for control (network scanning, connection, disconnection, roaming management, etc) and access to the drivers.

Quoted 6 lines

Currently much of this higher level code is tailored to Intel's device, but we wanted to get it out as soon as possible.

You can find the code and additional information at
http://linuxwimax.org.

Code review occurs on patch submittable not by pointing developers off to an external project. Most likely there will be feedback that requires changes to API and other choices so you want to do this soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 9 lines · Stephen Hemminger
Quoted 6 lines · On Tue, 1 Apr 2008 11:07:37 -0700 Inaky Perez-Gonzalez <[email protected]>…

Intel would like to announce the initial release of a Linux WiMAX common stack and drivers for its WiMAX devices (eg: Intel(r) WiMAX/WiFi Link 5050, with estimated availability around third quarter of 2008).

Quoted 5 lines
Quoted 1 line

...

Code review occurs on patch submittable not by pointing developers off to an external project. Most likely there will be feedback that requires changes to API and other choices so you want to do this soon.

I know. Just wanted to get out the bits ASAP for whoever is interested to start looking at it.

I am pondering how to do this because there is a lot of code and I still don't have it ready for merging to mainline.

Eventually I'll have a git tree branching off netdev and will have to break up the kernel part in patchbombs for review & submission and fix stuff as we go.

Thanks,

#3 lore raw
In reply to Inaky Perez-Gonzalez

I notice that there is a binary supplicant required. After the experience with the ipw3945 driver lack of acceptance, I would hope that Intel would have learned that dependence on binary userspace components would limit acceptance especially with other more hostile projects (OpenBSD).
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Inaky Perez-Gonzalez

This is the short (not in depth) code review of kernel component of Wimax.

Generic stack: drivers/net/wimax

1. Why spread those over 8 files of 100 lines each. Better to have a single file with 1000 lines and get reduced namespace and better compiler inlining etc.

2. The debug infrastructure is a mess of ugly macros that are unlikely to accepted in the current form, rework or delete it.

3. Use of sysfs for family and version ok, but why bother? Please don't build sysfs version checks into the API.

4. __wimax_flush_queue: is a nop, just remove

5. Stack is using generic netlink instead use newer netlink interface for management of devices: newlink/dellink instead see macvlan

i2400m hardware driver

1. sysfs
the inflight file is being used in a /proc style. Either change to one value per file or move to /proc/net/i2400m/ethX or better yet use debugfs /debugfs/i2400m/ethX/xxx

2. Use internal dev->stats for network stats (may not need get_stats at all)

3. No ioctl stub if not implemented

4. Use netdev_alloc_skb rather than alloc_skb for new code.

5. Use skb_copy_to_linear_data in i2400m_net_rx

6. Since hardware has to copy every received frame. Don't bother with checksum offload, the copy does the checksum for you and is safer.

7. Fine grain file organization in i2400m is bogus, put in one file and use proper name scope. Having 100 line files is unneeded

8. Fix the FIXME's?

9. Anyway to reuse existing usbnet infrastructure?

10. Since device is USB, Rx is in workqueue, so no need to go through netif_rx() softirq, should be able to go through netif_receive_skb

11. net_device and private data are zero on allocation, so no need for memset.

12. Since this is new code elminate all legacy ifdef's

#5 lore raw

Hi Stephen,

Quoted 1 line

This is the short (not in depth) code review of kernel component of Wimax.

many thanks for having a look at the source code.

Quoted 1 line

Generic stack: drivers/net/wimax

<snip>

Quoted 2 lines

5. Stack is using generic netlink instead use newer netlink interface for management of devices: newlink/dellink instead see macvlan

I might have missed something in the latest code, but how it is using generic netlink for device management. The current code is using generic netlink for communication with the user space component. This includes task like scanning and association. The current kernel/user space API might need improvement, but I am not getting your point here. Please explain what you mean.

Quoted 1 line

i2400m hardware driver

<snip>

Quoted 1 line

9. Anyway to reuse existing usbnet infrastructure?

I don't think so. WiMAX is not emulating an Ethernet device. It is an IP only networking interface.

Quoted 2 lines

10. Since device is USB, Rx is in workqueue, so no need to go through netif_rx() softirq, should be able to go through netif_receive_skb

You could have SDIO or PCI as a different transport.

Quoted 1 line

12. Since this is new code elminate all legacy ifdef's

Don't worry. We will do this before submitting it for mainline inclusion. It is a temporary solutions to help people that wanna test it with older kernels.

Regards

Marcel

#6 lore raw
In reply to Stephen Hemminger
Quoted 7 lines · Stephen Hemminger

This is the short (not in depth) code review of kernel component of Wimax.

Generic stack: drivers/net/wimax

1. Why spread those over 8 files of 100 lines each. Better to have a single file with 1000 lines and get reduced namespace and better compiler inlining etc.

Style difference, simplifies maintenance. Each file is logically grouped. Everything for doing X is in file X. I know you are a fan of big files, I am not :)

There is almost no inlining because each X only does stuff from itself. If there is a need for inlined stuff (I missed it) it should go to one of the header files --internal or external.

Quoted 2 lines

2. The debug infrastructure is a mess of ugly macros that are unlikely to accepted in the current form, rework or delete it.

Ok, I'll figure a way to clean it up. Need to move most to inlines, still making sure anything that is disabled is compiled out.

Quoted 2 lines

3. Use of sysfs for family and version ok, but why bother? Please don't build sysfs version checks into the API.

family ID: it makes it easy to map device<->family-id without expensive look ups the kernel like an attribute with the device name would be. Rationale is most systems will have a single wimax device in the kernel. include/linux/wimax.h and drivers/net/wimax/id-table.c should have this documented...ouch, just remembered. The code drop out there shouldn't be as complete (documentation wise) as what I need to publish. Pls hold for it, will be available.

version: I anticipate the wimax API exported to user space is going to undergo a lot of changes while we all agree on what is the best interface. Because things might break, I want to make sure user space stuff can detect that and fail cleanly. Hence the versioning.

It is designed to be flexible so that adding new APIs allows old code to work (however, changing existing APIs is where it breaks). From the docs:

* Each WiMAX device exports two sysfs files declaring the generic
* netlink family ID associated to the interface and another one which
* version it supports. The version code has to fit in one byte
* (restrictions imposed by generic netlink); we use version / 10 for
* the major version and version % 10 for the minor. This gives 9
* minors for each major and 25 majors.
*
* The inexistence of any of this means the device does not support
* the WiMAX extensions.
*
* The version change protocol is as follow:
*

Quoted 3 lines

* - Major versions: needs to be increased if an existing message is
* changed or removed. Doesn't need to be changed if a new message
* is added.

*

Quoted 4 lines

* - Minor verion: needs to be increased if new messages are being

*   added or some other consideration that doesn't impact too much
*   (like some kind of bug fix) and that is kind of left up in the
*   air to common sense.

*
* Your user space code should not try to work if the major version it
* was compiled for differs from what the kernel offers. As well, it
* should not work if the minor version of the kernel interface is
* lower than the one the user space code was compiled for. *
* libwimax's wimax_open() takes care of all this for you.

Quoted 2 lines

4. __wimax_flush_queue: is a nop, just remove

Removed in newer code.

Quoted 2 lines

5. Stack is using generic netlink instead use newer netlink interface for management of devices: newlink/dellink instead see macvlan

Geeze, I hide out for one week and a new system pops up?

What is the advantage of newlink dellink vs generic netlink? Pointers to doc? Generic netlink is fitting the bill pretty well as of now, so unless it is going away from the kernel, I feel we should not move it.

Quoted 6 lines

i2400m hardware driver

1. sysfs
the inflight file is being used in a /proc style. Either change to one value per file or move to /proc/net/i2400m/ethX or better yet use debugfs /debugfs/i2400m/ethX/xxx

All that is gone from current tip.

Quoted 1 line

2. Use internal dev->stats for network stats (may not need get_stats at all)

Noted, will do.

Quoted 1 line

3. No ioctl stub if not implemented

Ack.

Quoted 1 line

4. Use netdev_alloc_skb rather than alloc_skb for new code.

Any rationales for it? other than the padding and setting skb->dev, they seem the same.

Quoted 4 lines

5. Use skb_copy_to_linear_data in i2400m_net_rx

6. Since hardware has to copy every received frame. Don't bother with checksum offload, the copy does the checksum for you and is safer.

Current tip code receives data from the device to an skb and then clones the different packets to deliver to netdev. This is not needed/done any more.

Quoted 2 lines

7. Fine grain file organization in i2400m is bogus, put in one file and use proper name scope. Having 100 line files is unneeded

Again, style differences, a 10k file is already way too big for me.

Quoted 1 line

8. Fix the FIXME's?

En route, most of them fixed in tip.

Quoted 1 line

9. Anyway to reuse existing usbnet infrastructure?

Nope, the 2400 is a pure IP device (as Marcel mentioned). As well, we need to provide for using other bus connections (SDIO in the works), so that would break it up. OTOH, the hw protocol makes it different to plug into USBNET, as we can receive many packets in a single transaction.

Quoted 2 lines

10. Since device is USB, Rx is in workqueue, so no need to go through netif_rx() softirq, should be able to go through netif_receive_skb

Good point. Ack.

Quoted 2 lines

11. net_device and private data are zero on allocation, so no need for memset.

Ack

Quoted 1 line

12. Since this is new code elminate all legacy ifdef's

Done in tip.

We need to keep backwards compatibility to certain kernels for OSV support. ]Trying to make that as unobstrusive as possible. The git tip tree will be mostly backward-stuff clean.

Hey thanks a lot, this is great feedback

Signature · 5 lines
Inaky
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
Quoted 4 lines · Inaky Perez-Gonzalez

There is almost no inlining because each X only does stuff from itself. If there is a need for inlined stuff (I missed it) it should go to one of the header files --internal or external.

Inlining gets more and more discouraged. Also longer term I would expect that gcc will do inlining over files anyways (it already supports that, but needs special support in the Makefiles which the kernel doesn't have). So even with inlining you wouldn't need to merge files or move code into headers.

Quoted 5 lines

version: I anticipate the wimax API exported to user space is going to undergo a lot of changes while we all agree on what is the best interface. Because things might break, I want to make sure user space stuff can detect that and fail cleanly. Hence the versioning.

It's still a bad way to do that (I agree with Stephen on that). Was also always a mess on wireless.

If you don't want expandable TLAs another better alternative to versions is ext2 style compatible/incompatible feature bitmaps.

-Andi

#8 lore raw
Quoted 1 line

If you don't want expandable TLAs

What is "TLA" ? Google gives me same Texas Library Organisation, Wikipedia also doesn't know.

#10 lore raw
In reply to Andi Kleen
Quoted 11 lines · Andi Kleen
Quoted 5 lines

version: I anticipate the wimax API exported to user space is going to undergo a lot of changes while we all agree on what is the best interface. Because things might break, I want to make sure user space stuff can detect that and fail cleanly. Hence the versioning.

It's still a bad way to do that (I agree with Stephen on that). Was also always a mess on wireless.

If you don't want expandable TLAs another better alternative to versions is ext2 style compatible/incompatible feature bitmaps.

Ain't that another way of saying versions? Sorry guys, but I am having a hard time understanding how the alternatives are better.

Expandable TLAs are fine, until we need to change the meaning of an existing field/value. Then there is no way to change it without breaking existing code other than create a new message. And then we have a mess like wireless again.

With simple versioning, we just bump up the major number and break. In user space, the libwimax shim library would take care of hiding this for the user if so is needed.

Signature · 1 line
Inaky
#11 lore raw
Quoted 8 lines · Inaky Perez-Gonzalez
Quoted 6 lines · Andi Kleen
Quoted 5 lines

version: I anticipate the wimax API exported to user space is going to undergo a lot of changes while we all agree on what is the best interface. Because things might break, I want to make sure user space stuff can detect that and fail cleanly. Hence the versioning.

Quoted 7 lines
Quoted 5 lines

It's still a bad way to do that (I agree with Stephen on that). Was also always a mess on wireless.

If you don't want expandable TLAs another better alternative to versions is ext2 style compatible/incompatible feature bitmaps.

Ain't that another way of saying versions? Sorry guys, but I am

It's a related way, but an actually sane way.

With compat/incompat bitmaps user space can actually make a educated decision if it should fail or not

-Andi

#12 lore raw
In reply to Inaky Perez-Gonzalez
Quoted 4 lines · Inaky Perez-Gonzalez

There is almost no inlining because each X only does stuff from itself. If there is a need for inlined stuff (I missed it) it should go to one of the header files --internal or external.

Inlining gets more and more discouraged. Also longer term I would expect that gcc will do inlining over files anyways (it already supports that, but needs special support in the Makefiles which the kernel doesn't have). So even with inlining you wouldn't need to merge files or move code into headers.

Quoted 5 lines

version: I anticipate the wimax API exported to user space is going to undergo a lot of changes while we all agree on what is the best interface. Because things might break, I want to make sure user space stuff can detect that and fail cleanly. Hence the versioning.

It's still a bad way to do that (I agree with Stephen on that). Was also always a mess on wireless.

If you don't want expandable TLAs another better alternative to versions is ext2 style compatible/incompatible feature bitmaps.

-Andi

#13 lore raw
In reply to Inaky Perez-Gonzalez
Quoted 3 lines
Quoted 1 line

9. Anyway to reuse existing usbnet infrastructure?

Nope, the 2400 is a pure IP device (as Marcel mentioned).

With "pure IP", do you mean IPv4? Or do you mean "pure IPv4/IPv6"? If it is "pure IPv4", then WiMAX seems not future proof ...

#14 lore raw
Quoted 7 lines · Holger Schurig
Quoted 3 lines
Quoted 1 line

9. Anyway to reuse existing usbnet infrastructure?

Nope, the 2400 is a pure IP device (as Marcel mentioned).

With "pure IP", do you mean IPv4? Or do you mean "pure IPv4/IPv6"? If it is "pure IPv4", then WiMAX seems not future proof ...

It takes both. I guess what we should be saying is that it is not an ethernet-frame based device :) What you give the device is sent over to the base station, so it really is whatever the base station operator implements, which is mostly IP protocol (4, 6 or whatever).

Signature · 1 line
Inaky
#15 lore raw
Quoted 9 lines · On Wednesday 09 April 2008 20:12:05 Inaky Perez-Gonzalez wrote:
Quoted 7 lines · Holger Schurig
Quoted 3 lines
Quoted 1 line

9. Anyway to reuse existing usbnet infrastructure?

Nope, the 2400 is a pure IP device (as Marcel mentioned).

With "pure IP", do you mean IPv4? Or do you mean "pure IPv4/IPv6"? If it is "pure IPv4", then WiMAX seems not future proof ...

Quoted 5 lines

It takes both. I guess what we should be saying is that it is not an ethernet-frame based device :) What you give the device is sent over to the base station, so it really is whatever the base station operator implements, which is mostly IP protocol (4, 6 or whatever).

It's a pity that "Internet Protocol" (as in IPv4/IPv6) as well as "Intellectual Property" (as in IP-Core) have the same abbreviation.

;-)

Regards,
Chr.

#16 lore raw
In reply to Inaky Perez-Gonzalez

Looking at the kernel/user interface: wimax-tools-1.1/lib/op-open.c

This API is repeating the mistake of the old Linux Wireless API. It is putting version checks between kernel and library and this is a maintenance nightmare. Linux API's are not COM. Versioning is a mistake. Use a TLA api like netlink so it can be extensible without version handshake.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html