From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 49E802B89 for ; Fri, 8 Apr 2016 22:23:05 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 08 Apr 2016 13:23:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,454,1455004800"; d="scan'208";a="941330256" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga001.fm.intel.com with ESMTP; 08 Apr 2016 13:23:03 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.12]) by IRSMSX106.ger.corp.intel.com ([169.254.8.172]) with mapi id 14.03.0248.002; Fri, 8 Apr 2016 21:23:02 +0100 From: "Singh, Jasvinder" To: "Talukdar, Biju" , users Thread-Topic: problem running ip pipeline application Thread-Index: AQHRj5yVBfb1XFGsT0mpdZvI+6Lsnp98ntDwgADQhhOAACZqyoAC8gbw Date: Fri, 8 Apr 2016 20:23:01 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6DE0632A@IRSMSX103.ger.corp.intel.com> References: , <54CBAA185211B4429112C315DA58FF6DDED8FD@IRSMSX103.ger.corp.intel.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjUwY2M2MGItMGE4MS00MmFhLWIyZDctZDVmMTZkMGE0NGUxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImJTaW9CcngzamlzcSsrR2RWK1wvRW9uMDROMFlBTTI4UFUzOElqWTR2WEt3PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] problem running ip pipeline application 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: Fri, 08 Apr 2016 20:23:05 -0000 HI Biju, > -----Original Message----- > From: Talukdar, Biju [mailto:Biju_Talukdar@student.uml.edu] > Sent: Thursday, April 7, 2016 12:36 AM > To: Singh, Jasvinder ; users > Subject: Re: problem running ip pipeline application >=20 >=20 > Hi Jasvinder, > I have seen one of your archive mail, where you described how one can > extract fields by modifying the configuration file. here is a small excer= pt: >=20 > PIPELINE1] > type =3D PASS-THROUGH > core =3D 1 > pktq_in =3D RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0 > pktq_out =3D TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0 > dma_size =3D 16 > dma_dst_offset =3D 64 > dma_src_offset =3D 150 > dma_src_mask =3D 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF dma_hash_offset =3D 80 >=20 > I am not able to understand what these field means. I want to extract src= ip > and destination ip. How would my configuration file would look like. > Again where the fields will be extracted. I need them as a input to my > function where I will use the src/dst ips to calculate a hash value and = update > my array. /*Input ports*/ for (i =3D 0; i < p->n_ports_in; i++) { struct rte_pipeline_port_in_params port_params =3D { .ops =3D pipeline_port_in_params_get_ops( ¶ms->port_in[i]), .arg_create =3D pipeline_port_in_params_convert( ¶ms->port_in[i]), .f_action =3D get_port_in_ah(p_pt), .arg_ah =3D p_pt, .burst_size =3D params->port_in[i].burst_size, }; In "static void* pipeline_passthrough_init" function, actions on the packet= s received at input ports have been defined during input ports initializati= on. These actions have been implemented using pkt_work (or pkt4_work) routi= nes, where the mask (defined in configuration file) is applied over incomin= g packet header fileds to extract the key. For example; let's assume we ha= ve following configuration file; [PIPELINE0] type =3D MASTER core =3D 0 [PIPELINE1] type =3D PASS-THROUGH core =3D 1 pktq_in =3D RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0 pktq_out =3D SWQ0 SWQ1 SWQ2 SWQ3 dma_size =3D 16 dma_dst_offset =3D 128; mbuf (128) + 64 dma_src_offset =3D 278; mbuf (128) + headroom (128) + ethernet header (14) = + ttl offset within ip header (8) =3D 278 dma_src_mask =3D 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF; ipv4 5-tuple dma_hash_offset =3D 144; dma_dst_offset + dma_size The above mask (16 bytes) will be applied over the ipv4 packet header field= s starting at dma_src_offset and will allow to extract 5-tuples (src/dst ip= , src/dst tcp port and protocol). The extracted fields are saved at dma_dst_offset. Application developer can= defined his own mask at any offset (dma_src_offset). In pkt_work/pkt4_work= routines, hash values are computed over extracted 5-tuples and stored at dma_hash_offset f= or the consumption of any other pipeline in the chain. > Also how do I print values of my variable. Is there any log file where I = can > print values. How do I debug my program, feeling helpless. You can introduce printf statements in pkt_work/pkt4_work routines or can u= se gdb to see computed parameters value. > Regarding the CLI. I also could not get any command for CLI. I just found= one > "p 1 ping". Could you please give some information. >=20 Regarding CLI command, passthrough pipeline accpets p ping, l= ink up/down related command etc. Please have a look at examples/ip_pipeline= /pipeline/pipeline_comman_fe.c(h) for commands that passthrough pipeline can accept. Jasvinder