From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0055.outbound.protection.outlook.com [104.47.32.55]) by dpdk.org (Postfix) with ESMTP id F26D41B1A3; Wed, 10 Jan 2018 11:47:54 +0100 (CET) Received: from BN3PR03CA0066.namprd03.prod.outlook.com (10.167.1.154) by BN3PR03MB2353.namprd03.prod.outlook.com (10.166.74.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 10:47:53 +0000 Received: from BN1BFFO11FD016.protection.gbl (2a01:111:f400:7c10::1:125) by BN3PR03CA0066.outlook.office365.com (2a01:111:e400:7a4d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Wed, 10 Jan 2018 10:47:53 +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 BN1BFFO11FD016.mail.protection.outlook.com (10.58.144.79) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 10 Jan 2018 10:47:22 +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 w0AAljSK007124; Wed, 10 Jan 2018 03:47:50 -0700 From: Hemant Agrawal To: CC: , , Ashish Jain , Date: Wed, 10 Jan 2018 16:16:24 +0530 Message-ID: <1515581201-29784-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515581201-29784-1-git-send-email-hemant.agrawal@nxp.com> References: <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> <1515581201-29784-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131600548426268613; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39380400002)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(6666003)(6916009)(105606002)(53936002)(77096006)(2950100002)(97736004)(104016004)(16586007)(85426001)(68736007)(4326008)(316002)(54906003)(86362001)(296002)(36756003)(305945005)(50466002)(81156014)(48376002)(8936002)(8676002)(81166006)(76176011)(356003)(51416003)(5660300001)(498600001)(47776003)(106466001)(8656006)(2351001)(2906002)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2353; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD016; 1:O/nCahmxS84m+P87E2Mc0Dkxn5akpyI+b2O8ciJ2aGEwVrVI0JhoaCQTPaqaqSCAJA3BWYPn8MdZ7EEUV0e6Nm8bLb/FZewmHlWDCcGPVijFEolKMQKh9x5na6eRXE1S MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0035c79e-50b9-4e0a-bfc5-08d5581787a8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:BN3PR03MB2353; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2353; 3:opfRKwthLLfDoQD3Qle1MnW//687cPLTeNm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XztuVHla50UKDT/tcFYr5fLYuICgMHMGmjEYcZPSpbqmRY3VQU8kAspY0dIvb3fm8YiEPmPvaksaGmoXt6R2t//Yy6tOZHkP/C78/dmDnqgnWMRaxIc/cWJMLxR0aUCuAaFZJBu0QgcJADhDjTbEQyqWKsrvr4R87Cd61bUXI3+XWMbFiuN1tsBJvgYV9qCIV2wIWruMKo+oBbUpcsmf3jigV0iEkYqeBn/fUen/yGB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231023)(944510075)(944921075)(946801075)(946901075)(10201501046)(3002001)(6055026)(6096035)(20161123559100)(20161123556025)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123563025)(201708071742011); SRVR:BN3PR03MB2353; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2353; X-Forefront-PRVS: 0548586081 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2353; 23:8Bmd6rACuU397bm0iVsTOF3DEZECXFidIbgwAbnWX?= =?us-ascii?Q?3KglE93NkMYjIScne/Bi3+x5GylCFsUEgncBeWtuHKG49BqNqCE6S6Cc1cL3?= =?us-ascii?Q?AQ4yDAi6vvL1SWJZl0RWGFISwAQ/lx460ZDqEmybGGmLXC3pFGwxSqNy4mq6?= =?us-ascii?Q?z+WLW1A99BiGxMH07+6DGYor8l/yCvsNGyPnP6ZgZrvWyuaDL42zCWhnRxZI?= =?us-ascii?Q?MvInsw2VzxCgdf3CL9x99GiPX8bgKOQnLdwxWTv5ladfMiiuc+VkEb33EOxp?= =?us-ascii?Q?PFTGOTxL5xdZA7E32O5PaTTxCQBxbAyeKHGo/j5VnDNXF70gNGSwnSTPYX+w?= =?us-ascii?Q?Ta22jZ265lgGDbDW0n9acZA95P4UwjZK0WiReE0u9Rp1MW7u9LjbztG6altZ?= =?us-ascii?Q?/zibG3EvVJ4nEMqaVvtl9s72C959oeC8r2obfzW3EAUmAfXNkgdz24iM77W/?= =?us-ascii?Q?c3WAqq+nzPZ2UeofKnyPTvRpeN0Z+4TDpEd4TfWvaH/VS6+CRF9BWK9hgWXg?= =?us-ascii?Q?nNwsHgKw/YBsVA0HdZ2k0M4+aggp52C92FU0P4XF0oeEPZGj7WMTZBHzILtb?= =?us-ascii?Q?wh+7aafkdjVmMG7EL8OCVmiVqt7NmN2hJvzCuoNYl75jBGbhWu0ZsbH+fG2e?= =?us-ascii?Q?2CyawHWf6hOQg8R+8GH2FOm0o0ZyO0SgfM3XZFR08Tv/a2lioNoI9YkSCgFI?= =?us-ascii?Q?5Cv4+lvxo0hKUM3pyXse789UsDneH9XSU0029nzEHK900aAQFH8yLLxnfXb0?= =?us-ascii?Q?s33w3HNZwgUKuyDN0skrhNpQAEyvueiIaPdDJXu+q5S0SXIuTFY5mfvKQ69d?= =?us-ascii?Q?c4+a5zH87Equ06EFi83V7JNbg+sPxcz2SGV77EPOjO6j1DfWioo2To/ZXKhr?= =?us-ascii?Q?ZikFUogu4UMYJJhbbe7RLtyB+4fBm6tmEMucteieWJDYMlifq3toTP/We81S?= =?us-ascii?Q?2ENINzrQVtLpaaSwoHsIb2Eg/M2aks5OK/w2hpVAWTwTYMlPo+d6IhoJnAz+?= =?us-ascii?Q?m+IKvYYkgpPSxJyftS8l7D2rH6+Kxqk/g8549CDxkR+M33FsoYf6Fu1fuDkT?= =?us-ascii?Q?ErR1ZqnJSc5KJlas+PsPk2UdNAm?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2353; 6:OYx8bFYbP11+m0XIz9lwRjzkY8QdV7fjtl4czWKqhe9W8IahZViWNgko5t68Lg9CF+wGp98PepY/O2G02Pe5NJUuNWjgeTjCCqf2u/zXl7TpVHynfpO97i5eajbNsnIBO1I6E08dInCvaqyXy3IQliIyQpATiDuhVxiNU0kpJPIGZBY/71m5+llKZL7CrAiBcJAlBmxPDaGXxzjd+NtxYq0GqXykMcAEC/+LNh536sIPB8FnZKuBiBZ2+7hiQZ9W1S8U/l63rKV9MNidZ+jC/8+0FAOxWOo934JkxawdsgJ8ACnjUoSc8mLkwKCr+9mCLICDPdI3WROZiAmGb8L2Tehfl3DBhyfUgz8RGB5wI0Y=; 5:+BpfUBMmR79wG8akyrxnC35jZrzM5WoOyx09dinI8hwe3DOybpQ4thEYjB/iDaXO54viEvKxH/E/BPlFWJX1N4u6LgAisZ/FKag5ylzw6c9vA7eg9IWLJBgohxbl/viYT6m0bXnBoy4zgig/dMHUn32ftttSGKleR5Y82RG9E7Q=; 24:QUI0jtczTRkpo4CjHHNftmCX8h8cECyt5C99hB6d7w3S5mbxAuNSEngkvw11/YC8X5wx+D7sanMbAWuDF8oxwISnWXFTuTdojs6fSBc2grk=; 7:4D8bL1dOhsvVN8a0uSU2q4jtQvZcRE7kOnNUcRpbNbvZuo5xgSrA7p7t0COYtfgXt5qVCYZDy7RF7dwTM3ctzNncj9H7AE6U3Hp1L6mpWu0DQY8TEUKl15bVo+qRDqKUo2R2a9hwe9Rxv70BIlSfsArcEesjzLiQOSwq7lyXSRoHBbpUWBaV35PPiE7SS25UK6lj69coVUS4HoRkTaWtMD4hu86wd6Kf7ig2PwiA2upQt4ka4qKoRilAQ0ARBl9V SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 10:47:22.4396 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0035c79e-50b9-4e0a-bfc5-08d5581787a8 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: BN3PR03MB2353 Subject: [dpdk-dev] [PATCH v3 02/19] net/dpaa: fix the mbuf packet type if zero 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: , X-List-Received-Date: Wed, 10 Jan 2018 10:47:55 -0000 From: Ashish Jain Populate the mbuf field packet_type which is required for calculating checksum while transmitting frames Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx") Cc: stable@dpdk.org Signed-off-by: Ashish Jain Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_rxtx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index c3a0920..630d7a5 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "dpaa_ethdev.h" #include "dpaa_rxtx.h" @@ -478,6 +479,15 @@ dpaa_eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf, fd->opaque_addr = 0; if (mbuf->ol_flags & DPAA_TX_CKSUM_OFFLOAD_MASK) { + if (!mbuf->packet_type) { + struct rte_net_hdr_lens hdr_lens; + + mbuf->packet_type = rte_net_get_ptype(mbuf, &hdr_lens, + RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK + | RTE_PTYPE_L4_MASK); + mbuf->l2_len = hdr_lens.l2_len; + mbuf->l3_len = hdr_lens.l3_len; + } if (temp->data_off < DEFAULT_TX_ICEOF + sizeof(struct dpaa_eth_parse_results_t)) temp->data_off = DEFAULT_TX_ICEOF @@ -585,6 +595,15 @@ tx_on_dpaa_pool_unsegmented(struct rte_mbuf *mbuf, } if (mbuf->ol_flags & DPAA_TX_CKSUM_OFFLOAD_MASK) { + if (!mbuf->packet_type) { + struct rte_net_hdr_lens hdr_lens; + + mbuf->packet_type = rte_net_get_ptype(mbuf, &hdr_lens, + RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK + | RTE_PTYPE_L4_MASK); + mbuf->l2_len = hdr_lens.l2_len; + mbuf->l3_len = hdr_lens.l3_len; + } if (mbuf->data_off < (DEFAULT_TX_ICEOF + sizeof(struct dpaa_eth_parse_results_t))) { DPAA_DP_LOG(DEBUG, "Checksum offload Err: " -- 2.7.4