Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

Instalação

Instalar OS: Ubuntu 16.04 LTS

Configuração

DPDK:

instalar dpdk:

sudo apt update

sudo apt install -y dpdk dpdk-dev

Edite o arquivo /etc/dpdk/dpdk.conf e adicione a variável:

NR_2M_PAGES=2048

Depois aloque a memória via kernel, edite o arquivo /etc/default/grub e adicione:

GRUB_CMDLINE_LINE_DEFAULT="hugepages=2048"

Atualize o grub:

# update-grub

Reboot o appliance:

# reboot 

OpenVswitch:

Instalar pacotes

sudo apt install -y openvswitch-switch-dpdk

Alterar o deamon do openvswitch padrão para o deamon do openvswitch com suporte a dpdk:

sudo update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
sudo nano -w /etc/default/openvswitch-switch
sudo systemctl restart openvswitch-switch.service

Adicione os módulos do dpdk disponiveis para serem carregados automaticamente, execute os comandos abaixos:

Automático:

Edite o arquivo /etc/modules e adicione as linhas:

uio_pci_generic
vfio_pci

Edite o arquivo /etc/dpdk/interfaces e coloque as interface compatives com dpdk:

<bus>      <id>           <driver> (uio_pci_generic ou vfio_pci)

pci 	0000:00:14.0      uio_pci_generic   
pci 	0000:00:14.1      uio_pci_generic    
pci 	0000:00:14.2      uio_pci_generic	
pci 	0000:00:14.3      uio_pci_generic	
pci 	0000:05:00.0      uio_pci_generic   
pci 	0000:05:00.1      uio_pci_generic


linux_interface_name = ethX, emX, etc ...

Inicializando modulo dpdk do openvswitch:

# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="2048,0"

# ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=1
Habilitando os núcleos para dpdk

Core:

7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 1 = 0x1 (core0 reservado)

1 = core habilitado 
0 = core desabilitado

 

Configura o openvswitch com as bridge e interface:

Bridge

sudo ovs-vsctl add-br br-dpdk0 -- set bridge br-dpdk0 datapath_type=netdev protocols=OpenFlow10,OpenFlow13

Ports

sudo ovs-vsctl add-port br-dpdk0 dpdk0 -- set Interface dpdk0 type=dpdk -- set Interface dpdk0 mtu_request=9600
sudo ovs-vsctl add-port br-dpdk0 dpdk1 -- set Interface dpdk1 type=dpdk -- set Interface dpdk1 mtu_request=9600
...
sudo ovs-vsctl add-port br-dpdk0 dpdkN -- set Interface dpdkN type=dpdk -- set Interface dpdkN mtu_request=9600

Controller

sudo ovs-vsctl set-controller ovsdpdkbr0 tcp:<ip controller>:6653

ToDo

Referências

 

n-dpdk-rxqs

 

  • No labels