SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Smartcom’s control plane software,
a customized version of FreeBSD
Boris Astardzhiev
Smartcom-Bulgaria AD, R&D Department
EuroBSDCon 2014, Sofia, Bulgaria
Who are we?
2
● Smartcom-Bulgaria AD
○ Since 1991
○ Approximately 100 employees at present
● 3 main departments
○ Integration
○ Microelectronics
○ Research and development (about 15 people)
How did it start?
3
● In the middle of 2007...
How did it start?
4
● In the middle of 2007...
Our first manageable switch
5
● Smart Switch Pro 800
○ Motorola CPU
○ Based on Realtek
○ 8 x 100MBit/s Ethernet copper ports
○ Managed through GUI via its ports
The second ones
6
● SGSv1
○ Atmel ARMv9 CPU
○ Based on Marvell chipsets
○ 24 or 8 x 100MBit/s Ethernet ports
○ 2 x 1GBit/s Ethernet ports
○ GNU/Linux based
○ Triple-play focused
● Issues
Meanwhile...
7
● New customers’ requirements
○ …Hardware switch/router?
● Marvell gave us a chance
● 2 SoCs
○ Address customers’ requests
○ Redesign SGSv1
○ Identical registers
The new appliances
8
● SGSR
○ Layer 3 distribution switch
● SGSv2
○ Access switch substituting SGSv1
● Designed from the ground up in Smartcom-Bulgaria
SGSR’s hardware
9
● Marvell SoC platform
○ ARMv5 CPU with 1 core
○ 800MHz clockspeed
○ 512MB DRAM
○ 512MB USB flash memory
● Modular hot-swap architecture
○ Up to 24 1GBit/s ports
○ Up to 4 10GBit/s ports
● Layer 2 switching
○ Max MAC addresses per system: 16K
○ Jumbo frames support (9KB)
○ Supported VLANs: 0 - 4094
○ IEEE 802.1AD VLAN stacking (QinQ)
● Layer 3 features
○ Routing table size: 13K
○ ARP table size: 4K
○ ACL based routing
● ACLs
● QoS
○ Ingress/egress rate limiting
○ 8 hardware queues per-port
○ ACL based traffic
classification and QoS
profile assignment
● IP Multicast
● Storm controls
SGSv2’s hardware
10
● Marvell SoC platform
○ ARMv5 CPU with 1 core
○ 800MHz clockspeed
○ 128MB DRAM
○ 512MB flash memory
● Interfaces
○ 24 x 10/100/1000MBit/s SFP/RJ45 ports
○ 4 x 1GBit/s combo SFP/RJ45 ports
● Layer 2 switching
○ Max MAC addresses per system: 16K
○ Jumbo frames support (9KB)
○ Supported VLANs: 0 - 4094
○ VLAN stacking (QinQ)
● QoS
○ 8 hardware queues per-
port
○ Scheduling methods
(egress): strict priority
and WRR
○ 802.1p priority trust and
remap
● ACLs
● Storm controls
● L2 Multicast groups: 1K
The Bonds
11
● TOM (SGSR)
● ROS (SGSv2)
● SAM (CPE)
● Triple-play
oriented
The software choice
12
● Why FreeBSD?
○ It’s free due to the BSD license
○ The Marvell SoCs had support in the 8 branch
○ NETGRAPH
○ The biggest BSD community probably
● NetBSD had support for our chips as well but...
○ No mainline NETGRAPH
● OpenBSD didn’t support our chips
Where do we start from?
13
Initializing the hardware
14
● U-Boot
○ API
○ USB
○ Manage disk’s active slices
● ubldr
○ Connect it to U-Boot’s API
● The FreeBSD loader
○ CRC32 of a file feature was introduced
● Let’s boot the kernel...
The design
15
FreeBSD
kernel
Port
interfaces
(sgs_if_port)sw-0
Hardware
Software
Marvell MAC
DMA
Kernel
space
User
space
CPU
port
HW library
(kobj)
Userland
daemons/tools/facilities
ifconfig
p27...p1p0
socketvarious interfaces
The network stack
16
Port
Lagg
Unit
Bridge
Interface
Router
Subinterface
vlan
family
XOR
1
1..*
1
1
1 1..*
1
1
1
1
1
1..*
1
1
1..*
1
1
1
● Inspired by
NETGRAPH
● ifnet
○ if_input
○ The glues
property
pvid
Port’s
ifnet
structure
Lagg’s
softc
sgs_if_lagg
if_input
lagg_inputif_vlantrunkNULL
Stack optimization on ingress flow
17
CPU if_sw
Interrupt
Fetch a frame
sw_intr_rx(sifp,mbuf)
sgs_if_port
port_input(m
buf)
sgs_if_unit
sgs_if_lagg
pifp->if_vlantrunk != NULL
unit_input(pifp, mbuf)
pifp->sgs_if_lagg != NULL
lagg_input(ifp_port, mbuf)
lifp->if_vlantrunk != NULL
unit_input(lifp, mbuf)
sgs_if_bridge
uifp->sgs_if_bridge != NULL
bridge_input(uifp, mbuf)
sgs_if_iface
sgs_if_subiface
bifp->sgs_if_iface != NULL
iface_input(bifp, mbuf)
iifp->sgs_if_subiface != NULL
subiface_input(iifp, mbuf)
XOR
Egress flow
18
if_start
if_transmit
sgs_if_port
MAC Controller
if_sw
IFQ_HANDOFF
(pifp, mbuf)
ENQUEUE
(pifp->if_start)(pifp) DEQUEUEpifp->if_transmit Send a frame
ether_output()
Frame
The unicast router
19
● Initial tasks in terms of hardware
○ TCAM updates and LPM
○ Insure consistency
● How do we handle it?
○ Intercept traffic in CPU
■ Trigger ARPs
● in_arpinput() hook
○ Routing messages
■ Update network prefixes
■ rt_dispatch() hook
The multicast router
20
● options MROUTING
○ Intercept multicast data traffic in CPU
■ Trigger MFC updates and upcalls
○ Hooks
■ update_mfc_params()
■ expire_mfc()
● TCAM activity
● Userland daemons
○ Handle upcalls
Implementation and useful tools
21
● Kernel facilities
○ BPF
○ callout
○ EVENTHANDLER
○ ioctl
○ kobj
○ locks
○ socket
○ sysctl
○ syscall
○ taskqueue
○ ...
● Userspace facilities
○ awk/sed
○ cron
○ ifconfig
○ regtool
○ route
○ ssh
○ ...
Layer 2 features
● Mainly interfaces’ property related
○ VLAN 802.1q tagging, QinQ
Auto-learning, Link transitions
dampening, Static MACs
● Packet interception oriented
○ LACP
○ RSTP
○ IGMP snooping
■ Process group memberships
○ DHCP snooping
■ Track states
■ Option 82 & ACL assisted security
22
vlan-10
ioctl
igmpd
port-3/1.10
ioctl
ifconfig
HW library
Intercept IGMP
packets
Set
membership
BPF
Layer 3 features
● Mainly packet interception oriented
○ Unicast routing
○ Inter VLAN Multicast routing
○ Policy based routing
○ SNMP
■ Based on bsnmpd
○ PIM-SM
○ BGP
■ Based on openbgpd
○ DHCP relay with ACL assisted security
■ Track states and insert option 82
● Non-packet interception oriented
○ Routing preferences
23
pimd
ip_mroute
HW library
MFC
upcalls
Intercept
PIM, IGMP
and multicast
frames
Set some
options
ip_input
Quality of Service
24
● Rate-limiting
● Storm controls
● 8 queues per egress
● ACL based traffic classification and
QoS profile assignment
● CPU port
○ 8 queues
■ Management traffic
■ Intercepted traffic
The system as whole
25
● How do we upgrade?
○ Modified NanoBSD
■ Redundancy
■ 4 slices
● UFS
● One active rootfs out of two - /
● Config files - /cfg
● Misc - /data
■ Whole image upgrading is slow
The Port Collection
26
● Pretty customized
○ Focused on frequently modified
user space facilities
● Upgrade only parts of the system
○ No or little service disruption
○ Convenient for partial upgrades
CLI
27
● Based on klish
● Hierarchical
● The language
○ Mainly Lua and shell scripts
● Database integration
○ SQLite3
● Commit oriented instead of enter and shoot
● The desired way for configuring the device
Development issues
28
● ARM Debugging
○ Kernel space
○ User space
● Crash inspections
○ Classic dumps to a swap partition
○ NETDUMP
● (Back)traces
● Patches and new stuff from FreeBSD
● Tracking latest version of FreeBSD
Quality assurance
29
● Black box testing
○ Equivalence partitioning
○ Boundary-value analysis
○ Load and stress testing
○ Exploratory testing
○ Interoperability tests
○ System testing in a real topology
● Automation and regression
○ CLI and SNMP
○ TCL/Expect
Future development
30
● IPv6
● VRF
● Stacking
● Make our software as a module
● Optimize code
● Redesign and reimplement
Q&A
Smartcom-Bulgaria AD, BIC IZOT, Office 317, 133 Tzarigradsko Chaussee Blvd.
7th km, 1784 Sofia, BULGARIA, Tel.: +359 2 9650650, Fax: +359 2 9743469
http://www.smartcom.bg/
e-mail: boris_astardzhiev@smartcom.bg
powered by
Thank you! Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

HKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/OHKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/O
Linaro
 

Was ist angesagt? (20)

HKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/OHKG18-110 - net_mdev: Fast path user space I/O
HKG18-110 - net_mdev: Fast path user space I/O
 
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
 
BUD17-214: Bus scaling QoS update
BUD17-214: Bus scaling QoS update BUD17-214: Bus scaling QoS update
BUD17-214: Bus scaling QoS update
 
A Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm BasebandsA Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm Basebands
 
BKK16-203 Irq prediction or how to better estimate idle time
BKK16-203 Irq prediction or how to better estimate idle timeBKK16-203 Irq prediction or how to better estimate idle time
BKK16-203 Irq prediction or how to better estimate idle time
 
PX4 Seminar 02
PX4 Seminar 02PX4 Seminar 02
PX4 Seminar 02
 
OVN DBs HA with scale test
OVN DBs HA with scale testOVN DBs HA with scale test
OVN DBs HA with scale test
 
Network block diagram
Network block diagramNetwork block diagram
Network block diagram
 
BKK16-506 PMWG Farm
BKK16-506 PMWG FarmBKK16-506 PMWG Farm
BKK16-506 PMWG Farm
 
Dpdk accelerated Ostinato
Dpdk accelerated OstinatoDpdk accelerated Ostinato
Dpdk accelerated Ostinato
 
