From patchwork Fri Dec 8 05:21:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121127 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp230316qgn; Thu, 7 Dec 2017 21:24:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMacZmCyMlYiFZ+oQn+n4/S5odPuHZ17SujUlwAeSlOPFmekX2g10vQSREjEDXDK4KJrSG9N X-Received: by 10.223.161.210 with SMTP id v18mr23169911wrv.170.1512710687750; Thu, 07 Dec 2017 21:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710687; cv=none; d=google.com; s=arc-20160816; b=he6h97UlOn3/ksz9nkEW8KywUDLba5p4YXkJgrtZX8EMuSHiJtCTdd9meI8nlWdkT2 1od2JaRI2XoIRfrNbmdOiIUSkwez7AJyno071rYpgfb+8hE1hEN0Jpje92S5/Y+JYJFg tPcVfIrEjZRKF3qrmk6zfu07uXPCofM/c2sxssx8x57tBlG2lOaIbbhTcn7ah53/oVRe dUAqcq2xEGRLsyufbUTTwVjowbOlRFyUZe4sFUntj9EKN5JfSVLHPb1XQL7dG7y8JxQ/ cUqtTkgZZ2aDu6NNmXC9Zh8wgrkGb6ORGkId625oFjZ6JbbGTcQrzcttZtHQ/6Q6lg0j JBFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=MGRVpepiKDIm+i9/f/VWCH5qGouwmQWH9QOBawJ4DvE=; b=ZFCoOOHEFmCc+itYfYmH4BfcWFsb48xdMAczvZ6n4QL4dYc/4M6NMzL0w/MH/J4yss DJCq2l8SKQgH2+ZBsZyNvioyV+ADRlg40Q8c7qv7ZK2gJ0ALn0DjYlJw3WeQfDgXve9D Mmts/RO5ZcGhWaAYgtH8dAlgB7Mo5Xx3yLDL7EMOggJiQVIrqye+ZlNwDEetVvknjGYR HeO0AXrWgSQw1Ii27fnicRyrisZF/mm25+kQpclYf9qblo6JKqiV9Lv1bIonuw0uL0sz DdYsOT9Wvnu2I2PZ/+kuw+QOJZN6Sm5zh8j6t08kEgRlixYYtEJdSdaOxV9QwGhWqqP1 77Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id s7si5266844wrg.463.2017.12.07.21.24.47; Thu, 07 Dec 2017 21:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0DD41B1E6; Fri, 8 Dec 2017 06:22:53 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0067.outbound.protection.outlook.com [104.47.36.67]) by dpdk.org (Postfix) with ESMTP id 0BD681B1E6 for ; Fri, 8 Dec 2017 06:22:53 +0100 (CET) Received: from MWHPR03CA0031.namprd03.prod.outlook.com (10.174.173.148) by CY4PR03MB2693.namprd03.prod.outlook.com (10.173.43.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:51 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::173) by MWHPR03CA0031.outlook.office365.com (2603:10b6:301:3b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:51 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:47 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vB85MKGj013022; Thu, 7 Dec 2017 22:22:48 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Fri, 8 Dec 2017 10:51:25 +0530 Message-ID: <1512710487-32388-13-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841678613071; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(6916009)(498600001)(316002)(77096006)(8676002)(81166006)(81156014)(356003)(5660300001)(33646002)(8656006)(53936002)(54906003)(16586007)(2351001)(2950100002)(50466002)(296002)(105606002)(6666003)(4326008)(305945005)(104016004)(47776003)(85426001)(106466001)(36756003)(76176011)(86362001)(97736004)(68736007)(51416003)(8936002)(50226002)(48376002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2693; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:uFgMXm8lPsP5SWMPmZ6b+gQAuxQNAOCurmNzhc/K0FgKs5WVBxedKmS0a3Qqv6UZdX88iaNyz+phFnQPlUmGi8kotBRSLzrKe9QSLtvw+3t0c7Vu4qH8b+fT+vsPQ/do MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44573c57-43b1-49a8-9a4f-08d53dfbb829 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY4PR03MB2693; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 3:/TbmlNJVN7hYtvSpoFIJajPqA3/jsXDBicOJDyV+/cytuojLsprq2YLWq6jekBfCBz5TzcJNzVSQDXyxb7o5PtAIBweJUMveMuUvoH2nylKDpvk0t2thbko+yNjIBT8MtS08uj6GmV5q9tmvG+GCPBdVEmSOF8WUxhHMlwjJvewwnyVhSSDOpxIgQf1cC8sDNhxsP49h6b8Y7LBxD2AXI4KPxhOgHQP2ebO94eU0pgFXXpa0esz6DyK57ddjHffRfHA/nSE0WpBdKYJ2EbAIEQAbe+EvKcZ7RJ4QZjKcfrE+01d7pPHak2StqDAbW8/Yx7kDmTReI6hf0KhZKmjyLJ2fnvRzbG0d0alFmsCjLDE=; 25:O5RHcbqy5XApf7USnXDL4yDhawXX5DChBPQpnGxx2gEshF93abTeS+32sdlQdjUFVysB/KWG6FbeQH3u8awHe35kPdh6iP8Ifbadz9/0O2Rix+NRHYHJeq2bN9Ubp0X/3KDvFrUGutRKCincq1udDbioaejfl9GZfvX4UuJBW/I7xKPMQ9GAunr6PkX52wQrpBXkSyy/5cAxqMTMa068ESn59YZwl3e0UrPg2IW408OjslVCza6gPWIDMU5xmi4fGSFljijpDNgVCHqR2rxfSWVKUmDD8k//mYxb5rcS+HaG9Ty0BYqOgNt4WKa/uUiV7+WvfeJh/2mxBPj6J13Ydw== X-MS-TrafficTypeDiagnostic: CY4PR03MB2693: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 31:vXwRKHbwhJqDQaujxD7Wr1W1q+i39oXyEZu38NRmxlXmCz/neXD3E5TQ1yYOCwDjTBXmUH8wbXyj8KsOtBoeUUW2jhmfw/YIRFerUEr32nz3pi2TF2ZMtMQtdrRdlonnHZcGnllYFD/A2+7EPbo+t7OZ2dMjuqJoTztkB73THDFKLInswzNlR1jV21xRe7/Ha2WYdmLAsDvtuWqWPXRxfIFjVEySBFHBr2qE98TBX9Y=; 4:FXn9s9IrlGoAV1WwmHFkx9g5CyKUeR+lBhdHa/HVEM9GrkO29WTwZakvv07rlETWuKE2nhkcYIQ5iX00RKWgYweLMPqpJ9hS4hHkC9gRMjhGy73fjfVn9BFYekS355DI9zz378yCFgeSqkpp7XFjN0fTWZUj+u8wWFjcAjXW+gdaClAVtgwDfNugTMrtNlgqJLWPvjRx3oMmiEWOAV5S5ZLnjoMKYiAKY6lGwFZPS4NCaZ6HTALm9Av7hpkRd4FAYoPvVshy1Z6z7WQLdc39OQsSG1I9DJKUwfgKEAJRgsivkZeXDGHwBuwzYtz5wzPM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231022)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123559100)(20161123565025)(20161123556025)(201708071742011); SRVR:CY4PR03MB2693; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2693; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2693; 23:ieqgr4HKdK7+nOOTxjp21PctdLZNKIBWt9/blhqQD?= 10NzYO456YyZ7LdClxeVRJIEl8Kf12B9XQuEiHm4OceWC4DZuuBDL54nOaFVOKmbt60FcMKyy7Db9u6Sf+4JVP98ZEeI6k9HWs6s2hU6APXeuS3lDg9N6HU4rNSgLKBiUls4mO7qZhg1ci1urOWe6Iwce2fvGo4AvYA9EoppgXmQb969O02sajP92LlGHCYly1/MF8U18X3CYn2tTUIz0T0cw3LCzt4oPv/9YJFirayUCVNeoIozmTZpYXWi4BLDWK9yWPIUZGp/lNBZ4m8J2HLRl2D69n2VXKKCx/CyUW2fSojPcAlwTu1ke65QHrm2r/N80haxdo1ismroWKSC8CFv70ZWrHYfTnwEp0bE0BY9aVZq5UkcLAq+REwz9GZ4HFnvAe2t9kzZ0og0dB17f0lp+disEkI5eYYeKtkixKQGAxw2d9E4tYOpDsX0FUyk4o/QrmxNxCKQ+AQU/NbJSEu48Ao79bM3hB8Dw2rfyOFMJ3gKC3WMqY+9BOt8w0rrmP5hJz1gXeT35jGWQ0r44bQvcI8fnHePYpRADbIhrvnMe6zCwVob0nJaYBmCMB4W2qtgH7WyDpr7C8Je1pnpgmvIuqk73XzHHu7IluHN8Oh+7LPHrqK4mSDRv7G878LO4e6EagNWQzABmI86sVkaxMxs/fFDqpDVREX2L7oXFGWACR4yzRYx5k49p87kt35L6Gk1YMcSp8JUJZ7BSR7Y4syj77Z/c+wypSEStafy5hZIsNFEZ9NySjlvJUELwP8qE0apAS9FEeWG2MrJ8HugNI3TydSJhfx8f7UngdqQSpybB2Slgh03czdFLQTHF/DCzdzQ63QXC7mR3fjCMKd72Yws4hH9TMrICfgjA/31SQ/rTg4YR8jTuu5Wrl+no+l7nRBBnBbUFgvVjm2f1EwQ7+oFZUdx55+1CcIfqiOZrzaZ9x+gNVIOmj9lh5cv+hmAOfuHJZhEGljrEzsOJhjSiKgSwLjuK4bZ7zlnyNbkfsIXAp9/lxLH78ht056v6rvs7DTjP7mm1WhudcjKNXUZBcoe66RdQveaYcj3C3p2hhUawYMqPS8AnIx/BPToO732NA= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 6:waNBbmQVnVUCoBp4q8mabAtZVdKkVt2HeCL3ytE7BzTyza9XqOrlwZh4pJYY1q/gFg4BJguaeFmWD2w9ZjWMQbVaKT0/k0dtU9gOW0mjQukgtaNdLtc6QODemwjXMnldiScJuP+lUK7+IToDyfGY8stMrqnACGOZA6wYGgpQJSZS8ZRWUwoxT/YrIDBxP1Fs5PjrBcycmHvpanvjJthDWBDqzziBQ5MtQATHNpLv06BdOURMNNb9AFTEm1IQFvAX3JtLvGcP1dYeioYapzuiAMQXGSix6atp1xVhRTFD13xgCuUxXWzvZQwRyK80lrpYkaB6+iYCCjfpkM6/3BKMvpKHlbl8uZnuBUsQ4hA0t8E=; 5:49NFjHBuQAXzXiPgTmBJjS3qqfJRWxQxIVn/BqynYZmy9Qx6bmkkqVSncORWS/Zcia+LAw/pkHfO3UMyV73TXnbfyIAKZ7rHtmR60SBAZVCoKK1XefZfAvT7mRv8dSdXjGzXA4Ij23IbRyE/a2u51VXhcENaWkWkRpqSj/k83gE=; 24:AehQSzN78x6+LlZgLtiEuRkvbiVRjjOcApWjdYMziXJBgTJRvGDq7gamCrwg4SbemAs/XmuLzLrHT5EGd/mTFF3MD4H420L25QJ80MiwyhU=; 7:uOzNbshe4ktrQTlHtX0wXvlw9Q8Wn1H4eBglTvB1zT7AYY+2rabhUgOvpCUO07uKH6Cx/XZ5mYA9VQyNE9kTpPDHbBxpus826UVBwFXhVI+FyXAMLNb8B2ziOYHj7WD284oTTqeAPiEGn7r4GEyXbg4wK90WrBtRmFjWXuFEktRA6xxYnPz7WdnOAsqLXbxj4PRkUWMcLebCNf2GL8QnngtNCqx3f1gifbhwGVFM2IJpiTFEStgx27EZS7rpEsIL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:47.6741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44573c57-43b1-49a8-9a4f-08d53dfbb829 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2693 Subject: [dpdk-dev] [PATCH 12/14] net/dpaa2: optimize Rx path packet parsing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nipun Gupta Parsing the annotation has multiple if checks in the data path. These are reduced for common cases like IPv4/IPv6 and UDP/TCP packets to enhance performance of these generic cases. Signed-off-by: Nipun Gupta --- drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h | 20 +++++++++++++ drivers/net/dpaa2/dpaa2_rxtx.c | 43 ++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h b/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h index e68febf..88a9d49 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h @@ -219,6 +219,26 @@ struct dpaa2_annot_hdr { #define L5_SOFT_PARSING_ERROR BIT_POS(1) #define L3_IPV6_ROUTE_HDR_PRESENT BIT_POS(0) +#define DPAA2_L3_IPv4 (L3_IPV4_1_PRESENT | L3_IPV4_1_UNICAST | \ + L3_IP_1_UNKNOWN_PROTOCOL | L3_IP_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv6 (L3_IPV6_1_PRESENT | L3_IPV6_1_UNICAST | \ + L3_IP_1_UNKNOWN_PROTOCOL | L3_IP_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv4_TCP (L3_IPV4_1_PRESENT | L3_IPV4_1_UNICAST | \ + L3_PROTO_TCP_PRESENT | L3_PROTO_TCP_CTRL_BIT_6_TO_11_PRESENT | \ + L4_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv4_UDP (L3_IPV4_1_PRESENT | L3_IPV4_1_UNICAST | \ + L3_PROTO_UDP_PRESENT | L4_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv6_TCP (L3_IPV6_1_PRESENT | L3_IPV6_1_UNICAST | \ + L3_PROTO_TCP_PRESENT | L3_PROTO_TCP_CTRL_BIT_6_TO_11_PRESENT | \ + L4_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv6_UDP (L3_IPV6_1_PRESENT | L3_IPV6_1_UNICAST | \ + L3_PROTO_UDP_PRESENT | L4_UNKNOWN_PROTOCOL) + /* Debug frame, otherwise supposed to be discarded */ #define DPAA2_ETH_FAS_DISC 0x80000000 /* MACSEC frame */ diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 3b58a48..5c75cfa 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -120,14 +120,13 @@ dpaa2_dev_rx_parse_frc(struct rte_mbuf *m, uint16_t frc) } static inline uint32_t __attribute__((hot)) -dpaa2_dev_rx_parse(uint64_t hw_annot_addr) +dpaa2_dev_rx_parse_slow(uint64_t hw_annot_addr) { uint32_t pkt_type = RTE_PTYPE_UNKNOWN; struct dpaa2_annot_hdr *annotation = (struct dpaa2_annot_hdr *)hw_annot_addr; PMD_RX_LOG(DEBUG, "annotation = 0x%lx ", annotation->word4); - if (BIT_ISSET_AT_POS(annotation->word3, L2_ARP_PRESENT)) { pkt_type = RTE_PTYPE_L2_ETHER_ARP; goto parse_done; @@ -183,6 +182,41 @@ dpaa2_dev_rx_parse(uint64_t hw_annot_addr) return pkt_type; } + +static inline uint32_t __attribute__((hot)) +dpaa2_dev_rx_parse(uint64_t hw_annot_addr) +{ + struct dpaa2_annot_hdr *annotation = + (struct dpaa2_annot_hdr *)hw_annot_addr; + + PMD_RX_LOG(DEBUG, "annotation = 0x%lx ", annotation->word4); + + /* Return some common types from parse processing */ + switch (annotation->word4) { + case DPAA2_L3_IPv4: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4; + case DPAA2_L3_IPv6: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6; + case DPAA2_L3_IPv4_TCP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | + RTE_PTYPE_L4_TCP; + case DPAA2_L3_IPv4_UDP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | + RTE_PTYPE_L4_UDP; + case DPAA2_L3_IPv6_TCP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6 | + RTE_PTYPE_L4_TCP; + case DPAA2_L3_IPv6_UDP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6 | + RTE_PTYPE_L4_UDP; + default: + PMD_RX_LOG(DEBUG, "Slow parse the parsing results\n"); + break; + } + + return dpaa2_dev_rx_parse_slow(hw_annot_addr); +} + static inline void __attribute__((hot)) dpaa2_dev_rx_offload(uint64_t hw_annot_addr, struct rte_mbuf *mbuf) { @@ -279,6 +313,8 @@ eth_fd_to_mbuf(const struct qbman_fd *fd) mbuf->data_off = DPAA2_GET_FD_OFFSET(fd); mbuf->data_len = DPAA2_GET_FD_LEN(fd); mbuf->pkt_len = mbuf->data_len; + mbuf->next = NULL; + rte_mbuf_refcnt_set(mbuf, 1); /* Parse the packet */ /* parse results for LX2 are there in FRC field of FD. @@ -297,9 +333,6 @@ eth_fd_to_mbuf(const struct qbman_fd *fd) DPAA2_FD_PTA_SIZE, mbuf); } - mbuf->next = NULL; - rte_mbuf_refcnt_set(mbuf, 1); - PMD_RX_LOG(DEBUG, "to mbuf - mbuf =%p, mbuf->buf_addr =%p, off = %d," "fd_off=%d fd =%lx, meta = %d bpid =%d, len=%d\n", mbuf, mbuf->buf_addr, mbuf->data_off,