DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Packet is not being sent
@ 2016-12-28  5:36 April Teodoro
  2016-12-28  5:38 ` [dpdk-dev] Fw: " April Teodoro
  0 siblings, 1 reply; 3+ messages in thread
From: April Teodoro @ 2016-12-28  5:36 UTC (permalink / raw)
  To: dev

i, 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, although rte_eth_tx_burst returns 1. I also do not receive anything on the connected machine.

532         if(mem == NULL)
533         {
534                 LOG <<"No mem";
535         }
536         else{
537                 LOG << "has mem";
538         }
539
540         rte_mbuf *mbufs = rte_pktmbuf_alloc(mem);
541         if(NULL == mbufs)
542 {
543         LOG << "ALLOCATION failed";
544 }
545  else
546 {
547    LOG << "ALLOCATION successful";
548 }
549
550         uint8_t* messageToSend = 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 = rte_cpu_to_be_16(0x9998);
571         mbufs->pkt_len = mbufs->data_len = 8;
572
573         messageToSend = (uint8_t*)&hdr[2];
574
575         for(auto i=0u; i < sendmsg.header.msgSize; ++i) {
576         messageToSend[i] = sendmsg.data[i];
577         }
578
579         LOG << "SENDRAW " << sendmsg.header.msgSize;
580         mbufs->pkt_len = sendmsg.header.msgSize;
581         LOG << "SENDRAW 5";
582         LOG << "SENDRAW 6";
583         rte_mbuf *mbufArray[] = {mbufs};
584         rte_pktmbuf_refcnt_update(mbufs, 1);
585         LOG << "SENDRAW 7";
586         //uint16_t nbPk = rte_eth_tx_burst(2, 0, mbufArray, 1);
587         uint32_t sent = 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 = 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     }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-28 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-28  5:36 [dpdk-dev] Packet is not being sent April Teodoro
2016-12-28  5:38 ` [dpdk-dev] Fw: " April Teodoro
2016-12-28 14:07   ` [dpdk-dev] " Wiles, Keith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).