PX4 Setup Workshop
PX4 Setup WorkshopPX4 Setup Workshop
PX4 Setup Workshop
 
LAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVALAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVA
 
Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015
Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015
Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015
 
Qemu net netdev - nic
Qemu   net   netdev - nicQemu   net   netdev - nic
Qemu net netdev - nic
 
Ostinato - Craft Packets, Generate Traffic [SharkFest '20]
Ostinato - Craft Packets, Generate Traffic [SharkFest '20]Ostinato - Craft Packets, Generate Traffic [SharkFest '20]
Ostinato - Craft Packets, Generate Traffic [SharkFest '20]
 
PX4 Seminar 01
PX4 Seminar 01PX4 Seminar 01
PX4 Seminar 01
 
PX4 Seminar 03
PX4 Seminar 03PX4 Seminar 03
PX4 Seminar 03
 
Network for amin
Network for aminNetwork for amin
Network for amin
 
Autonomous Drones Architecture - Initial proposal
Autonomous Drones Architecture - Initial proposalAutonomous Drones Architecture - Initial proposal
Autonomous Drones Architecture - Initial proposal
 
2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg 2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg
 

Andere mochten auch

S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...
S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...
S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...
virtual-campus
 
Introduction To Transoft
Introduction To TransoftIntroduction To Transoft
Introduction To Transoft
Gian Zandonà
 
Guia de seguridad pymes
Guia de seguridad pymesGuia de seguridad pymes
Guia de seguridad pymes
Eva Delgado
 
El movimiento mod en los años 60
El movimiento mod en los años 60El movimiento mod en los años 60
El movimiento mod en los años 60
alexia82
 
MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)
MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)
MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)
mian najeebullah
 
