web-content/content/blogs/network-development-branch.html
Victor Perevertkin 45d33cf1ba
Make /node/* aliases absolute instead of relative
That way they really work as on our old website,
otherwise it was reactos.org/project-news/node/295
and not reactos.org/node/295
2020-03-22 04:52:10 +03:00

16 lines
3.3 KiB
HTML

---
title: "Network development branch"
author: "Z98"
date: 2014-11-17
aliases: [ "/node/918" ]
---
<div>
<p>People following the SVN logs may have noticed Jerome Gardou creating a network rework branch and ripping out massive chunks of the current code. To explain what prompted this requires a bit of history and background. Many years ago Cameron Gutman imported the lightweight IP (lwIP) library so that ReactOS could take advantage of its TCP implementation for the network stack. It was only used for TCP however, meaning ReactOS was still relying on its existing implementation for things like UDP and ICMP. Cameron's rationale for this was that the existing implementations were good enough and he did not want to risk significant code churn at the time. Also, lwIP at the time required operations to be single-threaded so performance was an issue. As a consequence Cameron built a level of abstraction between lwIP and ReactOS' IP library, which resulted in TCP using a different method of interacting with network cards than the other protocols.</p>
<p>As part of his work getting Chrome to run on ReactOS, Jerome has been diving into the network stack to fix various issues and implement missing functionality. One piece of missing functionality was the TCP_NODELAY flag, which basically indicates to the IP stack that it should not wait attempt to coalesce small packets into larger ones. Coalescing is intended to improve throughput at the expense of latency. In ReactOS the option was not supported, though lwIP had it and so theoretically it was simply a matter of passing it down. This required Jerome figure out how ReactOS' TCP driver was bound to the IP library and then how the IP library was bound to lwIP. It was in figuring out the latter case that Jerome found the abstraction Cameron added, an abstraction that ended up causing major complications. The problem was that Jerome would literally need to implement support at four different layers of abstraction to get the desired functionality. With that many potential points of failure there was bound to be bugs and his initial attempt resulted in a kernel crash with Firefox.</p>
<p>Faced with this, Jerome decided that the most sane option at this point was to just turn lwIP into the ReactOS IP library and use it for everything instead of trying to cherrypick. Factor in lwIP's support for protocols that ReactOS has yet to implement and the decision was pretty straightforward. Since Cameron's initial work lwIP has also improved significantly, including adding in support for multi-threaded operations, though Jerome is deferring usage of that functionality in the short term. The revised architecture thus means that all of ReactOS' protocols just directly talk to lwIP with the only layer of abstraction being between lwIP and the actual network cards. This unifies a great deal of functionality and so will make the network stack more consistent, functional, and hopefully more stable. And since the project will be relying on lwIP for support of the protocols, that is another piece of complexity that has now been effectively farmed out to a third party that can actually focus on it, letting the developers work on other core components.</p>
<p>Discussion: https://www.reactos.org/forum/viewtopic.php?f=2&amp;t=13778</p>
</div>
<p>&nbsp;</p>