From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f67.google.com (mail-it0-f67.google.com [209.85.214.67]) by dpdk.org (Postfix) with ESMTP id 9630E282 for ; Mon, 18 Jul 2016 17:42:22 +0200 (CEST) Received: by mail-it0-f67.google.com with SMTP id u186so6230958ita.1 for ; Mon, 18 Jul 2016 08:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=I5rwoyxQNZ30GdpNnL/bATjssrZSu9c5z12phe2zmvg=; b=UxL8hmnUk6gWeE/e7kPNA0g5B1eQlyNenndMCnkPRlV+Nk3GT2ajXRIGTDZUcKS5s2 F+SAlF3ml7V7XJ1HsBCCwGhC6415pbhQERrKTrYbxmB4Z1pXRGUmqFTogaEvTLMA81PF pbNhcxjFMACDL4Ct7gy/Dbsshw5MsNrsSUneMAT3QX4RWWKNrSjXPN9E5P+J5rISQE36 v5t1nG/yeIG3QFNP3+aZ8yLyvvT7Ozaz9fF1ZWFjIqoVQaY/mSrr2zz6Cl0a3esvEDpD DJ37+hqOBHJrCFBSAUrOc8OV2Pmz7JCR9UAhEN1th6Iri/u7ja4D+eSu6Mws1A/VThHv RSTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=I5rwoyxQNZ30GdpNnL/bATjssrZSu9c5z12phe2zmvg=; b=mkTvEruOGQfrt5u92bJrK1Y10jtw9bw/50B06tU6GQ70vTyqW3QXM2PpQqo44A0o4d lpOvlSYyannuxJMl76n4+R0mAypUjaAcoB7n2LirBJYgSSdwAdMdcI0r2vKIcUU68gk2 +M6+yWLOgVb0TBIW4NTQ8KxgnqedzhDmtBVKiSAP/a1AyZT91Ed7HNn4I7YXqzbQHskE h/HGhzV6B5kFa6F5OR5wxMRHuBg3sVDuCQR2y2LKwwIoU3v+hDVvXtXkHoarq0j+E0BL bu8Mt10YZ2jrhDzBJeX19LO6EmQechjqiusKDEfpkq1sRMSeJeVpUk5aah+mHAanXz3E 7FPw== X-Gm-Message-State: ALyK8tLMnBQnRYoQWZbkD0iN+hnwwDiDqIljMOTq834OWlGCQDxUwcaLSxGO2hPCeNN9h4omeqB1phTDREWrvw== X-Received: by 10.36.65.29 with SMTP id x29mr34160366ita.21.1468856541837; Mon, 18 Jul 2016 08:42:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.1.200 with HTTP; Mon, 18 Jul 2016 08:42:21 -0700 (PDT) From: Gadre Nayan Date: Mon, 18 Jul 2016 21:12:21 +0530 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: [dpdk-users] Tracking pipeline ports. X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2016 15:42:22 -0000 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 ?