DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Nidhia Varghese <nidhiavarghese93@gmail.com>
Cc: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-dev] Working of pipeline in a given config file and regarding user-defined actions in IP_PIPELINE application
Date: Tue, 11 Apr 2017 09:04:05 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891265278B02B@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <CAAx9ALUXSh6M6vFB-WT5Vh-4VpaA7F=GdYjkJEMyfojkNY4ppw@mail.gmail.com>

Hi Nidhia,

>Hi Cristian,
>
>Thanks for your help.
>
>If that is the case, is there any way to use the incoming port as a key for table lookup? I need to use incoming port along with some other fields of each packet as the key for my application.

Yes, you can. There is an input port field in the rte_mbuf structure that you can use.

The hash tables from librte_table/rte_table_hash* work with lookup key placed at any location from the start of the mbuf (see the key offset parameter), and for some tables there is a key mask parameter as well. Assuming a flat buffer that has both the mbuf and the packet in the same buffer (see the buffer anatomy in rte_mbuf.h), the key offset parameter can basically cover any location from the buffer, including meta-data (fields from mbuf or the buffer headroom, such as the input port), as well as packet fields (from the header/payload, such as the DiffServ 5-tuple).

You can do any of the two things below:
1. Use the key offset and key mask parameter of the hash table to select the relevant metadata/packet header fields;
2. Use the DMA action of the pass-through table to copy & pack the relevant metadata/packet header fields in some unused headroom space, and then point the key offset to this buffer location.

>
>Regards,
>Nidhia Varghese

Regards,
Cristian

  reply	other threads:[~2017-04-11  9:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06  9:06 Nidhia Varghese
2017-04-07 11:20 ` Singh, Jasvinder
2017-04-10  7:27   ` Nidhia Varghese
2017-04-10  9:39     ` Dumitrescu, Cristian
2017-04-11  7:48       ` Nidhia Varghese
2017-04-11  9:04         ` Dumitrescu, Cristian [this message]
2017-04-18  5:40           ` Nidhia Varghese
2017-04-18  9:53             ` Dumitrescu, Cristian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EB4FA525960D640B5BDFFD6A3D891265278B02B@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=nidhiavarghese93@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).