DPDK patches and discussions
 help / color / mirror / Atom feed
From: April Teodoro <ateodoro@hotmail.ph>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Fw: Packet is not being sent
Date: Wed, 28 Dec 2016 05:38:43 +0000	[thread overview]
Message-ID: <PS1PR02MB15953C90704018E789CA3404BF680@PS1PR02MB1595.apcprd02.prod.outlook.com> (raw)
In-Reply-To: <PS1PR02MB1595E82AB0B37EF1AEDB316ABF680@PS1PR02MB1595.apcprd02.prod.outlook.com>




________________________________
From: April Teodoro <ateodoro@hotmail.ph>
Sent: Wednesday, December 28, 2016 1:36 PM
To: dev@dpdk.org
Subject: Packet is not being sent


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     }

  reply	other threads:[~2016-12-28  5:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28  5:36 [dpdk-dev] " April Teodoro
2016-12-28  5:38 ` April Teodoro [this message]
2016-12-28 14:07   ` Wiles, Keith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PS1PR02MB15953C90704018E789CA3404BF680@PS1PR02MB1595.apcprd02.prod.outlook.com \
    --to=ateodoro@hotmail.ph \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).