SlideShare a Scribd company logo
1 of 33
Download to read offline
㈜유미테크
DPDK
(Data Plane Development Kit)
Intel Architecture 기반 패킷 처리
최적화 시스템 소프트웨어
㈜유미테크2㈜유미테크 DPDK
1. DPDK란?
2. Environmennt Abstraction Layer
3. Ethernet Poll Mode Driver Architecture
4. 주요 라이브러리
5. DPDK 개발 환경
6. 네트워크 카드 Driver Setting
7. Compiling a Sample Application
8. 테스트 환경 구성
9. DPDK 응용 기본 흐름도
10.향후 계획
개요
㈜유미테크3㈜유미테크 DPDK
1. DPDK란?
㈜유미테크4㈜유미테크 DPDK
 DPDK : Data plane Development Kit
- Intel Architecture 기반 패킷 처리 최적화 시스템 소프트웨어
- 패킷 처리 속도 최적화 프레임 워크 지원
- 어플리케이션 개발자는 로직 개발에 충실
 x86 플랫폼에 고속 패킷 처리를 위한 라이브러리와 드라이버의 집합
- 리눅스 사용자 공간 IO 동작
- 프로파일에 필요한 모든 원소를 제공
- 고성능 패킷 처리 애플리케이션 작성
 DPDK Libraries and Drivers
- Memory Manager : object pools, huge page memory, object ring, alignment
- Buffer Manager : pre-allocates fixed size buffers
- Queue Manager : safe lockless queues, no spinlocks, avoiding wait times
- Poll Mode Drivers : no asynchronous, interrupt-based signaling mechanisms
- Flow Classification : a hash based on tuple information
1.1 DPDK란?
㈜유미테크5㈜유미테크 DPDK
 DPDK 장점
- 고성능 패킷 처리
- 고가의 장비를 사용 하지 않아도 된다.
- CPU가 지장 받지 않고 작업을 수행 할 수 있다.
 DPDK 단점
- DPDK를 사용하기 위한 랜카드 종류가 한정되어 있다. (2014. 06 현재)
• e1000 (82540, 82545, 82546)
• e1000e (82571..82574, 82583, ich8..ich10, pch..pch2)
• igb (82575..82576, 82580, i210, i211, i350, i354, dh89xxcc)
• ixgbe (82598..82599, x540)
• i40e (xl710)
1.2 DPDK 장점과 단점
㈜유미테크6㈜유미테크 DPDK
 활용 사례
- 윈드리버 : 실시간 가상화 소프트 웨어
• 네트워크 기능 가상화, NFV 및 클라우드 환경을 위한 윈드리버 OVP 개발
• 고속 네트워크 환경 및 물리적 디바이스에 필적하는 고성능 제공
• 네트워크 구간의 어디에서든 유연하게 운용 가능, TOC 절감
• 서비스 제공사의 네트워크 활용도 향상, 서비스 적용시간 단축
- 6WIND : 6WINDGate 소프트 웨어
• 모바일 인프라 스트럭쳐와 네트워킹 제품의 개발
1.3 DPDK 활용 사례
㈜유미테크7㈜유미테크 DPDK
1.4 Core Components
㈜유미테크8㈜유미테크 DPDK
 Core Components Architecture
- rte_timer : Timer 기능. EAL에서 제공되는 타이머 인터페이스 기반으로 DPDK 실행 단위로 타
이머 서비스를 제공
- rte_malloc : hugepages에 메모리 할당
- rte_mempool : 메모리에 있는 개체의 풀을 할당
- rte_eal + libc : 응용 프로그램 로딩, 메모리 할당. 시간 인터페이스, PCI 접근 및 로딩 지원
- rte_mbuf : IP 트래픽 및 메시지 데이터 패킷의 버퍼를 지원
- rte_ring : 크기가 고정 된 개체를 저장하거나 코어 사이의 통신을 허용하는 FIFO를 고정
1.4 Core Components
㈜유미테크9㈜유미테크 DPDK
2. Environment Abstraction Layer
㈜유미테크10㈜유미테크 DPDK
 하드웨어 및 메모리 공간과 같은 낮은 수준의 리소스를 엑세스 한다.
 EAL은 응용 프로그램 및 라이브러리에서 환경 특성을 숨기는 일반적인 인터페이스를 제공
 자원을 할당하는 방법을 결정하는 초기화 루틴을 책임진다.
 EAL – 어플리케이션과 라이브러리로부터 인터페이스에 대한 서비스를 제공
- Intel DPDK loading and launching
- Support for multi-process and multi-thread execution types
- Core affinity / assignment procedures
- System memory allocation / de-allocation
- Atomic / lock operations
- Time reference
- PCI bus access
- Trace and debug functions
- CPU feature identification
- Interrupt handling
- alarm operations
2.1 Environment Abstraction Layer
㈜유미테크11㈜유미테크 DPDK
 The EAL options are as follows
2.2 The EAL options are as follows
$ example –c 0x5 –n 4 …
0 1 0 1
0123
㈜유미테크12㈜유미테크 DPDK
3. Ethernet Poll Mode Driver
Architecture
㈜유미테크13㈜유미테크 DPDK
 1Gbe and 10Gbe 이더넷을 폴링 모드 드라이버를 포함하며 비동기 없이 작동하도록 설계 이더
넷 컨트롤러, 신호 전달 메커니즘을 기반으로한 인터럽트
 장치를 구성, 사용자 공간에서 BSD 드라이버 실행을 통해 API를 제공하고 각각의 큐를 구성
 PMD는 수신 프로세스 및 사용자의 어플리세이션에서 패킷을 임의의 인터럽트 없이 신속하게
