Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport_layer: Splitting UDP and TCP #1508

Merged
merged 1 commit into from
Sep 11, 2014

Conversation

cgundogan
Copy link
Member

Currently, the tcp and udp implementations are bound to each other in a
module called destiny. Thus, when using only one of them then the
other one gets also compiled into the binary and initialized,
which results in unnecessary RAM usage and workload for the CPU.

The approach in this PR defines a common module named socket_base,
which contains functions used by the posix layer. Compiled by it's own,
those functions return negative error codes, to symbolize upper layers
that they are not supported. When also including the modules udp or
tcp respectively, functions from socket_base get overwritten with the
correct functionality.

Defining udp or tcp in a Makefile also includes socket_base.
Defining pnet in a Makefile also includes socket_base.
Defining transport_layer in a Makefile includes udp and tcp.

@cgundogan cgundogan assigned OlegHahm and miri64 and unassigned OlegHahm and miri64 Jul 31, 2014
@OlegHahm OlegHahm added this to the Release NEXT MAJOR milestone Jul 31, 2014
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include
endif
ifneq (,$(filter tcp,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/transport_layer/socket_base
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dislike. Why not put these into sys/net/include, too?

@cgundogan cgundogan force-pushed the transport_layer_refactoring branch 2 times, most recently from 16bde98 to 0a6e72c Compare September 11, 2014 10:35
@cgundogan cgundogan force-pushed the transport_layer_refactoring branch 2 times, most recently from 0916d6f to 5d302df Compare September 11, 2014 12:51
@OlegHahm
Copy link
Member

Does someone understand why Travis fails for qemu on arbitrary applications?

@Kijewski
Copy link
Contributor

Yes, download.riot-os.org is down.

@OlegHahm
Copy link
Member

Ah, thanks. For some reason someone shut down the Jenkins server which hosts also download.riot-os.org. Should be up and running again.

@LudwigKnuepfer
Copy link
Member

Maybe we can host that on ftp.fu-berlin.de instead?

@OlegHahm
Copy link
Member

Broken licenses should be fixed by merging cgundogan#1.

@OlegHahm
Copy link
Member

ACK. Rebase (to remove the merge commit) and go!

Currently, the tcp and udp implementations are bound to each other in a
module called *destiny*. Thus, when using only one of them then the
other one gets also compiled into the binary and initialized,
which results in unnecessary RAM usage and workload for the CPU.

The approach in this PR defines a common module named *socket_base*,
which contains functions used by the posix layer. Compiled by it's own,
those functions return negative error codes, to symbolize upper layers
that they are not supported. When also including the modules *udp* or
*tcp* respectively, functions from *socket_base* get overwritten with the
correct functionality.

Defining *udp* or *tcp* in a Makefile also includes *socket_base*.
Defining *pnet* in a Makefile also includes *socket_base*.
@cgundogan
Copy link
Member Author

I did a rebase/squash. waiting for travis to finish now

@OlegHahm
Copy link
Member

Yay! \o/

OlegHahm added a commit that referenced this pull request Sep 11, 2014
@OlegHahm OlegHahm merged commit 2186350 into RIOT-OS:master Sep 11, 2014
@cgundogan cgundogan deleted the transport_layer_refactoring branch February 2, 2015 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants