DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>
Cc: <dev@dpdk.org>, "Bruce Richardson" <bruce.richardson@intel.com>
Subject: RE: [PATCH] net/ring: Set mbuf->port for received packets
Date: Wed, 19 Jun 2024 08:48:28 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F53A@smartserver.smartshare.dk> (raw)
In-Reply-To: <AS4PR07MB841249405D179748647122D290CE2@AS4PR07MB8412.eurprd07.prod.outlook.com>

> From: Sriram Yagnaraman [mailto:sriram.yagnaraman@ericsson.com]
> 
> Hi Morten,
> 
> > From: Morten Brørup <mb@smartsharesystems.com>
> >
> > > From: Sriram Yagnaraman [mailto:sriram.yagnaraman@ericsson.com]
> > >
> > > When using ring based ethdev, mbuf->port is not set on received packets.
> > >
> > > For applications that use the mbuf->port to identify the incoming
> > > port, especially when eventdev RX adapter pulls the packet on a
> > > different core and the application running on a worker core has no
> > > clue on the incoming port. This change adds some cycles at receive, to
> > > set the port of course.
> >
> > I agree that the mbuf->port field must be set before returning from
> > rte_eth_rx_burst().
> >
> > I'm not aware how applications use the ring based ethdev, so I might be
> > asking silly questions...
> >
> > How about all the other mbuf fields normally set by the PMD before
> > returning from rte_eth_rx_burst()?
> >
> > Is the enqueueing core supposed to set them?
> 
> I am integrating a couple of existing DPDK applications, and they use
> rte_eth_* API between them today. To keep the API consistent, and not make too
> many changes in the applications themselves, net_ring seems to be the best
> option. If someone has a better idea, I would love to hear.
> 
> There are no "HW" offloads when using net_ring, and IIUC there are no HW
> related fields that can be set at rx_burst.
> So, apart from port field, I didn't see much else that needed to be set.
> 
> >
> > Or if the ring is only used for queueing packets originally received (at a
> > physical port) by the enqueueing core, why not keep the mbuf->port value
> > from the original reception?
> 
> In my case the enqueuing application originates the flow from SW, so the
> rte_mbuf does not come from a NIC.

Thank you for the explanation.

Acked-by: Morten Brørup <mb@smartsharesystems.com>

> 
> >
> > >
> > > Please advise if this change is something that can be upstreamed.
> > >
> > > Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>


      reply	other threads:[~2024-06-19  6:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 13:47 Sriram Yagnaraman
2024-06-18 16:00 ` Morten Brørup
2024-06-18 19:14   ` Sriram Yagnaraman
2024-06-19  6:48     ` Morten Brørup [this message]

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=98CBD80474FA8B44BF855DF32C47DC35E9F53A@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=sriram.yagnaraman@ericsson.com \
    /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).