Plans for netstack

I’m moving a thread from the TeamHaiku forum here:

red_devel wrote:
umccullough wrote:
The biggest problem is probably driver support...

From what I’ve gathered over time - there are possibly some threading issues in the current netstack. Last I tried, ICMP was broke - DNS and DHCP are not working… but otherwise it is usable I think.

You have to configure the interface and routing yourself, however - using ifconfig and route.

Interesting. Good to know. I remember reading somewhere the developers were looking to use the FreeBSD netstack. Is that what we’re dealing with now? or is this kindav a temporary hack job until there is someone available to make that goal a reality?

The current netstack is a BSD port, but I’m not entirely sure that it’s FreeBSD specifically. There is currently a discussion on the net team mailing list on whether a new port of FreeBSD, an attempt to port DragonFly, or an attempt to fix up the issues with the current netstack is the best approach for R1 - and some discussion about R2 as well.

There is a new developer adding his support here named Joseph Liu. There has been some active discussion about these options between Joseph, Axel, Waldemar, and Phillippe about what is best/easiest. There appear to be varying opinions still.

I had the impression that we agreed on porting FreeBSD’s netstack. Fixing our current netstack would be much work and on the long run we’d have problems with porting new functionality because our netstack is very much out of date. I’m also sure that there are security vulnearabilities…

DHCP is not implemented, at all.

Could you please tell us more about the DNS problem? Which apps did you use? What happened? Thanks!

wkornew wrote:
I had the impression that we agreed on porting FreeBSD's netstack. Fixing our current netstack would be much work and on the long run we'd have problems with porting new functionality because our netstack is very much out of date. I'm also sure that there are security vulnearabilities...

DHCP is not implemented, at all.

Could you please tell us more about the DNS problem? Which apps did you use? What happened? Thanks!

Yes, I was just catching up on the mailing list last night - I read in digest mode, so I’m usually a day behind (two days sometimes when I don’t have time to read them). I think using the the latest FreeBSD stack is probably a good idea also, but I usually keep my 2 cents to myself as I’m in no position to contribute to it :frowning:

I will test DNS again - now that you’re questioning me, I realize I may not have been using it properly.

Unfortunately, the only machine I have with a supported chipset (SiS900) is in use for something else at the moment. I will pull it apart and plop my Haiku HD into it (compiled last night with the latest rev.) I suppose I could use VMWare or QEMU, but that’s sort of a hassle at the moment.

Once I set up the interface using ifconfig, and the gateway using route, what is the proper way to set up the nameservers?

umccullough wrote:
I will test DNS again - now that you're questioning me, I realize I may not have been using it properly.

Once I set up the interface using ifconfig, and the gateway using route, what is the proper way to set up the nameservers?

I’m not sure whether DNS works. I did a few changes, but they are untested. I just saw something like "could not find hostname" on flikr and a later screenshot showed a working connection. Maybe he used the IP directly…

Open /etc/resolv.conf and add an entry for your nameserver. E.g.:
nameserver 192.168.0.1

About VMware: AFAIK we don’t support the emulated networking chipset.

wkornew wrote:
umccullough wrote:
I will test DNS again - now that you're questioning me, I realize I may not have been using it properly.

Once I set up the interface using ifconfig, and the gateway using route, what is the proper way to set up the nameservers?

I’m not sure whether DNS works. I did a few changes, but they are untested. I just saw something like "could not find hostname" on flikr and a later screenshot showed a working connection. Maybe he used the IP directly…

Open /etc/resolv.conf and add an entry for your nameserver. E.g.:
nameserver 192.168.0.1

About VMware: AFAIK we don’t support the emulated networking chipset.

Ok - I do remember editing the resolv.conf at one point - so I’ll try that again and see if it works.

Was it QEMU that uses the RTL8169? I thought one of them was supported…

So, what netcards/chipsets are supported, and what is anticipated for support in the near-term?

Actually, I don’t know which chipsets will be supported. It depends on what will be coded. Everything on BeBits will probably packaged with Haiku…but I don’t know for sure.

wkornew wrote:
Actually, I don't know which chipsets will be supported. It depends on what will be coded. Everything on BeBits will probably packaged with Haiku...but I don't know for sure.
Yes, it's important to know that the current stack, in all its unfinished state should supported all existing ethernet drivers, not only the one Haiku actually provides itself. Until the driver publish a /dev/net/* entry and conform to the usual, limited R5 and former ethernet device "interface", it should works fine.

So if you have a ethernet driver working fine under BeOS that happened to not be supported yet by an open-source Haiku driver, you still could copy by hand the corresponding driver binary file on your Haiku’s volume, under /your_haiku_volume/beos/system/add-ons/kernel/drivers/bin/<driver>, and create the usual symlink in /your_haiku_volume/beos/system/add-ons/kernel/drivers/dev/net/<driver> targeting the binary…
Give it a try, you can’t know.
No?

Wait, I said "should"!

:wink:

phoudoin wrote:
So if you have a ethernet driver working fine under BeOS that happened to not be supported yet by an open-source Haiku driver, you still could copy by hand the corresponding driver binary file on your Haiku's volume, under /your_haiku_volume/beos/system/add-ons/kernel/drivers/bin/<driver>, and create the usual symlink in /your_haiku_volume/beos/system/add-ons/kernel/drivers/dev/net/<driver> targeting the binary... Give it a try, you can't know. No?

Wait, I said "should"!

:wink:

I’m going to try that then with my 3C905 card tonight if I can… that would be a lot easier than moving the HD to my other machine with the SiS900 in it.

Well, I grabbed the ec9xx driver from my BeOS install and put it where it belonged. I also created the symlink.

