lbnetipv4 mode and architecture - msturagit66/samplevnf GitHub Wiki
The following figure illustrates the PROX architecture with two load balancers receiving packets from port0 and port1. The load balancers distribute packets to n workers that are configured in routing mode and l3 submode, which in turn route the packets based on an ipv4 lua table.
The number of Rx queues that will be used depends on the number of cores configured for a load balancer. For example, configuring
two cores for each load balancer will result in two Rx queues per each port (i.e. two Rx queues on Port 0 and two Rx queues on Port 1).
The number of Tx queues that will be used depends on the number of workers, each worker correspond to one core.
For example, configuring four workers will result in four Tx queues. The code has been updated to enable routing configuration with a single Tx port. The answer to ARP and PING is going on the control plane port configured with the additional argument 'configure ipv4 on port'.
The following configuration file requires a kubernetes worker node (VM) sized with a minimum of 12 vCPUs with PROX running as container/CNF.
[eal options]
-n=4 ; force number of memory channels
no-output=no ; disable DPDK debug output
[port 0]
name=if0
mac=hardware
rx desc=256
tx desc=512
promiscuous=no
[port 1]
name=if1
mac=hardware
rx desc=256
tx desc=512
promiscuous=no
[defaults]
mempool size=16K
[lua]
lpm4 = dofile("ipv4.lua")
[global]
start time=5
name=Routing (2x)
[variables]
$wk=3s0-6s0
$lbp0=7s0-8s0
$lbp1=9s0-10s0
[core 2s0]
mode=master
[core $lbp0]
name=LB-port0
task=0
mode=lbnetipv4
rx port=if0
tx cores=(${wk})t0 proto=ipv4
drop=no
[core $lbp1]
name=LB-port1
task=0
mode=lbnetipv4
rx port=if1
tx cores=(${wk})t1 proto=ipv4
drop=no
[core $wk]
name=Workers
task=0
mode=routing
sub mode=l3
mac from lua=yes
local ipv4=10.71.194.91
configure ipv4 on port=if0
gateway ipv4=10.71.194.90
route table=lpm4
rx ring=yes
tx port=if1
drop=no
task=1
mode=routing
sub mode=l3
mac from lua=yes
local ipv4=172.16.1.251
configure ipv4 on port=if1
gateway ipv4=172.16.1.250
route table=lpm4
rx ring=yes
tx port=if0
drop=no
The following is the lua table example used for the above configuration.
local lpm4 = {}
lpm4.next_hops = {
}
lpm4.routes = {
}
return lpm4
The following figure is showing the EDP port list and lcores allocation, with Rx and Tx queues.
The figure below is showing dedicated RSS with 2 hardware queues assigned to each vNIC of the worker node used by the PROX container.