전달하는 직접적인 디스크립터
3. Ethernet Poll Mode Driver Architecture
㈜유미테크14㈜유미테크 DPDK
4. 주요 라이브러리
㈜유미테크15㈜유미테크 DPDK
 Packet Forwarding Algorithm Suport
- 패킷 포워딩 알고리즘을 지원하는 라이브러리
 librte_net
- IP 프로토콜을 정의하고 편리한 매크로를 가지고 있다.
 Ring Library
- Ring Lib는 큐를 관리 할수 있다.
- 무한한 크기의 연결 리스트를 갖는다.
- rte_ring의 속성
• FIFO
• 최대 크기는 고정되고 포인터는 테이블에 저장된다.
• Lockless implementation
• Multi-consumer, single-consumer는 대기열에서 제외된다.
• Multi-producer, single-producer는 대기열에 포함된다.
• Bulk dequeue – 성공하면 지정된 개체 수를 뺀다. 그렇지 않으면 실패
• Bulk enqueue – 성공하면 지정된 개체수를 큐에 넣는다. 그렇지 않으면 실패
• Burst dequeue – 지정된 수를 충족 할 수 없는 경우 최대 사용 가능한 개체 큐에서 제거된다.
• Burst enqueue – 지정된 개체수가 성취 될 수 없는 경우에 최대 개체를 저장한다
4. 주요 라이브러리
㈜유미테크16㈜유미테크 DPDK
5. DPDK 개발 환경
㈜유미테크17㈜유미테크 DPDK
 DPDK 지원
- Kernel version : 2.6.33 이상 (개발 서버 버전: 3.13.0)
- glibc : 2.7 이상
 테스트 환경 (Ubuntu 12.10)
- ixbge 모듈 기본 탑재 (인텔 10G 네트워크 드라이버)
 커널 환경 설정 (hugepages)
- hugepages = 1024
- default_hugepagesz=1G hugepagesz=1G hugepages=4
- echo 2048 > /sys/kernel/mm/hugepages/hugepages-2048KB/nr_hugepages
- echo 2048 > /sys/devices/system/node/node0hugepages/hugepages-
2048KB/nr_hugepages
- mkdir /mnt/huge && mount –t hugetlbfs nodev /mnt/huge
5.1 DPDK 개발 환경
㈜유미테크18㈜유미테크 DPDK
 Compilation of the Intel DPDK
- Required Tools
• GNU make
• coreutils : cmp, sed, grep, arch
• gcc(version 4.5.x 이상)
• libc headers(glibc-devel.i686 / libc6-dev-i386; glibc-devel.x86_64)
• Linux kernel headers or sources required to build kernel modules
• Additional packages required for 32-bit compilation on 64-bit systems are:
glibc.i686, libgcc.i686, libstdc++.i686 and glibc-devel.i686
• Python(version 2.6 or 2.7)
- Optional Tools
• C++ Compiler(icc)
• libpcap headers and libraries to compile and use the libpcap-based poll-mode driver
This driver is disabled by default and can be enabled by setting
CONFIG_RTE_LIBRTE_PMD_PCAP=Y in the build time config file
5.1 DPDK 개발 환경
㈜유미테크19㈜유미테크 DPDK
 DPDK source directory
$ unzip DPDK-<version>.zip
$ cd DPDK-<version>
 DPDK is composed of several directories :
- lib : Source code of Intel DPDK libraries
- app : Source code of Intel DPDK applications
- examples : Source code of Intel DPDK application examples
 To install and make targets
$ make install T=x86_64-default-linuxapp-gcc
 To prepare a target without building it
$ make config T=x86_64-default-linuxapp-gcc
5.2 DPDK 빌드
㈜유미테크20㈜유미테크 DPDK
6. 네트워크 카드 Driver Setting
㈜유미테크21㈜유미테크 DPDK
 네트워크 카드 설정
- Kernel
6.1 Kernel Driver 모드 Setting
• IP 설정
- 경로 : /etc/network/interfaces
- 설정 내용
- 인터페이스 재시작
$ /etc/init.d/networking restart
- 인터페이스 활성화
$ ifconfig <interface name> up
- 인터페이스 비활성화
$ ifconfig <interface name> down
auto <interface name>
iface <interface name> inet static
Address <ip>
Netmask <netmask>
Network <network>
Broadcast <broadcast>
Gateway <gateway>
Dns-nameservers <dns-nameservers>
Dns-search <dns-search>
• 라우팅 설정
- 특정 IP에서 오는 패킷을 특정 인터페이스로 수신
$ route add –net <ip> netmask <netmask> dev <interface name>
- 설정된 라우팅 테이블 삭제
$ route net –net <ip> netmask <netmask> dev <interface name>
- 리눅스 재시작 시 라우팅 테이블 설정
- 경로 : /etc/network/interface
Up route add –net <ip> netmask <netmask> dev <interface name>
㈜유미테크22㈜유미테크 DPDK
 네트워크 카드 설정
- Loading the Intel DPDK igb_uio Module
$ cd <DPDK>/x86_64-default-linuxapp-gcc
$ sudo modprobe uio
$ sudo insmod kmod/igb_uio.ko
- Binding and Unbinding Network Ports to / from the igb_uio Module
$ ./tools/pci_unbinnd.py – status
6.2 UIO Driver 모드 Setting
㈜유미테크23㈜유미테크 DPDK
 네트워크 카드 설정
