DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Tracking pipeline ports.
@ 2016-07-18 15:42 Gadre Nayan
  2016-07-18 17:09 ` Singh, Jasvinder
  0 siblings, 1 reply; 2+ messages in thread
From: Gadre Nayan @ 2016-07-18 15:42 UTC (permalink / raw)
  To: users

Hi,

I wanted to understand the purpose of the f_track function.

In the IP_pipeline example there are 2 instances where the f_track is used.

1. pipeline_firewall:
static int pipeline_firewall_track(void *pipeline, __rte_unused
uint32_t port_in,
        uint32_t *port_out)
{
        struct pipeline *p = (struct pipeline *) pipeline;

        /* Check input arguments */
        if ((p == NULL) ||
                (port_in >= p->n_ports_in) ||
                (port_out == NULL))
                return -1;

        if (p->n_ports_in == 1) {
                *port_out = 0;
                return 0;
        }

        return -1;
}

2. Passthrough:

static int
pipeline_passthrough_track(void *pipeline, uint32_t port_in, uint32_t *port_out)
{
        struct pipeline *p = (struct pipeline *) pipeline;

        /* Check input arguments */
        if ((p == NULL) ||
                (port_in >= p->n_ports_in) ||
                (port_out == NULL))
                return -1;

        *port_out = port_in / p->n_ports_in;
        return 0;
}

1. What is a actual use of this function ?
Quoting the documentation:
"In some cases, it is useful for a pipeline instance to get
application level information related to pipeline connectivity, such
as to identify the output link (e.g. physical NIC port) where one of
its output ports connected, either directly or indirectly by
traversing other pipeline instances."

2. The 1st condition check remains same in both. But in pass-through
port_out is assigned some value. what does this mean ?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-18 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 15:42 [dpdk-users] Tracking pipeline ports Gadre Nayan
2016-07-18 17:09 ` Singh, Jasvinder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).