[dpdk-users] IP PIPELINE tap device

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Wed Nov 1 19:11:36 CET 2017


Hi BL,


> -----Original Message-----
> From: longtb5 at viettel.com.vn [mailto:longtb5 at viettel.com.vn]
> Sent: Monday, October 30, 2017 11:09 AM
> To: users at dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu at intel.com>
> Subject: IP PIPELINE tap device
> 
> Hi,
> I'm writing a new pipeline type called pipeline_tap, which has one input and
> two outputs. The outputs are simply duplications of the input, so basically
> like a l2fwd but with two outputs. There has already been great suggestions
> [1] on the mailing list to use the l2fwd sample app as a starting point, but
> I want to implement this using IP pipeline/packet framework as I would like
> to use this device in my IP pipeline application.
> 
> As I understand here's what I must provide in order to make my
> pipeline_tap:
> an input port, at least one table, and two output ports.

Well, you have multiple options, depending on how statefull/stateless your tap/probe/mirror device is.

What do you want to mirror?
(A) all input traffic
(B) just some packet types or pkts meeting a certain condition
(B) or just some selected flows (C)

Options (A) and (B) could be implemented without any internal table, while (C) most likely needs a table to be managed.

One solution could be to create a "mirror"pipeline that does a sort of broadcast: assuming N output ports, the input packet is:
1. Removed from the pipeline using rte_pipeline_hijack() API function
2. Clone every input packet is cloned (N-1) times
3. All N packets are sent out to an output port using rte_pipeline_port_out_packet_insert()
See pipeline_passthrough_be.c as example.

Another solution could be to create a "mirror" device similar to single producer multiple consumer queues that clones each input packet to N SWQs.


> 
> I have a couple of questions:
> First, according to the doc [2], my input port can only be connected to one
> table. Moreover, a packet coming from my input port can only hit one table
> entry. However it's not clear whether that one table entry can be connected
> to TWO output ports.
> Second, I'm having trouble understanding the implementation for table user
> actions and table reserved actions in rte_pipeline_run() [3], with all the
> mask thingy. Any pointers would be highly appreciated!
> 
> Regards,
> BL
> 
> [1] http://dpdk.org/ml/archives/dev/2015-July/021293.html
> [2]
> http://dpdk.org/doc/guides/prog_guide/packet_framework.html#connectiv
> ity-of-
> ports-and-tables
> [3]
> http://dpdk.org/browse/dpdk/tree/lib/librte_pipeline/rte_pipeline.c?h=v17
> .11
> -rc2#n1344
> 
> 

Regards,
Cristian


More information about the users mailing list