Depresión abordaje terapias alternativas
Depresión abordaje terapias alternativasDepresión abordaje terapias alternativas
Depresión abordaje terapias alternativas
Xavier Robinat
 

Andere mochten auch (20)

Kwizda Vario Technológiák 2016
Kwizda Vario Technológiák 2016 Kwizda Vario Technológiák 2016
Kwizda Vario Technológiák 2016
 
ITIL FOUNDATION V.3
ITIL FOUNDATION V.3ITIL FOUNDATION V.3
ITIL FOUNDATION V.3
 
The pipe organ
The pipe organThe pipe organ
The pipe organ
 
School Leaver Forum - All About School Leavers : The power of schools careers...
School Leaver Forum - All About School Leavers : The power of schools careers...School Leaver Forum - All About School Leavers : The power of schools careers...
School Leaver Forum - All About School Leavers : The power of schools careers...
 
S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...
S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...
S-CUBE LP: Business Transaction Modeling, Analysis, and Customization Across ...
 
Home, Garden and Lifestyle Show Program 2015
Home, Garden and Lifestyle Show Program 2015Home, Garden and Lifestyle Show Program 2015
Home, Garden and Lifestyle Show Program 2015
 
Registro y perfil moodle
Registro y perfil moodleRegistro y perfil moodle
Registro y perfil moodle
 
Introduction To Transoft
Introduction To TransoftIntroduction To Transoft
Introduction To Transoft
 
COMPUTER EXPLORERS Overview
COMPUTER EXPLORERS OverviewCOMPUTER EXPLORERS Overview
COMPUTER EXPLORERS Overview
 
Instalaciones
InstalacionesInstalaciones
Instalaciones
 
Soundoff june 6, 2013
Soundoff june 6, 2013Soundoff june 6, 2013
Soundoff june 6, 2013
 
Guia de seguridad pymes
Guia de seguridad pymesGuia de seguridad pymes
Guia de seguridad pymes
 
Meddelelser 31 1988
Meddelelser 31 1988Meddelelser 31 1988
Meddelelser 31 1988
 
An introduction to the basics of Early-Stage-VC
An introduction to the basics of Early-Stage-VCAn introduction to the basics of Early-Stage-VC
An introduction to the basics of Early-Stage-VC
 
El movimiento mod en los años 60
El movimiento mod en los años 60El movimiento mod en los años 60
El movimiento mod en los años 60
 
Modelos de motocicletas harley davidson 2015
Modelos de motocicletas harley davidson 2015Modelos de motocicletas harley davidson 2015
Modelos de motocicletas harley davidson 2015
 
MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)
MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)
MIAN NAJEEB Ullah 5 year & 5 five month experiece (CV)
 
INFARTO DE CORAZON
INFARTO DE CORAZONINFARTO DE CORAZON
INFARTO DE CORAZON
 
Depresión abordaje terapias alternativas
Depresión abordaje terapias alternativasDepresión abordaje terapias alternativas
Depresión abordaje terapias alternativas
 
Herramienta Asociaciones Inmobiliarias
Herramienta Asociaciones InmobiliariasHerramienta Asociaciones Inmobiliarias
Herramienta Asociaciones Inmobiliarias
 

Ähnlich wie Smartcom's control plane software, a customized version of FreeBSD by Boris Astardzhiev

Ähnlich wie Smartcom's control plane software, a customized version of FreeBSD by Boris Astardzhiev (20)

