From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from SNT004-OMC1S51.hotmail.com (snt004-omc1s51.hotmail.com [65.54.61.88]) by dpdk.org (Postfix) with ESMTP id 24C2B201 for ; Wed, 28 Dec 2016 02:45:27 +0100 (CET) Received: from APC01-HK2-obe.outbound.protection.outlook.com ([65.55.90.8]) by SNT004-OMC1S51.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 27 Dec 2016 17:45:27 -0800 Received: from PU1APC01FT045.eop-APC01.prod.protection.outlook.com (10.152.252.60) by PU1APC01HT130.eop-APC01.prod.protection.outlook.com (10.152.253.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.7; Wed, 28 Dec 2016 01:45:24 +0000 Received: from PS1PR02MB1595.apcprd02.prod.outlook.com (10.152.252.56) by PU1APC01FT045.mail.protection.outlook.com (10.152.253.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.10 via Frontend Transport; Wed, 28 Dec 2016 01:45:24 +0000 Received: from PS1PR02MB1595.apcprd02.prod.outlook.com ([10.167.48.25]) by PS1PR02MB1595.apcprd02.prod.outlook.com ([10.167.48.25]) with mapi id 15.01.0789.018; Wed, 28 Dec 2016 01:45:24 +0000 From: April Teodoro To: "users@dpdk.org" Thread-Topic: Question on rte_eth_tx_burst Thread-Index: AQHSYC6jgUywppURZEq1K0oCYr9736Ecl3+o Date: Wed, 28 Dec 2016 01:45:23 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-PH, en-US Content-Language: en-PH X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=hotmail.ph; x-incomingtopheadermarker: OriginalChecksum:6A7A69C6A0A4B255ADF9ED1162CBF0F7EB428B6AF4A5044C64AAD2977CFA6A65; UpperCasedChecksum:26F3C97D92620B5CFB5BFA585CF91CF02613FA67907CE5C86FFB8DF8D1B79FD5; SizeAsReceived:7411; Count:39 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [D185gAj6trMqCYXTmK4QaMbuH0SOmY2R] x-incomingheadercount: 39 x-eopattributedmessage: 0 x-microsoft-exchange-diagnostics: 1; PU1APC01HT130; 7:k6D4iReOEZwGwPZu5PzrINyJ6pVvKOioxUykdBvftFv0MWk4fG88/mRR9e3LoR+uv4TBT1wJyT/H2wjYOvrBjHaayyJlXYqlJzLWdDXxEwSasKK9u8G8dHX7aEP6skXgGyymqG6J/8xUM4e8WRnfC0JUiyTIjwGdV8NrNQy/1sWcHtOGxI25MLSN+PUrQqfGrYVy/7+kBDMdUsGMYNN9IZXQKoE548mCrWiefnD/oGVaPq+xKrkDL5NI5RqTbccO4IoyRH8RdM3etBFc5+8Fu7Foj+wNRhQS6D5fWuk9r8hDzcosWQDaOa3c8smrUrJY3UiPwZoxcr1LWjFdu5/2rOAMzuga0jdGknAsS8+mCRax35ZqDjcZ7T4g3gnpF3uHJa5+0jVK33y/wvzQ7oo7AG5dwhvPlnZw9c6PdfRglSeD+BXCNgqB+mrZFAreqlCKYlB/ZxMC0WHISc9yX4VT7w== x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:PU1APC01HT130; H:PS1PR02MB1595.apcprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: d7c0de78-eaf5-460a-793e-08d42ec330ed x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(1601124038)(1603103113)(1603101340)(1601125047); SRVR:PU1APC01HT130; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444111334)(444112120)(432015012)(82015046); SRVR:PU1APC01HT130; BCL:0; PCL:0; RULEID:; SRVR:PU1APC01HT130; x-forefront-prvs: 0170DAF08C spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2016 01:45:23.9161 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT130 X-OriginalArrivalTime: 28 Dec 2016 01:45:27.0564 (UTC) FILETIME=[108F64C0:01D260AC] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Question on rte_eth_tx_burst X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2016 01:45:28 -0000 Hello, I would like to follow up on this question. rte_eth_tx_burst returns 1 which is expected However, stats_get says there were 0 obytes ________________________________ From: users on behalf of April Teodoro Sent: Tuesday, December 27, 2016 6:50 PM To: users@dpdk.org Subject: [dpdk-users] Question on rte_eth_tx_burst Hi, I am wondering what is causing the packet to be dropped. Please help me= . The mempool was created and retrieved via lookup The port and queues have been verified to be correct. However, according to stats, no packet is transmitted. I also do not receiv= e anything on the receiving side. 532 if(mem =3D=3D NULL) 533 { 534 LOG <<"No mem"; 535 } 536 else{ 537 LOG << "has mem"; 538 } 539 540 rte_mbuf *mbufs =3D rte_pktmbuf_alloc(mem); 541 if(NULL =3D=3D mbufs) 542 { 543 LOG << "ALLOCATION failed"; 544 } 545 else 546 { 547 LOG << "ALLOCATION successful"; 548 } 549 550 uint8_t* messageToSend =3D NULL; 551 LOG << "SENDRAW 2"; 552 ether_addr addr; 553 rte_eth_macaddr_get(port, &addr); 554 LOG << "start port 2: " << rte_eth_dev_start(2); 569 ether_addr_copy(&addr, &hdr->s_addr); 570 hdr->ether_type =3D rte_cpu_to_be_16(0x9998); 571 mbufs->pkt_len =3D mbufs->data_len =3D 8; 572 573 messageToSend =3D (uint8_t*)&hdr[2]; 574 575 for(auto i=3D0u; i < sendmsg.header.msgSize; ++i) { 576 messageToSend[i] =3D sendmsg.data[i]; 577 } 578 579 LOG << "SENDRAW " << sendmsg.header.msgSize; 580 mbufs->pkt_len =3D sendmsg.header.msgSize; 581 LOG << "SENDRAW 5"; 582 LOG << "SENDRAW 6"; 583 rte_mbuf *mbufArray[] =3D {mbufs}; 584 rte_pktmbuf_refcnt_update(mbufs, 1); 585 LOG << "SENDRAW 7"; 586 //uint16_t nbPk =3D rte_eth_tx_burst(2, 0, mbufArray, 1); 587 uint32_t sent =3D 0; 588 struct rte_eth_dev_info dev_info; 589 struct rte_eth_stats stats; 590 LOG << "stats successful? " << rte_eth_stats_get(2, &stats); 591 rte_eth_dev_info_get(2, &dev_info); 592 LOG << "dev info: " << (dev_info.pci_dev->addr.bus); 593 while (1) { 594 sent =3D rte_eth_tx_burst(2, 0, mbufArray, 1); 595 if (sent > 0) { 596 LOG << "opackets: " << stats.opackets; 597 LOG << "obytes: " << stats.obytes; 598 LOG << "oerrors: " << stats.oerrors; 599 LOG << "packets transmitted " << sent; 600 return; 601 } 602 } 603 604 605 }