examples/ip_pipeline: extract fields in passthrough pipeline
authorJasvinder Singh <jasvinder.singh@intel.com>
Sat, 3 Oct 2015 11:20:12 +0000 (12:20 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 7 Dec 2015 01:35:56 +0000 (02:35 +0100)
commitee3fd1b982a085c2c42a4f0dac259faee5269662
tree81e03b60922d06389372672a5dff1da24c47f64a
parentbb5b66c613408bbfe661f96b5d39355130faf35d
examples/ip_pipeline: extract fields in passthrough pipeline

This patch implements a generic approach to
extract fields from the packet's header and
copying them to packet metadata. The fields
are selected at the desired offset on the basis
of the mask specified in application configuration
file. The extracted fields, for instance, can be
used to compute hash for the lookup table. This
feature exposes more flexibility to the users as
they will be able to employ new protocol headers
and specify the required fields to be extracted.

The above feature has been implemented as port_in
action handler of the passthrough pipeline. The
example of the configuration file for passthrough
pipeline is as below;

[PIPELINE1]
type = PASS-THROUGH
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
dma_size = 16
dma_dst_offset = 64
dma_src_offset = 150
dma_src_mask = 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF
dma_hash_offset = 80

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