Demystifying Datacenter Clos
Demystifying Datacenter ClosDemystifying Datacenter Clos
Demystifying Datacenter Clos
 
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device driversBsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
 
Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network Interfaces
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Go
 
Brkdct 3101
Brkdct 3101Brkdct 3101
Brkdct 3101
 
Building your own CGN boxes with Linux
Building your own CGN boxes with LinuxBuilding your own CGN boxes with Linux
Building your own CGN boxes with Linux
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
cisco-n3k-c3172tq-10gt-datasheet.pdf
cisco-n3k-c3172tq-10gt-datasheet.pdfcisco-n3k-c3172tq-10gt-datasheet.pdf
cisco-n3k-c3172tq-10gt-datasheet.pdf
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
 
Naked BGP
Naked BGPNaked BGP
Naked BGP
 
SoC Idling for unconf COSCUP 2016
SoC Idling for unconf COSCUP 2016SoC Idling for unconf COSCUP 2016
SoC Idling for unconf COSCUP 2016
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
 
Skydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integrationSkydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integration
 
TMS320C5x
TMS320C5xTMS320C5x
TMS320C5x
 
cisco-n9k-c92160yc-x-datasheet.pdf
cisco-n9k-c92160yc-x-datasheet.pdfcisco-n9k-c92160yc-x-datasheet.pdf
cisco-n9k-c92160yc-x-datasheet.pdf
 
Multipath TCP Upstreaming
Multipath TCP UpstreamingMultipath TCP Upstreaming
Multipath TCP Upstreaming
 
Kubernetes from scratch at veepee sysadmins days 2019
Kubernetes from scratch at veepee   sysadmins days 2019Kubernetes from scratch at veepee   sysadmins days 2019
Kubernetes from scratch at veepee sysadmins days 2019
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation GuideBKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
 

Mehr von eurobsdcon

OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
eurobsdcon
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
eurobsdcon
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsons
eurobsdcon
 

Mehr von eurobsdcon (20)

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Front
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Friday
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcome
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talk
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanov
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenther
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Maste
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsons
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussin
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Bruno
 
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul IroftiMaking OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
 