- To bind device eth2, 0000:0a:00.0, to the igb_uio driver :
$ ./tools/pci_unbind.py – bind=igb_uio 0a:00.0 or ./tools/pci_unbind.py – bind=igb_uio eth2
$ ./tools/pci_unbind.py – bind=igb_uio 0a:00.1 or ./tools/pci_unbind.py – bind=igb_uio eth3
• Routing table indicates that interface 0000:0a:00.1 is active. Not modifying 메시지
발생 시 설정 하려는 인터페이스를 사용하지 않는 상태로 변경 후 다시 위 의 명령어를
실행
6.2 UIO Driver 모드 Setting
㈜유미테크24㈜유미테크 DPDK
7. Compiling a Sample Application
㈜유미테크25㈜유미테크 DPDK
 When compiling an application in the Linux* environment on the Intel DPDK, the following
variables must be exported :
- RTE_SDK – Points to the Intel DPDK installation directory
$ export RTE_SDK=/home/ymtech/dpdk/DPDK-1.6.0
- RTE_TARGET – Points to the Intel DPDK target environment directory
$ export RTE_TARGET=x86_64-default-linuxapp-gcc
 Sample – helloworld
- helloworld 위치로 이동
7. Compiling a Sample Application
㈜유미테크26㈜유미테크 DPDK
 Sample – helloworld
$ ls
$ cd build && ls -al
7. Compiling a Sample Application
㈜유미테크27㈜유미테크 DPDK
 Sample – helloworld
$ sudo ./helloworld –c f –n 4
- 메모리가 동적 할당 됨.
7. Compiling a Sample Application
㈜유미테크28㈜유미테크 DPDK
8. 테스트 환경 구성
㈜유미테크29㈜유미테크 DPDK
 테스트 환경 및 실행
8. 테스트 환경 구성
DPDK 수집 패킷 전송
10 G
10 G
10 G
10 G
Recv Send
Recv Send
㈜유미테크30㈜유미테크 DPDK
9. DPDK 응용 기본 흐름도
㈜유미테크31㈜유미테크 DPDK
9. DPDK 응용 기본 흐름도
시작
(main)
EAL 초기화
(rte_eal_inet)
종료
메모리 할당
(rte_mempool_cre
ate)
드라이버 초기화
(rte_pmd_init_all)
등록된 PCI Driver
확인
(rte_eal_pci_probe)
드라이버가 초기화
된 이더넷 장치의 수
(rte_eth_dev_count )
이더넷 장치의 상황
에 맞는 정보 검색
(rte_eth_dev_info_
get)
이더넷 장치를 구성
(rte_eth_dev_confi
gure)
이더넷 장치의 주소
를 검색
(rte_eth_macaddr_
get)
이더넷 장치에 대한
수신 큐를 할당
(rte_eth_rx_queue_
setup)
이더넷 장치 시작
(rrte_eth_dev_start)
모든 lcores 함수를
실행
(rte_eal_mp_remot
e_launch)
패킷이 수신되면 그
에 대한 포인터를
rte_mbuf 구조에 저
장(rte_eth_rx_burst)
수신된 패킷의 수
확인
수신된 패킷의 메
모리 해제
(rte_pktmbuf_free)
While
1초 주기로 수신
된 패킷 확인
㈜유미테크32㈜유미테크 DPDK
10. 향후 계획
㈜유미테크33㈜유미테크 DPDK
 CentOS에 DPDK 개발 환경 셋팅 및 테스트
 멀티코드 응용 작성 방법 기술 조사
 DNS 패킷 분석 및 Mirroring 모듈과 연결
10. 향후 계획

More Related Content

What's hot

eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceSUSE Labs Taipei
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDPlcplcp1
 
Faster packet processing in Linux: XDP
Faster packet processing in Linux: XDPFaster packet processing in Linux: XDP
Faster packet processing in Linux: XDPDaniel T. Lee
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringScyllaDB
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Cheng-Chun William Tu
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Valeriy Kravchuk
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 
eBPF Perf Tools 2019
eBPF Perf Tools 2019eBPF Perf Tools 2019
eBPF Perf Tools 2019Brendan Gregg
 

What's hot (20)

Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
eBPF Basics
eBPF BasicseBPF Basics
eBPF Basics
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Programming
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
 
Faster packet processing in Linux: XDP
Faster packet processing in Linux: XDPFaster packet processing in Linux: XDP
Faster packet processing in Linux: XDP
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
eBPF Perf Tools 2019
eBPF Perf Tools 2019eBPF Perf Tools 2019
eBPF Perf Tools 2019
 

Viewers also liked

[1A6]Docker로 보는 서버 운영의 미래
[1A6]Docker로 보는 서버 운영의 미래[1A6]Docker로 보는 서버 운영의 미래
[1A6]Docker로 보는 서버 운영의 미래NAVER D2
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)micchie
 
Understanding DPDK algorithmics
Understanding DPDK algorithmicsUnderstanding DPDK algorithmics
Understanding DPDK algorithmicsDenys Haryachyy
 
Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitchSim Janghoon
 
Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조Seung-Hoon Baek
 
Netmap presentation
Netmap presentationNetmap presentation
Netmap presentationAmir Razmjou
 
In-memory Caching: Curb Tail Latency with Pelikan
In-memory Caching: Curb Tail Latency with PelikanIn-memory Caching: Curb Tail Latency with Pelikan
In-memory Caching: Curb Tail Latency with PelikanC4Media
 
DPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al SandersDPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al SandersJim St. Leger
 
