DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Cc: "dev@dpdk.org" <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:10 +0100	[thread overview]
Message-ID: <eb612083-e397-4a8c-a227-781af5b626f2@amd.com> (raw)
In-Reply-To: <AS4PR07MB841249405D179748647122D290CE2@AS4PR07MB8412.eurprd07.prod.outlook.com>

On 6/18/2024 8:14 PM, Sriram Yagnaraman wrote:
> Hi Morten,
> 
>> -----Original Message-----
>> From: Morten Brørup <mb@smartsharesystems.com>
>> Sent: Tuesday, 18 June 2024 18:01
>> 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
>>
>> [Du får inte e-post ofta från mb@smartsharesystems.com. Läs om varför det
>> här är viktigt på https://aka.ms/LearnAboutSenderIdentification ]
>>
>>> 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.
> 

I think it is a practical usage of ring PMD, and I am OK for the update.
There is a question in the commit log, I will remove it while merging.

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


      parent 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
2024-07-06  3:40     ` Ferruh Yigit [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=eb612083-e397-4a8c-a227-781af5b626f2@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).