From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0079.outbound.protection.outlook.com [207.46.100.79]) by dpdk.org (Postfix) with ESMTP id ACE0D2BF8 for ; Wed, 13 Apr 2016 02:04:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=studentuml.onmicrosoft.com; s=selector1-student-uml-edu; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dNomemuWiET7vhuVuZCh6EE6BY5GidewLF5uYLWep5o=; b=j1oMaT23Xj7qmlIf4T6HsMQXj7pAtaOSza+ywnDL3hp5vWGHkwE1ojnpGd+m3bYGd8FjgDDb48+USLtn7ryPDwpwNeuzT3sPyF3GS2aYAH8Zv4UFk6rOkYPjhYl0fh0jvG51Hdb3JGV/c4CVN5bQ9+c9x8rToXqErtzq3IeUWPU= Received: from BLUPR02MB439.namprd02.prod.outlook.com (10.141.81.20) by BLUPR02MB438.namprd02.prod.outlook.com (10.141.81.18) with Microsoft SMTP Server (TLS) id 15.1.453.26; Wed, 13 Apr 2016 00:04:15 +0000 Received: from BLUPR02MB439.namprd02.prod.outlook.com ([10.141.81.20]) by BLUPR02MB439.namprd02.prod.outlook.com ([10.141.81.20]) with mapi id 15.01.0453.029; Wed, 13 Apr 2016 00:04:15 +0000 From: "Talukdar, Biju" To: "Singh, Jasvinder" , users Thread-Topic: problem running ip pipeline application Thread-Index: AQHRj5yVBfb1XFGsT0mpdZvI+6Lsnp98ntDwgADQhhOAACZqyoAC8gbwgAaIuHM= Date: Wed, 13 Apr 2016 00:04:15 +0000 Message-ID: References: , <54CBAA185211B4429112C315DA58FF6DDED8FD@IRSMSX103.ger.corp.intel.com>, , <54CBAA185211B4429112C315DA58FF6DE0632A@IRSMSX103.ger.corp.intel.com> In-Reply-To: <54CBAA185211B4429112C315DA58FF6DE0632A@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=student.uml.edu; x-originating-ip: [25.165.112.132] x-ms-office365-filtering-correlation-id: 9aa529ce-5b4f-40bc-404d-08d3632f26d5 x-microsoft-exchange-diagnostics: 1; BLUPR02MB438; 5:UcdUAeZb/5Zp9ZuwtPFEHdIHUDufKZChLLej2gwexRBEigBLrs9S/4qGpdz7veaux0p3xy+NE5UQdT56Hyb/lfWpSP8WYTOqAVE7wlAkRl2nohtAvfsDysy9A9x1z8WXMsjb+pVISiSl5fvmO5iHUA==; 24:dXe/62d+gTC5aUdOSBnHpzXqCndU5Zorjpcs4+p8qFeK9GcOCj/7k6FEzAQDMqiAeWR10AN8LHm5gWo+lI2An3A6oSYb/fbibc/A16EFk7Q= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB438; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BLUPR02MB438; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB438; x-forefront-prvs: 0911D5CE78 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(377454003)(3660700001)(86362001)(189998001)(92566002)(107886002)(5003600100002)(87936001)(19580405001)(19580395003)(3900700001)(1096002)(5008740100001)(74316001)(102836003)(1220700001)(77096005)(2900100001)(2950100001)(3846002)(3280700002)(9686002)(33656002)(76576001)(586003)(6116002)(5002640100001)(5001770100001)(5004730100002)(81166005)(50986999)(76176999)(54356999)(106116001)(10400500002)(93886004)(11100500001)(66066001)(89122001)(99286002)(75432002)(122556002)(2906002)(88552002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB438; H:BLUPR02MB439.namprd02.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: student.uml.edu X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2016 00:04:15.4088 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4c25b8a6-17f7-46f9-83f0-54734ab81fb1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB438 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: Wed, 13 Apr 2016 00:04:17 -0000 Hi Jasvinder, Thanks a lot for your guidance.=20 I could see the prints that the pipeline initialization is complete. I gave= prints in the function pipeline_passthrough_init(). And I could see the pr= ints. But I get no prints from the function pkt_work(). This function proce= ss all the packets. PKT_WORK macro uses pkt_work() function. Again PKT_WORK= is used by port_in_ah macro. I am showing the code snippets from passthrou= gh pipeline. #define port_in_ah(dma_size, hash_enabled) \ PKT_WORK(dma_size, hash_enabled) \ PKT4_WORK(dma_size, hash_enabled) \ PIPELINE_PORT_IN_AH(port_in_ah_size##dma_size##_hash##hash_enabled,\ pkt_work_size##dma_size##_hash##hash_enabled, \ pkt4_work_size##dma_size##_hash##hash_enabled)=20 Now, port_in_ah is called like as show below: port_in_ah(8, 0) port_in_ah(8, 1) port_in_ah(16, 0) port_in_ah(16, 1) port_in_ah(24, 0) port_in_ah(24, 1) port_in_ah(32, 0) port_in_ah(32, 1) port_in_ah(40, 0) port_in_ah(40, 1) port_in_ah(48, 0) port_in_ah(48, 1) port_in_ah(56, 0) port_in_ah(56, 1) port_in_ah(64, 0) port_in_ah(64, 1) So eventually pkt_work() should get called by the above calls. But why I am= not getting any prints from pkt_work(). I have no clue why I am not gettin= g any test prints. Why the program execuion is not reaching up to those pri= ntfs. Do you think that I am not even getting any packets and thats why pkt_work= () is not get called at all. In that scenario, where I should look in? Reme= mber I am just trying the sample example application. There is no code chan= ge there apart from my prints. Logically it should work. ________________________________________ From: Singh, Jasvinder Sent: Friday, April 8, 2016 4:23 PM To: Talukdar, Biju; users Subject: RE: problem running ip pipeline application 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 > > > 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: > > 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 > > 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. > 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=