Using routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter HesslerUsing routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter Hessler
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Smartcom's control plane software, a customized version of FreeBSD by Boris Astardzhiev

  • 1. Smartcom’s control plane software, a customized version of FreeBSD Boris Astardzhiev Smartcom-Bulgaria AD, R&D Department EuroBSDCon 2014, Sofia, Bulgaria
  • 2. Who are we? 2 ● Smartcom-Bulgaria AD ○ Since 1991 ○ Approximately 100 employees at present ● 3 main departments ○ Integration ○ Microelectronics ○ Research and development (about 15 people)
  • 3. How did it start? 3 ● In the middle of 2007...
  • 4. How did it start? 4 ● In the middle of 2007...
  • 5. Our first manageable switch 5 ● Smart Switch Pro 800 ○ Motorola CPU ○ Based on Realtek ○ 8 x 100MBit/s Ethernet copper ports ○ Managed through GUI via its ports
  • 6. The second ones 6 ● SGSv1 ○ Atmel ARMv9 CPU ○ Based on Marvell chipsets ○ 24 or 8 x 100MBit/s Ethernet ports ○ 2 x 1GBit/s Ethernet ports ○ GNU/Linux based ○ Triple-play focused ● Issues
  • 7. Meanwhile... 7 ● New customers’ requirements ○ …Hardware switch/router? ● Marvell gave us a chance ● 2 SoCs ○ Address customers’ requests ○ Redesign SGSv1 ○ Identical registers
  • 8. The new appliances 8 ● SGSR ○ Layer 3 distribution switch ● SGSv2 ○ Access switch substituting SGSv1 ● Designed from the ground up in Smartcom-Bulgaria
  • 9. SGSR’s hardware 9 ● Marvell SoC platform ○ ARMv5 CPU with 1 core ○ 800MHz clockspeed ○ 512MB DRAM ○ 512MB USB flash memory ● Modular hot-swap architecture ○ Up to 24 1GBit/s ports ○ Up to 4 10GBit/s ports ● Layer 2 switching ○ Max MAC addresses per system: 16K ○ Jumbo frames support (9KB) ○ Supported VLANs: 0 - 4094 ○ IEEE 802.1AD VLAN stacking (QinQ) ● Layer 3 features ○ Routing table size: 13K ○ ARP table size: 4K ○ ACL based routing ● ACLs ● QoS ○ Ingress/egress rate limiting ○ 8 hardware queues per-port ○ ACL based traffic classification and QoS profile assignment ● IP Multicast ● Storm controls
  • 10. SGSv2’s hardware 10 ● Marvell SoC platform ○ ARMv5 CPU with 1 core ○ 800MHz clockspeed ○ 128MB DRAM ○ 512MB flash memory ● Interfaces ○ 24 x 10/100/1000MBit/s SFP/RJ45 ports ○ 4 x 1GBit/s combo SFP/RJ45 ports ● Layer 2 switching ○ Max MAC addresses per system: 16K ○ Jumbo frames support (9KB) ○ Supported VLANs: 0 - 4094 ○ VLAN stacking (QinQ) ● QoS ○ 8 hardware queues per- port ○ Scheduling methods (egress): strict priority and WRR ○ 802.1p priority trust and remap ● ACLs ● Storm controls ● L2 Multicast groups: 1K
  • 11. The Bonds 11 ● TOM (SGSR) ● ROS (SGSv2) ● SAM (CPE) ● Triple-play oriented
  • 12. The software choice 12 ● Why FreeBSD? ○ It’s free due to the BSD license ○ The Marvell SoCs had support in the 8 branch ○ NETGRAPH ○ The biggest BSD community probably ● NetBSD had support for our chips as well but... ○ No mainline NETGRAPH ● OpenBSD didn’t support our chips
  • 13. Where do we start from? 13
  • 14. Initializing the hardware 14 ● U-Boot ○ API ○ USB ○ Manage disk’s active slices ● ubldr ○ Connect it to U-Boot’s API ● The FreeBSD loader ○ CRC32 of a file feature was introduced ● Let’s boot the kernel...
  • 15. The design 15 FreeBSD kernel Port interfaces (sgs_if_port)sw-0 Hardware Software Marvell MAC DMA Kernel space User space CPU port HW library (kobj) Userland daemons/tools/facilities ifconfig p27...p1p0 socketvarious interfaces
  • 16. The network stack 16 Port Lagg Unit Bridge Interface Router Subinterface vlan family XOR 1 1..* 1 1 1 1..* 1 1 1 1 1 1..* 1 1 1..* 1 1 1 ● Inspired by NETGRAPH ● ifnet ○ if_input ○ The glues property pvid Port’s ifnet structure Lagg’s softc sgs_if_lagg if_input lagg_inputif_vlantrunkNULL
  • 17. Stack optimization on ingress flow 17 CPU if_sw Interrupt Fetch a frame sw_intr_rx(sifp,mbuf) sgs_if_port port_input(m buf) sgs_if_unit sgs_if_lagg pifp->if_vlantrunk != NULL unit_input(pifp, mbuf) pifp->sgs_if_lagg != NULL lagg_input(ifp_port, mbuf) lifp->if_vlantrunk != NULL unit_input(lifp, mbuf) sgs_if_bridge uifp->sgs_if_bridge != NULL bridge_input(uifp, mbuf) sgs_if_iface sgs_if_subiface bifp->sgs_if_iface != NULL iface_input(bifp, mbuf) iifp->sgs_if_subiface != NULL subiface_input(iifp, mbuf) XOR
  • 18. Egress flow 18 if_start if_transmit sgs_if_port MAC Controller if_sw IFQ_HANDOFF (pifp, mbuf) ENQUEUE (pifp->if_start)(pifp) DEQUEUEpifp->if_transmit Send a frame ether_output() Frame
  • 19. The unicast router 19 ● Initial tasks in terms of hardware ○ TCAM updates and LPM ○ Insure consistency ● How do we handle it? ○ Intercept traffic in CPU ■ Trigger ARPs ● in_arpinput() hook ○ Routing messages ■ Update network prefixes ■ rt_dispatch() hook
  • 20. The multicast router 20 ● options MROUTING ○ Intercept multicast data traffic in CPU ■ Trigger MFC updates and upcalls ○ Hooks ■ update_mfc_params() ■ expire_mfc() ● TCAM activity ● Userland daemons ○ Handle upcalls
  • 21. Implementation and useful tools 21 ● Kernel facilities ○ BPF ○ callout ○ EVENTHANDLER ○ ioctl ○ kobj ○ locks ○ socket ○ sysctl ○ syscall ○ taskqueue ○ ... ● Userspace facilities ○ awk/sed ○ cron ○ ifconfig ○ regtool ○ route ○ ssh ○ ...
  • 22. Layer 2 features ● Mainly interfaces’ property related ○ VLAN 802.1q tagging, QinQ Auto-learning, Link transitions dampening, Static MACs ● Packet interception oriented ○ LACP ○ RSTP ○ IGMP snooping ■ Process group memberships ○ DHCP snooping ■ Track states ■ Option 82 & ACL assisted security 22 vlan-10 ioctl igmpd port-3/1.10 ioctl ifconfig HW library Intercept IGMP packets Set membership BPF
  • 23. Layer 3 features ● Mainly packet interception oriented ○ Unicast routing ○ Inter VLAN Multicast routing ○ Policy based routing ○ SNMP ■ Based on bsnmpd ○ PIM-SM ○ BGP ■ Based on openbgpd ○ DHCP relay with ACL assisted security ■ Track states and insert option 82 ● Non-packet interception oriented ○ Routing preferences 23 pimd ip_mroute HW library MFC upcalls Intercept PIM, IGMP and multicast frames Set some options ip_input
  • 24. Quality of Service 24 ● Rate-limiting ● Storm controls ● 8 queues per egress ● ACL based traffic classification and QoS profile assignment ● CPU port ○ 8 queues ■ Management traffic ■ Intercepted traffic
  • 25. The system as whole 25 ● How do we upgrade? ○ Modified NanoBSD ■ Redundancy ■ 4 slices ● UFS ● One active rootfs out of two - / ● Config files - /cfg ● Misc - /data ■ Whole image upgrading is slow
  • 26. The Port Collection 26 ● Pretty customized ○ Focused on frequently modified user space facilities ● Upgrade only parts of the system ○ No or little service disruption ○ Convenient for partial upgrades
  • 27. CLI 27 ● Based on klish ● Hierarchical ● The language ○ Mainly Lua and shell scripts ● Database integration ○ SQLite3 ● Commit oriented instead of enter and shoot ● The desired way for configuring the device
  • 28. Development issues 28 ● ARM Debugging ○ Kernel space ○ User space ● Crash inspections ○ Classic dumps to a swap partition ○ NETDUMP ● (Back)traces ● Patches and new stuff from FreeBSD ● Tracking latest version of FreeBSD
  • 29. Quality assurance 29 ● Black box testing ○ Equivalence partitioning ○ Boundary-value analysis ○ Load and stress testing ○ Exploratory testing ○ Interoperability tests ○ System testing in a real topology ● Automation and regression ○ CLI and SNMP ○ TCL/Expect
  • 30. Future development 30 ● IPv6 ● VRF ● Stacking ● Make our software as a module ● Optimize code ● Redesign and reimplement
  • 31. Q&A Smartcom-Bulgaria AD, BIC IZOT, Office 317, 133 Tzarigradsko Chaussee Blvd. 7th km, 1784 Sofia, BULGARIA, Tel.: +359 2 9650650, Fax: +359 2 9743469 http://www.smartcom.bg/ e-mail: boris_astardzhiev@smartcom.bg powered by Thank you! Questions?