From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id C6E06DE0; Tue, 18 Apr 2017 07:40:04 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id u2so45318194wmu.0; Mon, 17 Apr 2017 22:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mV0FsD4BZOqIqETURAPrqrTPWxLUGOKVP73gT5BUCa4=; b=A80cZv4p0/4AODWALFVPrhU1g1lLEmVLjtaHtNtezOjkUTEhI1SA0G4GDU/MszFHNk SUstRdYBZ/1CJgoATitASaDehIJLvK8vKnq+YJ0uo1plztCIDe+VR4tfDPoRv4r2jPIO M4Y1UhJ8cTJiOKGFw7JyiuiQMB63UgXncDCC3JJgOciGX8j5Gg9oY22K8C0NESCAJpCI qUS1bzU6S1V5xCAkD9RYq/dRvWPblmaa6RXUgVXYEYgq+96Vu/mFRkh6Iqv0XMDi7+i6 PqI2bIq34t8VfoyiPLcjaifrJ8PJgwRSQt9rsiueBWD3kJ58lc5HO0YZldUZZzJlc8vg JLLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mV0FsD4BZOqIqETURAPrqrTPWxLUGOKVP73gT5BUCa4=; b=TXT4FxUbIPr3NXXExlzLSGK8VhcsDClgR30Pc25CzWVffyB+LGr3bn9cHB6l7itE8q 4DumgWEvh52gufBPdaKr53kNmP/7/LrbXWUSAUFQSrQ17fEybt2DEk5WkE2rrV1dbLNt 7E4P/cPM3kByvu6E2svy+fptf6h4jA+x5G8k2jY0caHvxI7Y9BGYCYEljcyVq2XHiDsU 4+mEXYc2BjJF8c9BbhZ9yrizjl/qn9DkJAAB9OQa4wbdq9TxWn0GAPcoOX4HjOFYfzjg NIeKSoSPW2C8IIdqqh+aQN+0M3DgzrJqnIFBsc9ne/PYVz266eZ1YO+DMAgRAV2rNPse 2H9g== X-Gm-Message-State: AN3rC/6CN9RERLJtebbOjymci89Q8ENmgATL38SC72h5F76wJ6mzgHZH 6Bb/PnPYu/negu7Xa8WD2tZHf/dkWA== X-Received: by 10.28.46.213 with SMTP id u204mr10855452wmu.136.1492494004509; Mon, 17 Apr 2017 22:40:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.169.68 with HTTP; Mon, 17 Apr 2017 22:40:03 -0700 (PDT) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891265278B02B@IRSMSX108.ger.corp.intel.com> References: <54CBAA185211B4429112C315DA58FF6D31B4B2B1@IRSMSX103.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891265278A197@IRSMSX108.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891265278B02B@IRSMSX108.ger.corp.intel.com> From: Nidhia Varghese Date: Tue, 18 Apr 2017 11:10:03 +0530 Message-ID: To: "Dumitrescu, Cristian" Cc: "Singh, Jasvinder" , "dev@dpdk.org" , "users@dpdk.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Working of pipeline in a given config file and regarding user-defined actions in IP_PIPELINE application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 05:40:05 -0000 Hi Christian, Can you please elaborate on how to use DMA action of pass-through table for this? Is that like creating a separate pipeline for saving this metadata to the headroom space and in the next pipeline we use this metadata field for further lookups. And we will be using different keys for each of these pipelines. Is that so? Thanks for your help. Nidhia On Tue, Apr 11, 2017 at 2:34 PM, Dumitrescu, Cristian < cristian.dumitrescu@intel.com> wrote: > 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 > -- Regards, Nidhia Varghese