From: Prashanth Fernando <prashanth.fernando@tatacommunications.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users] Clone logic doesn't seem to work (using DPDK 17-11.1)
Date: Mon, 3 Jun 2019 04:04:41 +0000 [thread overview]
Message-ID: <SG2PR04MB35969591F419E65086E331FEF8140@SG2PR04MB3596.apcprd04.prod.outlook.com> (raw)
Hi,
I am trying UDP replication in DPDK-17.11.1.
For replication I a trying to have a linked buffer, the header buffer will contain Ethernet/Ip header and the rest will be in second segment.
When I tx the packet, I see only the Ethernet/IP header(first segment) the rest of the contents (in the second segment) is missing.
I am tx the packet using rte_port_ring_writer_tx().
Not sure what I am missing, can you please let me know on how to debug this issue.
Tx_Logic in f_run function
if (likely ((mc = clone_out_pkt(m)) != NULL))
{
update_headers_in_clone (mc, ð_head, &in_hdr);
if (port_out_id == 4)
port_out_id = 0;
struct rte_port_out *port_out =
&p->ports_out[port_out_id];
/* Output port user actions */
if (port_out->f_action == NULL) /* Output port TX */
port_out->ops.f_tx(port_out->h_port, mc);
port_out_id++;
}
Clone Logic
static inline struct rte_mbuf *
clone_out_pkt(struct rte_mbuf *pkt)
{
struct rte_mbuf *hdr;
/* Create new mbuf for the header. */
if (unlikely ((hdr = rte_pktmbuf_alloc(header_pool)) == NULL))
return NULL;
/* If requested, then make a new clone packet. */
if (unlikely ((pkt = rte_pktmbuf_clone(pkt, clone_pool)) == NULL)) {
rte_pktmbuf_free(hdr);
return NULL;
}
/* prepend new header */
hdr->next = pkt;
/* update header's fields */
hdr->pkt_len = (uint16_t)(pkt->pkt_len);
hdr->nb_segs = pkt->nb_segs + 1;
}
Tks,
Prashanth
reply other threads:[~2019-06-03 4:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=SG2PR04MB35969591F419E65086E331FEF8140@SG2PR04MB3596.apcprd04.prod.outlook.com \
--to=prashanth.fernando@tatacommunications.com \
--cc=users@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).