[234] toast cloud open stack sdn 전략-박성우
[234] toast cloud open stack sdn 전략-박성우[234] toast cloud open stack sdn 전략-박성우
[234] toast cloud open stack sdn 전략-박성우NAVER D2
 
Java Script 2 Part.1
Java Script 2 Part.1Java Script 2 Part.1
Java Script 2 Part.1vicki0x
 
C수업자료
C수업자료C수업자료
C수업자료koominsu
 
[C언어] 반복문_for문
[C언어] 반복문_for문[C언어] 반복문_for문
[C언어] 반복문_for문jusingame
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
ONOS (Open Network Operating System) Blackbird Release 분석
ONOS (Open Network Operating System)  Blackbird Release 분석ONOS (Open Network Operating System)  Blackbird Release 분석
ONOS (Open Network Operating System) Blackbird Release 분석rootfs32
 
ONF Atrium 분석
ONF Atrium 분석ONF Atrium 분석
ONF Atrium 분석jungbh
 
리눅스 스터디 1회차
리눅스 스터디 1회차리눅스 스터디 1회차
리눅스 스터디 1회차준혁 이
 
오픈스택 커뮤니티 하반기 스터디: 안내
오픈스택 커뮤니티 하반기 스터디: 안내오픈스택 커뮤니티 하반기 스터디: 안내
오픈스택 커뮤니티 하반기 스터디: 안내Ian Choi
 

Viewers also liked (20)

[1A6]Docker로 보는 서버 운영의 미래
[1A6]Docker로 보는 서버 운영의 미래[1A6]Docker로 보는 서버 운영의 미래
[1A6]Docker로 보는 서버 운영의 미래
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)
 
Understanding DPDK algorithmics
Understanding DPDK algorithmicsUnderstanding DPDK algorithmics
Understanding DPDK algorithmics
 
Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitch
 
Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조
 
Netmap presentation
Netmap presentationNetmap presentation
Netmap presentation
 
In-memory Caching: Curb Tail Latency with Pelikan
In-memory Caching: Curb Tail Latency with PelikanIn-memory Caching: Curb Tail Latency with Pelikan
In-memory Caching: Curb Tail Latency with Pelikan
 
DPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al SandersDPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al Sanders
 
Nexus
NexusNexus
Nexus
 
[234] toast cloud open stack sdn 전략-박성우
[234] toast cloud open stack sdn 전략-박성우[234] toast cloud open stack sdn 전략-박성우
[234] toast cloud open stack sdn 전략-박성우
 
Java Script 2 Part.1
Java Script 2 Part.1Java Script 2 Part.1
Java Script 2 Part.1
 
C수업자료
C수업자료C수업자료
C수업자료
 
[C언어] 반복문_for문
[C언어] 반복문_for문[C언어] 반복문_for문
[C언어] 반복문_for문
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
ONOS (Open Network Operating System) Blackbird Release 분석
ONOS (Open Network Operating System)  Blackbird Release 분석ONOS (Open Network Operating System)  Blackbird Release 분석
ONOS (Open Network Operating System) Blackbird Release 분석
 
ONF Atrium 분석
ONF Atrium 분석ONF Atrium 분석
ONF Atrium 분석
 
NAIM Networks SDN/NFV Training
NAIM Networks SDN/NFV TrainingNAIM Networks SDN/NFV Training
NAIM Networks SDN/NFV Training
 
리눅스 스터디 1회차
리눅스 스터디 1회차리눅스 스터디 1회차
리눅스 스터디 1회차
 
오픈스택 커뮤니티 하반기 스터디: 안내
오픈스택 커뮤니티 하반기 스터디: 안내오픈스택 커뮤니티 하반기 스터디: 안내
오픈스택 커뮤니티 하반기 스터디: 안내
 
OpenDaylight 소개
OpenDaylight 소개OpenDaylight 소개
OpenDaylight 소개
 

Similar to DPDK (Data Plane Development Kit)

