From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 92078376C for ; Wed, 28 Dec 2016 15:07:54 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 28 Dec 2016 06:07:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,422,1477983600"; d="scan'208";a="1105242223" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga002.fm.intel.com with ESMTP; 28 Dec 2016 06:07:53 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 28 Dec 2016 06:07:53 -0800 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.119]) by fmsmsx111.amr.corp.intel.com ([169.254.12.234]) with mapi id 14.03.0248.002; Wed, 28 Dec 2016 06:07:53 -0800 From: "Wiles, Keith" To: April Teodoro CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] Packet is not being sent Thread-Index: AQHSYMxANKrGXnxSyUi33UuM+hTTDqEc141bgAEUhQA= Date: Wed, 28 Dec 2016 14:07:52 +0000 Message-ID: <76329604-6ED6-401C-85A7-DFCBD4A3EC58@intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.126.214] Content-Type: text/plain; charset="us-ascii" Content-ID: <4107CA2647354D46BD62332CD53C6E1C@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Packet is not being sent 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: Wed, 28 Dec 2016 14:07:55 -0000 > On Dec 27, 2016, at 11:38 PM, April Teodoro wrote: >=20 >=20 >=20 >=20 > ________________________________ > From: April Teodoro > Sent: Wednesday, December 28, 2016 1:36 PM > To: dev@dpdk.org > Subject: Packet is not being sent >=20 >=20 > i, I am wondering what is causing the packet to be dropped. Please help m= e. >=20 > The mempool was created and retrieved via lookup >=20 > The port and queues have been verified to be correct. >=20 >=20 > However, according to stats, no packet is transmitted, although rte_eth_t= x_burst returns 1. I also do not receive anything on the connected machine. Hard to tell if all of the initializations have been done correctly in the = snap shot below, but please try the testpmd or pktgen to verify the ports a= re working correctly. If you can not send with those two apps then I would = suggest it is something to do with your hardware or system configuration. >=20 > 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); >=20 > 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 } Regards, Keith