* [dpdk-users] Clone logic doesn't seem to work (using DPDK 17-11.1)
@ 2019-06-03 4:04 Prashanth Fernando
0 siblings, 0 replies; only message in thread
From: Prashanth Fernando @ 2019-06-03 4:04 UTC (permalink / raw)
To: users
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-03 4:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 4:04 [dpdk-users] Clone logic doesn't seem to work (using DPDK 17-11.1) Prashanth Fernando
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).