[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solutionOpenStack Korea Community
 
Spark performance tuning
Spark performance tuningSpark performance tuning
Spark performance tuninghaiteam
 
NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823
NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823
NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823Jongsoo Jeong
 
Apache spark 소개 및 실습
Apache spark 소개 및 실습Apache spark 소개 및 실습
Apache spark 소개 및 실습동현 강
 
Oracle linux8 solaris_new_features-suk kim
Oracle linux8 solaris_new_features-suk kimOracle linux8 solaris_new_features-suk kim
Oracle linux8 solaris_new_features-suk kimsuk kim
 
Opendaylight beryllium
Opendaylight berylliumOpendaylight beryllium
Opendaylight berylliumCheolmin Lee
 
Solaris11 기초 자료
Solaris11 기초 자료Solaris11 기초 자료
Solaris11 기초 자료Dong-Hwa jung
 
GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지
GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지
GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지Kyunghee Univ
 
spark database Service
spark database Servicespark database Service
spark database Service창언 정
 
NetApp AI Control Plane
NetApp AI Control PlaneNetApp AI Control Plane
NetApp AI Control PlaneSeungYong Baek
 
주니어 개발자의 서버 로그 관리 개선기
주니어 개발자의 서버 로그 관리 개선기주니어 개발자의 서버 로그 관리 개선기
주니어 개발자의 서버 로그 관리 개선기Yeonhee Kim
 
Network virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkNetwork virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkInho Kang
 
Kubernetes on GCP
Kubernetes on GCPKubernetes on GCP
Kubernetes on GCPDaegeun Kim
 
On premise db &amp; cloud database
On premise db &amp; cloud databaseOn premise db &amp; cloud database
On premise db &amp; cloud databaseOracle Korea
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Nalee Jang
 
SOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AISOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AIJoongi Kim
 

Similar to DPDK (Data Plane Development Kit) (20)

[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
 
Spark performance tuning
Spark performance tuningSpark performance tuning
Spark performance tuning
 
NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823
NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823
NanoQplus for EFM32 - EnergyMicro Seminar Korea 20120823
 
Apache spark 소개 및 실습
Apache spark 소개 및 실습Apache spark 소개 및 실습
Apache spark 소개 및 실습
 
Oracle linux8 solaris_new_features-suk kim
Oracle linux8 solaris_new_features-suk kimOracle linux8 solaris_new_features-suk kim
Oracle linux8 solaris_new_features-suk kim
 
Opendaylight beryllium
Opendaylight berylliumOpendaylight beryllium
Opendaylight beryllium
 
Solaris11 기초 자료
Solaris11 기초 자료Solaris11 기초 자료
Solaris11 기초 자료
 
OCP Switch Overview
OCP Switch OverviewOCP Switch Overview
OCP Switch Overview
 
GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지
GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지
GOTHAM 오픈소스 메쉬 네트워킹 소프트웨어 패키지
 
spark database Service
spark database Servicespark database Service
spark database Service
 
NetApp AI Control Plane
NetApp AI Control PlaneNetApp AI Control Plane
NetApp AI Control Plane
 
주니어 개발자의 서버 로그 관리 개선기
주니어 개발자의 서버 로그 관리 개선기주니어 개발자의 서버 로그 관리 개선기
주니어 개발자의 서버 로그 관리 개선기
 
KAFKA 3.1.0.pdf
KAFKA 3.1.0.pdfKAFKA 3.1.0.pdf
KAFKA 3.1.0.pdf
 
Network virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkNetwork virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center Network
 
Kubernetes on GCP
Kubernetes on GCPKubernetes on GCP
Kubernetes on GCP
 
What is spark
What is sparkWhat is spark
What is spark
 
On premise db &amp; cloud database
On premise db &amp; cloud databaseOn premise db &amp; cloud database
On premise db &amp; cloud database
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
 
Kafka slideshare
Kafka   slideshareKafka   slideshare
Kafka slideshare
 
SOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AISOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AI
 

More from ymtech

20171120 tech day-11th-소프트웨어 테스팅2-서현용
20171120 tech day-11th-소프트웨어 테스팅2-서현용20171120 tech day-11th-소프트웨어 테스팅2-서현용
20171120 tech day-11th-소프트웨어 테스팅2-서현용ymtech
 
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중ymtech
 
20170713 tech day_7th_pxe 부팅-김주한
20170713 tech day_7th_pxe 부팅-김주한20170713 tech day_7th_pxe 부팅-김주한
20170713 tech day_7th_pxe 부팅-김주한ymtech
 
20170609 tech day_4th-nginx(lb)-이재훈
20170609 tech day_4th-nginx(lb)-이재훈20170609 tech day_4th-nginx(lb)-이재훈
20170609 tech day_4th-nginx(lb)-이재훈ymtech
 
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석ymtech
 
20170414 techday 2nd_uiux디자인-최민희
20170414 techday 2nd_uiux디자인-최민희20170414 techday 2nd_uiux디자인-최민희
20170414 techday 2nd_uiux디자인-최민희ymtech
 
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍ymtech
 
Mikrotic CCR1036 라우팅 설정
Mikrotic CCR1036 라우팅 설정Mikrotic CCR1036 라우팅 설정
Mikrotic CCR1036 라우팅 설정ymtech
 
Cubietruck 리눅스 이미지 설치
Cubietruck 리눅스 이미지 설치Cubietruck 리눅스 이미지 설치
Cubietruck 리눅스 이미지 설치ymtech
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swiftymtech
 
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212ymtech
 
Ubuntu Host AP Setting
Ubuntu Host AP SettingUbuntu Host AP Setting
Ubuntu Host AP Settingymtech
 
Intel Galileo Linux Setting
Intel Galileo Linux SettingIntel Galileo Linux Setting
Intel Galileo Linux Settingymtech
 
MarsBoard RK3066 Linux 설치
MarsBoard RK3066 Linux 설치MarsBoard RK3066 Linux 설치
MarsBoard RK3066 Linux 설치ymtech
 
HP 3800-24G-2SFP OpenFlow Setting
HP 3800-24G-2SFP OpenFlow SettingHP 3800-24G-2SFP OpenFlow Setting
HP 3800-24G-2SFP OpenFlow Settingymtech
 
Openstack Instance Resize
Openstack Instance ResizeOpenstack Instance Resize
Openstack Instance Resizeymtech
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migrationymtech
 
SDN OpenFlow Load Balancer 시나리오
SDN OpenFlow Load Balancer 시나리오SDN OpenFlow Load Balancer 시나리오
SDN OpenFlow Load Balancer 시나리오ymtech
 
TR-069 클라이언트 검토자료8편
TR-069 클라이언트 검토자료8편TR-069 클라이언트 검토자료8편
TR-069 클라이언트 검토자료8편ymtech
 
TR-069 클라이언트 검토자료7편
TR-069 클라이언트 검토자료7편TR-069 클라이언트 검토자료7편
TR-069 클라이언트 검토자료7편ymtech
 

More from ymtech (20)

20171120 tech day-11th-소프트웨어 테스팅2-서현용
20171120 tech day-11th-소프트웨어 테스팅2-서현용20171120 tech day-11th-소프트웨어 테스팅2-서현용
20171120 tech day-11th-소프트웨어 테스팅2-서현용
 
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
 
20170713 tech day_7th_pxe 부팅-김주한
20170713 tech day_7th_pxe 부팅-김주한20170713 tech day_7th_pxe 부팅-김주한
20170713 tech day_7th_pxe 부팅-김주한
 
20170609 tech day_4th-nginx(lb)-이재훈
20170609 tech day_4th-nginx(lb)-이재훈20170609 tech day_4th-nginx(lb)-이재훈
20170609 tech day_4th-nginx(lb)-이재훈
 
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
 
20170414 techday 2nd_uiux디자인-최민희
20170414 techday 2nd_uiux디자인-최민희20170414 techday 2nd_uiux디자인-최민희
20170414 techday 2nd_uiux디자인-최민희
 
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
 
Mikrotic CCR1036 라우팅 설정
Mikrotic CCR1036 라우팅 설정Mikrotic CCR1036 라우팅 설정
Mikrotic CCR1036 라우팅 설정
 
Cubietruck 리눅스 이미지 설치
Cubietruck 리눅스 이미지 설치Cubietruck 리눅스 이미지 설치
Cubietruck 리눅스 이미지 설치
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swift
 
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
 
Ubuntu Host AP Setting
Ubuntu Host AP SettingUbuntu Host AP Setting
Ubuntu Host AP Setting
 
Intel Galileo Linux Setting
Intel Galileo Linux SettingIntel Galileo Linux Setting
Intel Galileo Linux Setting
 
MarsBoard RK3066 Linux 설치
MarsBoard RK3066 Linux 설치MarsBoard RK3066 Linux 설치
MarsBoard RK3066 Linux 설치
 
HP 3800-24G-2SFP OpenFlow Setting
HP 3800-24G-2SFP OpenFlow SettingHP 3800-24G-2SFP OpenFlow Setting
HP 3800-24G-2SFP OpenFlow Setting
 
Openstack Instance Resize
Openstack Instance ResizeOpenstack Instance Resize
Openstack Instance Resize
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migration
 
SDN OpenFlow Load Balancer 시나리오
SDN OpenFlow Load Balancer 시나리오SDN OpenFlow Load Balancer 시나리오
SDN OpenFlow Load Balancer 시나리오
 
TR-069 클라이언트 검토자료8편
TR-069 클라이언트 검토자료8편TR-069 클라이언트 검토자료8편
TR-069 클라이언트 검토자료8편
 
TR-069 클라이언트 검토자료7편
TR-069 클라이언트 검토자료7편TR-069 클라이언트 검토자료7편
TR-069 클라이언트 검토자료7편
 

DPDK (Data Plane Development Kit)

  • 1. ㈜유미테크 DPDK (Data Plane Development Kit) Intel Architecture 기반 패킷 처리 최적화 시스템 소프트웨어
  • 2. ㈜유미테크2㈜유미테크 DPDK 1. DPDK란? 2. Environmennt Abstraction Layer 3. Ethernet Poll Mode Driver Architecture 4. 주요 라이브러리 5. DPDK 개발 환경 6. 네트워크 카드 Driver Setting 7. Compiling a Sample Application 8. 테스트 환경 구성 9. DPDK 응용 기본 흐름도 10.향후 계획 개요
  • 4. ㈜유미테크4㈜유미테크 DPDK  DPDK : Data plane Development Kit - Intel Architecture 기반 패킷 처리 최적화 시스템 소프트웨어 - 패킷 처리 속도 최적화 프레임 워크 지원 - 어플리케이션 개발자는 로직 개발에 충실  x86 플랫폼에 고속 패킷 처리를 위한 라이브러리와 드라이버의 집합 - 리눅스 사용자 공간 IO 동작 - 프로파일에 필요한 모든 원소를 제공 - 고성능 패킷 처리 애플리케이션 작성  DPDK Libraries and Drivers - Memory Manager : object pools, huge page memory, object ring, alignment - Buffer Manager : pre-allocates fixed size buffers - Queue Manager : safe lockless queues, no spinlocks, avoiding wait times - Poll Mode Drivers : no asynchronous, interrupt-based signaling mechanisms - Flow Classification : a hash based on tuple information 1.1 DPDK란?
  • 5. ㈜유미테크5㈜유미테크 DPDK  DPDK 장점 - 고성능 패킷 처리 - 고가의 장비를 사용 하지 않아도 된다. - CPU가 지장 받지 않고 작업을 수행 할 수 있다.  DPDK 단점 - DPDK를 사용하기 위한 랜카드 종류가 한정되어 있다. (2014. 06 현재) • e1000 (82540, 82545, 82546) • e1000e (82571..82574, 82583, ich8..ich10, pch..pch2) • igb (82575..82576, 82580, i210, i211, i350, i354, dh89xxcc) • ixgbe (82598..82599, x540) • i40e (xl710) 1.2 DPDK 장점과 단점
  • 6. ㈜유미테크6㈜유미테크 DPDK  활용 사례 - 윈드리버 : 실시간 가상화 소프트 웨어 • 네트워크 기능 가상화, NFV 및 클라우드 환경을 위한 윈드리버 OVP 개발 • 고속 네트워크 환경 및 물리적 디바이스에 필적하는 고성능 제공 • 네트워크 구간의 어디에서든 유연하게 운용 가능, TOC 절감 • 서비스 제공사의 네트워크 활용도 향상, 서비스 적용시간 단축 - 6WIND : 6WINDGate 소프트 웨어 • 모바일 인프라 스트럭쳐와 네트워킹 제품의 개발 1.3 DPDK 활용 사례
  • 8. ㈜유미테크8㈜유미테크 DPDK  Core Components Architecture - rte_timer : Timer 기능. EAL에서 제공되는 타이머 인터페이스 기반으로 DPDK 실행 단위로 타 이머 서비스를 제공 - rte_malloc : hugepages에 메모리 할당 - rte_mempool : 메모리에 있는 개체의 풀을 할당 - rte_eal + libc : 응용 프로그램 로딩, 메모리 할당. 시간 인터페이스, PCI 접근 및 로딩 지원 - rte_mbuf : IP 트래픽 및 메시지 데이터 패킷의 버퍼를 지원 - rte_ring : 크기가 고정 된 개체를 저장하거나 코어 사이의 통신을 허용하는 FIFO를 고정 1.4 Core Components
  • 10. ㈜유미테크10㈜유미테크 DPDK  하드웨어 및 메모리 공간과 같은 낮은 수준의 리소스를 엑세스 한다.  EAL은 응용 프로그램 및 라이브러리에서 환경 특성을 숨기는 일반적인 인터페이스를 제공  자원을 할당하는 방법을 결정하는 초기화 루틴을 책임진다.  EAL – 어플리케이션과 라이브러리로부터 인터페이스에 대한 서비스를 제공 - Intel DPDK loading and launching - Support for multi-process and multi-thread execution types - Core affinity / assignment procedures - System memory allocation / de-allocation - Atomic / lock operations - Time reference - PCI bus access - Trace and debug functions - CPU feature identification - Interrupt handling - alarm operations 2.1 Environment Abstraction Layer
  • 11. ㈜유미테크11㈜유미테크 DPDK  The EAL options are as follows 2.2 The EAL options are as follows $ example –c 0x5 –n 4 … 0 1 0 1 0123
  • 12. ㈜유미테크12㈜유미테크 DPDK 3. Ethernet Poll Mode Driver Architecture
  • 13. ㈜유미테크13㈜유미테크 DPDK  1Gbe and 10Gbe 이더넷을 폴링 모드 드라이버를 포함하며 비동기 없이 작동하도록 설계 이더 넷 컨트롤러, 신호 전달 메커니즘을 기반으로한 인터럽트  장치를 구성, 사용자 공간에서 BSD 드라이버 실행을 통해 API를 제공하고 각각의 큐를 구성  PMD는 수신 프로세스 및 사용자의 어플리세이션에서 패킷을 임의의 인터럽트 없이 신속하게 전달하는 직접적인 디스크립터 3. Ethernet Poll Mode Driver Architecture
  • 15. ㈜유미테크15㈜유미테크 DPDK  Packet Forwarding Algorithm Suport - 패킷 포워딩 알고리즘을 지원하는 라이브러리  librte_net - IP 프로토콜을 정의하고 편리한 매크로를 가지고 있다.  Ring Library - Ring Lib는 큐를 관리 할수 있다. - 무한한 크기의 연결 리스트를 갖는다. - rte_ring의 속성 • FIFO • 최대 크기는 고정되고 포인터는 테이블에 저장된다. • Lockless implementation • Multi-consumer, single-consumer는 대기열에서 제외된다. • Multi-producer, single-producer는 대기열에 포함된다. • Bulk dequeue – 성공하면 지정된 개체 수를 뺀다. 그렇지 않으면 실패 • Bulk enqueue – 성공하면 지정된 개체수를 큐에 넣는다. 그렇지 않으면 실패 • Burst dequeue – 지정된 수를 충족 할 수 없는 경우 최대 사용 가능한 개체 큐에서 제거된다. • Burst enqueue – 지정된 개체수가 성취 될 수 없는 경우에 최대 개체를 저장한다 4. 주요 라이브러리
  • 17. ㈜유미테크17㈜유미테크 DPDK  DPDK 지원 - Kernel version : 2.6.33 이상 (개발 서버 버전: 3.13.0) - glibc : 2.7 이상  테스트 환경 (Ubuntu 12.10) - ixbge 모듈 기본 탑재 (인텔 10G 네트워크 드라이버)  커널 환경 설정 (hugepages) - hugepages = 1024 - default_hugepagesz=1G hugepagesz=1G hugepages=4 - echo 2048 > /sys/kernel/mm/hugepages/hugepages-2048KB/nr_hugepages - echo 2048 > /sys/devices/system/node/node0hugepages/hugepages- 2048KB/nr_hugepages - mkdir /mnt/huge && mount –t hugetlbfs nodev /mnt/huge 5.1 DPDK 개발 환경
  • 18. ㈜유미테크18㈜유미테크 DPDK  Compilation of the Intel DPDK - Required Tools • GNU make • coreutils : cmp, sed, grep, arch • gcc(version 4.5.x 이상) • libc headers(glibc-devel.i686 / libc6-dev-i386; glibc-devel.x86_64) • Linux kernel headers or sources required to build kernel modules • Additional packages required for 32-bit compilation on 64-bit systems are: glibc.i686, libgcc.i686, libstdc++.i686 and glibc-devel.i686 • Python(version 2.6 or 2.7) - Optional Tools • C++ Compiler(icc) • libpcap headers and libraries to compile and use the libpcap-based poll-mode driver This driver is disabled by default and can be enabled by setting CONFIG_RTE_LIBRTE_PMD_PCAP=Y in the build time config file 5.1 DPDK 개발 환경
  • 19. ㈜유미테크19㈜유미테크 DPDK  DPDK source directory $ unzip DPDK-<version>.zip $ cd DPDK-<version>  DPDK is composed of several directories : - lib : Source code of Intel DPDK libraries - app : Source code of Intel DPDK applications - examples : Source code of Intel DPDK application examples  To install and make targets $ make install T=x86_64-default-linuxapp-gcc  To prepare a target without building it $ make config T=x86_64-default-linuxapp-gcc 5.2 DPDK 빌드
  • 21. ㈜유미테크21㈜유미테크 DPDK  네트워크 카드 설정 - Kernel 6.1 Kernel Driver 모드 Setting • IP 설정 - 경로 : /etc/network/interfaces - 설정 내용 - 인터페이스 재시작 $ /etc/init.d/networking restart - 인터페이스 활성화 $ ifconfig <interface name> up - 인터페이스 비활성화 $ ifconfig <interface name> down auto <interface name> iface <interface name> inet static Address <ip> Netmask <netmask> Network <network> Broadcast <broadcast> Gateway <gateway> Dns-nameservers <dns-nameservers> Dns-search <dns-search> • 라우팅 설정 - 특정 IP에서 오는 패킷을 특정 인터페이스로 수신 $ route add –net <ip> netmask <netmask> dev <interface name> - 설정된 라우팅 테이블 삭제 $ route net –net <ip> netmask <netmask> dev <interface name> - 리눅스 재시작 시 라우팅 테이블 설정 - 경로 : /etc/network/interface Up route add –net <ip> netmask <netmask> dev <interface name>
  • 22. ㈜유미테크22㈜유미테크 DPDK  네트워크 카드 설정 - Loading the Intel DPDK igb_uio Module $ cd <DPDK>/x86_64-default-linuxapp-gcc $ sudo modprobe uio $ sudo insmod kmod/igb_uio.ko - Binding and Unbinding Network Ports to / from the igb_uio Module $ ./tools/pci_unbinnd.py – status 6.2 UIO Driver 모드 Setting
  • 23. ㈜유미테크23㈜유미테크 DPDK  네트워크 카드 설정 - To bind device eth2, 0000:0a:00.0, to the igb_uio driver : $ ./tools/pci_unbind.py – bind=igb_uio 0a:00.0 or ./tools/pci_unbind.py – bind=igb_uio eth2 $ ./tools/pci_unbind.py – bind=igb_uio 0a:00.1 or ./tools/pci_unbind.py – bind=igb_uio eth3 • Routing table indicates that interface 0000:0a:00.1 is active. Not modifying 메시지 발생 시 설정 하려는 인터페이스를 사용하지 않는 상태로 변경 후 다시 위 의 명령어를 실행 6.2 UIO Driver 모드 Setting
  • 25. ㈜유미테크25㈜유미테크 DPDK  When compiling an application in the Linux* environment on the Intel DPDK, the following variables must be exported : - RTE_SDK – Points to the Intel DPDK installation directory $ export RTE_SDK=/home/ymtech/dpdk/DPDK-1.6.0 - RTE_TARGET – Points to the Intel DPDK target environment directory $ export RTE_TARGET=x86_64-default-linuxapp-gcc  Sample – helloworld - helloworld 위치로 이동 7. Compiling a Sample Application
  • 26. ㈜유미테크26㈜유미테크 DPDK  Sample – helloworld $ ls $ cd build && ls -al 7. Compiling a Sample Application
  • 27. ㈜유미테크27㈜유미테크 DPDK  Sample – helloworld $ sudo ./helloworld –c f –n 4 - 메모리가 동적 할당 됨. 7. Compiling a Sample Application
  • 29. ㈜유미테크29㈜유미테크 DPDK  테스트 환경 및 실행 8. 테스트 환경 구성 DPDK 수집 패킷 전송 10 G 10 G 10 G 10 G Recv Send Recv Send
  • 31. ㈜유미테크31㈜유미테크 DPDK 9. DPDK 응용 기본 흐름도 시작 (main) EAL 초기화 (rte_eal_inet) 종료 메모리 할당 (rte_mempool_cre ate) 드라이버 초기화 (rte_pmd_init_all) 등록된 PCI Driver 확인 (rte_eal_pci_probe) 드라이버가 초기화 된 이더넷 장치의 수 (rte_eth_dev_count ) 이더넷 장치의 상황 에 맞는 정보 검색 (rte_eth_dev_info_ get) 이더넷 장치를 구성 (rte_eth_dev_confi gure) 이더넷 장치의 주소 를 검색 (rte_eth_macaddr_ get) 이더넷 장치에 대한 수신 큐를 할당 (rte_eth_rx_queue_ setup) 이더넷 장치 시작 (rrte_eth_dev_start) 모든 lcores 함수를 실행 (rte_eal_mp_remot e_launch) 패킷이 수신되면 그 에 대한 포인터를 rte_mbuf 구조에 저 장(rte_eth_rx_burst) 수신된 패킷의 수 확인 수신된 패킷의 메 모리 해제 (rte_pktmbuf_free) While 1초 주기로 수신 된 패킷 확인
  • 33. ㈜유미테크33㈜유미테크 DPDK  CentOS에 DPDK 개발 환경 셋팅 및 테스트  멀티코드 응용 작성 방법 기술 조사  DNS 패킷 분석 및 Mirroring 모듈과 연결 10. 향후 계획