[dpdk-dev] net/nfp: add port id to mbuf

Message ID 1519298028-30853-1-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Alejandro Lucero Feb. 22, 2018, 11:13 a.m. UTC
  Although this can be done by the app, because other PMDs are doing it,
apps expect this behaviour from the PMD.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ferruh Yigit March 7, 2018, 11:37 a.m. UTC | #1
On 2/22/2018 11:13 AM, Alejandro Lucero wrote:
> Although this can be done by the app, because other PMDs are doing it,
> apps expect this behaviour from the PMD.

Although it doesn't explicitly stated, I think expectation is PMD to set it, the
sample applications I checked in the dpdk don't set this.

And it can give better performance setting in PMD where the data is hot.

Fixes: b812daadad0d ("nfp: add Rx and Tx")
Cc: stable@dpdk.org

> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

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

Patch

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index e5bfde6..5180a31 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2089,6 +2089,8 @@  enum nfp_qcp_ptr {
 		mb->nb_segs = 1;
 		mb->next = NULL;
 
+		mb->port = rxq->port_id;
+
 		/* Checking the RSS flag */
 		nfp_net_set_hash(rxq, rxds, mb);