examples/ip_pipeline: add load balancing to pass-through
authorJasvinder Singh <jasvinder.singh@intel.com>
Thu, 10 Mar 2016 15:29:02 +0000 (15:29 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 13 Mar 2016 15:08:55 +0000 (16:08 +0100)
commit69a2f4dea74a2b532056e035618aead405e61af9
tree61b614d71498ee193aa1071a8477bb9a2fe069ff
parentfe5d04621303f98bdb5983c62e07861cd0289e8f
examples/ip_pipeline: add load balancing to pass-through

The pass-through pipeline implementation is extended with load balancing
function. This function allows uniform distribution of the packets among
its output ports. For packets distribution, any application level logic
can be applied. For instance, in this implementation, hash value
computed over specific header fields of the incoming packets has been
used to spread traffic uniformly among the output ports.

The following pass-through configuration can be used for implementing
load balancing function over ipv4 traffic;

[PIPELINE0]
type = PASS-THROUGH
core = 0
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
dma_src_offset = 278; mbuf (128) + headroom (128) + 1st ethertype offset (14) + ttl offset within ip header = 278 (ipv4)
dma_dst_offset = 128; mbuf (128)
dma_size = 16
dma_src_mask = 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF
dma_hash_offset = 144; (dma_dst_offset+dma_size)
lb = hash

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
examples/ip_pipeline/pipeline/pipeline_actions_common.h
examples/ip_pipeline/pipeline/pipeline_passthrough_be.c
examples/ip_pipeline/pipeline/pipeline_passthrough_be.h