DPDK usage discussions
 help / color / Atom feed
* [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, &eth_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, back to index

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

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox