DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
	"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: Sat, 6 Jul 2024 04:40:21 +0100	[thread overview]
Message-ID: <e71acbcd-cab1-40a1-86e7-836a83ac61cb@amd.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F53A@smartserver.smartshare.dk>

On 6/19/2024 7:48 AM, Morten Brørup wrote:
>> 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>
> 

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied to dpdk-next-net/main, thanks.


  reply	other threads:[~2024-07-06  3:40 UTC|newest]

Thread overview: 6+ 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
2024-07-06  3:40       ` Ferruh Yigit [this message]
2024-07-06  3:40     ` Ferruh Yigit

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=e71acbcd-cab1-40a1-86e7-836a83ac61cb@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --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).