Upon reboot, it showed up in the /dev/net so I went ahead and configured it:

ifconfig ec9xx0 192.168.254.34 up netmask 255.255.255.0

worked fine…

route add default 192.168.254.254

worked fine…

at that point, I loaded up Net+ and tried to navigate to http://192.168.254.1/ where I have an http server running… but no dice.

I also tried a couple others that I have on my network here… nothing.

Doesn’t look like the interface is working - is there any way I can test this further?

I’m going to try my SiS900 again in a bit.

Hmm, strange. I’m sure that ifconfig should have (indirectly) created a local route for you, so it should actually work.

BTW, did you try to reach a remote network (through default route), too?

Let’s see what your other computer says, but the network driver should (AFAICT) not make any difference. I hope that the new netstack won’t have all these problems, anymore.

wkornew wrote:
Hmm, strange. I'm sure that ifconfig should have (indirectly) created a local route for you, so it should actually work.

BTW, did you try to reach a remote network (through default route), too?

Let’s see what your other computer says, but the network driver should (AFAICT) not make any difference. I hope that the new netstack won’t have all these problems, anymore.

Oddly enough, my other computer wouldn’t boot Haiku for some reason…

It started up and the Haiku bootloader launched. I got the Haiku boot menu, but it wasn’t able to find any partitions… Putting it back in my other machine, it worked fine - so I’ll have to dig into that further before I can test the SiS900

umccullough wrote:
wkornew wrote:
Hmm, strange. I'm sure that ifconfig should have (indirectly) created a local route for you, so it should actually work.

BTW, did you try to reach a remote network (through default route), too?

Let’s see what your other computer says, but the network driver should (AFAICT) not make any difference. I hope that the new netstack won’t have all these problems, anymore.

Oddly enough, my other computer wouldn’t boot Haiku for some reason…

It started up and the Haiku bootloader launched. I got the Haiku boot menu, but it wasn’t able to find any partitions… Putting it back in my other machine, it worked fine - so I’ll have to dig into that further before I can test the SiS900

Once I repartitioned the drive it booted.

So, configuring the sis900 worked fine - but when I used NetPositive to navigate to an internal server using IP addr - it KDL’d with:

PANIC: recursive_lock_lock: called with interrupts disabled for lock 0x9076e020, sem 0x3

once in KDL, I have no clue what to try next… so that’s it…

UPDATE: I used serial debugging to grab the KDL and stack crawl - and created Bug # 349 with attached debug log.

wkornew wrote:
umccullough wrote:
I will test DNS again - now that you're questioning me, I realize I may not have been using it properly.

Once I set up the interface using ifconfig, and the gateway using route, what is the proper way to set up the nameservers?

I’m not sure whether DNS works. I did a few changes, but they are untested. I just saw something like "could not find hostname" on flikr and a later screenshot showed a working connection. Maybe he used the IP directly…

Open /etc/resolv.conf and add an entry for your nameserver. E.g.:
nameserver 192.168.0.1

About VMware: AFAIK we don’t support the emulated networking chipset.

Finally… in case you’re still wondering - I can assure you DNS does work!

I found an rtl8139 card lying around, and finally got Networking going on my real hardware. This means my Haiku test machine has the Radeon working, the SB Live working, and the rtl8139 netcard working! - It’s hard to ask for more! – now i just need stability and better compatibility with R5 software!

I posted a pic of NetPositive browsing OSNews from my Haiku drive:

http://www.flickr.com/photos/82946018@N00

I’ll also post some extra screenshots I took at the same time.

umccullough wrote:
wkornew wrote:
umccullough wrote:
I will test DNS again - now that you're questioning me, I realize I may not have been using it properly.

Once I set up the interface using ifconfig, and the gateway using route, what is the proper way to set up the nameservers?

I’m not sure whether DNS works. I did a few changes, but they are untested. I just saw something like "could not find hostname" on flikr and a later screenshot showed a working connection. Maybe he used the IP directly…

Open /etc/resolv.conf and add an entry for your nameserver. E.g.:
nameserver 192.168.0.1

About VMware: AFAIK we don’t support the emulated networking chipset.

Finally… in case you’re still wondering - I can assure you DNS does work!

I found an rtl8139 card lying around, and finally got Networking going on my real hardware. This means my Haiku test machine has the Radeon working, the SB Live working, and the rtl8139 netcard working! - It’s hard to ask for more! – now i just need stability and better compatibility with R5 software!

I posted a pic of NetPositive browsing OSNews from my Haiku drive:

http://www.flickr.com/photos/82946018@N00

I’ll also post some extra screenshots I took at the same time.

Looks great… but this is the work that’s about to be ditched isn’t it?

Dirty Harry wrote:
Looks great... but this is the work that's about to be ditched isn't it?

Depends… a working netstack is a working netstack right?

I’m sure it won’t be "ditched" until a new functional netstack is ready to replace it anyway.

From the mailing lists - i got the impression that Axel (and maybe a couple more people) were interested in making the current netstack work.

My screenshots are really not based on any new code anyway - I just finally got a netcard installed in my machine that works with Haiku… an rtl8139 card in fact.

hey does anyone know what the vmWare player emulates as for it’s network layer ? just curious …

Sikosis wrote:
hey does anyone know what the vmWare player emulates as for it's network layer ? just curious ...

so far I have determined this:

AMD pcnet32

OR

ipro1000

I’m messing with maybe trying to hack out a pcnet32 driver, but I’m terribly inexperienced in that sort of thing…

The ipro1000 driver doesn’t work on Haiku yet:

http://www.haiku-os.org/bugzilla/show_bug.cgi?id=536