From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0BAEE45491; Tue, 18 Jun 2024 18:00:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D10DC402E3; Tue, 18 Jun 2024 18:00:36 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id CD309402B4 for ; Tue, 18 Jun 2024 18:00:35 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id A5DF521188; Tue, 18 Jun 2024 18:00:35 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [PATCH] net/ring: Set mbuf->port for received packets Content-Transfer-Encoding: quoted-printable Date: Tue, 18 Jun 2024 18:00:34 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F539@smartserver.smartshare.dk> In-Reply-To: <20240618134700.3709388-1-sriram.yagnaraman@ericsson.com> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] net/ring: Set mbuf->port for received packets Thread-Index: AdrBilWZINEEosUxQeSbKAen6y13tQAC7Jww References: <20240618134700.3709388-1-sriram.yagnaraman@ericsson.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Sriram Yagnaraman" Cc: , "Bruce Richardson" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Sriram Yagnaraman [mailto:sriram.yagnaraman@ericsson.com] >=20 > When using ring based ethdev, mbuf->port is not set on received = packets. >=20 > 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? 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? >=20 > Please advise if this change is something that can be upstreamed. >=20 > Signed-off-by: Sriram Yagnaraman