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 32 Next »

Instalação

Instalar OS: Ubuntu 16.10

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"

Defina as interfaces que usarão o driver dpdk, editando o arquivo /etc/dpdk/interfaces, insira as interface compatíveis 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

Habilite o inicialização das interfaces dpdpks:

systemclt enable dpdpk
Atualize o grub:
update-grub
Reboot o whitebox:
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

Reinicie o deamon do openvswitch:

sudo systemctl restart openvswitch-switch.service

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="4096"

# ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=3F

 
# systemctl restart openvswitch-switch
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

Configurando o openvswitch para inserir controladores, bridge, filas e interface:

Bridge

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

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 dpdk2 -- set Interface dpdk2 type=dpdk -- set Interface dpdk2 mtu_request=9600
 
sudo ovs-vsctl add-port br-dpdk0 dpdk3 -- set Interface dpdk3 type=dpdk -- set Interface dpdk3 mtu_request=9600
 
sudo ovs-vsctl add-port br-dpdk0 dpdk4 -- set Interface dpdk4 type=dpdk -- set Interface dpdk4 mtu_request=9600
 
sudo ovs-vsctl add-port br-dpdk0 dpdk5 -- set Interface dpdk5 type=dpdk -- set Interface dpdk5 mtu_request=9600

Controller

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

ToDo

Referências

 

n-dpdk-rxqs

 

 

  • No labels