DEV Community

spud0
spud0

Posted on

My experience during the Linux Foundation Mentorship

What is the Linux Foundation Mentorship Program ?

The Linux Foundation Mentorship is a program where people who want to learn & contribute to software that is a part the Linux get a chance to. You get paired with a mentor who has a lot of experience and is able to guide you to completing your project. That usually looks like possibly learning some new tools and getting familiar with new libraries. The mentorship consists of many different organizations & projects so there's something for everyone.

What is SONiC ?

SONiC (Software for Open Networking in the Cloud) is an open source NOS (Network Operating System) that is based on Debian Linux. SONiC is typically used on L3 Routers and Switches. SONiC ships with many daemons and programs, but the focus on this post is on teamd and netlink.

What was the problem ?

With many LAG's (Link Aggregation Group) the team daemons that were running on the switch/router wouldn't update the state of team in time. Each daemon having a netlink socket didn't help either. As a brief aside, a LAG can be considered a team/bond. The kernel would write out new messages (netlink) faster than those team daemons could read them. This meant that the team daemons could suffer from port flapping and other issues. Netlink is a type of message that is typically used to report on the status of network device on a system.
Architecture of Original Setup

How did we solve it ?

I developed a proxy server to forward messages from the kernel to userspace more efficiently. Instead of the original setup where each team had a netlink socket, each team daemon would have a Unix Domain Socket. Then the proxy would only have 1 netlink socket, and forwards appropriate messages to appropriate clients (team daemons). To test the setup I wrote a few bash scripts that flapped ports to generate a lot of netlink messages.
Architecture of Solution

Final Thoughts

Looking back, I enjoyed the experience. Meeting with my mentor, learning new topics in Computer Networking & learning a new library was great. I want to continue to contribute to open source tools in the SONiC environment and ultimately keep working on the proxy server in the future.

Resources

containerlab
subinterface
libteam
netlink
link aggregation group
netlink-proxy

Top comments (0)