From patchwork Tue Jan 9 13:22:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 123941 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4018532qgn; Tue, 9 Jan 2018 05:24:24 -0800 (PST) X-Google-Smtp-Source: ACJfBostiHruIz64RSvSnlEhkPOaScLrjRqHF+nATk3y0iQRypxkC1JDtl7nvT/pRn3rJpxQa2wX X-Received: by 10.28.74.72 with SMTP id x69mr12651663wma.126.1515504264366; Tue, 09 Jan 2018 05:24:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515504264; cv=none; d=google.com; s=arc-20160816; b=SNr/XGDyk3eOYS+nCkikH2jY8dOVABDplRATLrznK11uSTdgzShgTifv9coKJpmnsi VDL+PO6w/VOtvznkIqxtk98Zh/vQHC3kn9p/HD3ge/K47BvOnWpnVW+Hzf3QThyctEW+ CRX6zqICsLhzS5DcfUZHUS3Ia2qjSFytibLMZ3mNWBVyo/f9xb+Vz+hLD2ONysPgnQD/ S3a52JKfYgPRscx/wmuGqZsYRkxVnAfFkHzuvMybeoGDhRX+QP0W1xYq2ao4RWuzt8KC wNTJH6gfx25KchOiJOIAT7v4AAS00FG5TceY4XOWMpj7ib/+cDB+dopVS1BoW3pNoAbz V4+w== 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=eD63WN6Q23D5N3XugzFxqy4zcViEErSzOk5jxwOGZfc=; b=VHGvTlaGJkFBtwKWeUSPHPsZvyUk+CiNxvrqe2Bs1kgrTSeL9QnmbpfYa0Z15vjjCa D5jcy4d74cFQ18HSxYJ+QBFKfKv13QSbFjz/MKvEMrzszSdVfSDCIFrAWb7g+6qywlSo GpdrUdrr+hCbhcEcep/igSWs8tCC0pyAhtHqyrcRABtb1NEEqi9IMl6QEETxwm03YR0G tOlaPlOVZsFp/G6tTysrHaXg4HB93jy1BNNwBE7iZgOSrPYEgtnH8rDelfuTllivvyNh 8bbzDzBPSxtn0i5s38ABX5kOtmK0zhiquKUJB9/MLxWPU3+olb88VUO+zA/1jwIsnvkw htcA== 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 j7si9496676wmg.73.2018.01.09.05.24.24; Tue, 09 Jan 2018 05:24:24 -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 A155B1B1C4; Tue, 9 Jan 2018 14:24:19 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0074.outbound.protection.outlook.com [104.47.34.74]) by dpdk.org (Postfix) with ESMTP id D3B051B1BF; Tue, 9 Jan 2018 14:24:17 +0100 (CET) Received: from CY4PR03CA0085.namprd03.prod.outlook.com (10.171.242.154) by BN6PR03MB2691.namprd03.prod.outlook.com (10.173.144.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Tue, 9 Jan 2018 13:24:16 +0000 Received: from BY2FFO11FD028.protection.gbl (2a01:111:f400:7c0c::116) by CY4PR03CA0085.outlook.office365.com (2603:10b6:910:4d::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; Tue, 9 Jan 2018 13:24:16 +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 BY2FFO11FD028.mail.protection.outlook.com (10.1.15.217) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Tue, 9 Jan 2018 13:23:45 +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 w09DOAVj017638; Tue, 9 Jan 2018 06:24:13 -0700 From: Hemant Agrawal To: CC: , , Ashish Jain , Date: Tue, 9 Jan 2018 18:52:49 +0530 Message-ID: <1515504186-13587-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> References: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131599778255172327; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(51416003)(81156014)(86362001)(105606002)(498600001)(106466001)(50466002)(2351001)(4326008)(8676002)(5660300001)(47776003)(50226002)(36756003)(97736004)(16586007)(53936002)(6916009)(2950100002)(8936002)(54906003)(8656006)(6666003)(356003)(104016004)(305945005)(2906002)(48376002)(81166006)(76176011)(77096006)(68736007)(85426001)(316002)(296002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2691; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD028; 1:F0j/sHyyNJxsbP2xADVPvW2R8IqrV/q4gWx1cPCwFEQxbGaiaAEAVdFnBWk1iqJz2nvWh7aHyM6vU5CsmmhWFfQhW6uGQkk34PSc7T+eKigsKBQ5AszVHdnpi4PfxDwU MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fcb3f31-e708-42e1-72e7-08d5576435e2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2691; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 3:HATEmT63I+KYeyjcjzxLOhnMsLW817wgUAvZ4JpOJAgtRLXQzd2myJOKelbeHpMNesLKVuSDIOD05HqBFzVOJuU+x1VAsiPyESlN7VNGeqlX4z0XNCUA17eqKMdsIqaSb/iOhljnLPJs5Twm+dDP00UXXG0DVMepeuFWAxPsLD5tA6+e7hRhC6C2O/SywBfa3EuC46n011wrrDWdofMW7zwQvphXrfPU1mXqArqvu/K65rFLkbSQ4BxIb29f6/KW8cOeILbzw1fVMyGi8r7NiPMlr4vw9SVZIWS5Zk6UQi/M/ZHZ8ocl2To/7l4NiXvqv1W+/Y75noao7OcWgDf7LZuBdIIgQgRtTG7HTrCMl84=; 25:KK0yCaNUKDzYfoGU/XRm/EjEE6qVGUuX6P23Z1XTqEHNxmpaWqsQt/5MESCdH4XgbWl3+ddV5B5pDiKsy7aEETywvETxhUlCff8WhW1C9UoHN36Bww5QlKyZwWnME5bgpJ7R2DekABM24XB7qkTgFOao5NDIWQGLiluiEiUzx1oiqTX8TcCvqpYoFvgEim+MgKK3ZwVsAMi0AaydBm6du5AoY+O7Kdnw/Q3SMaPQ98cg0bdTddbWU0uK29v/wQAS0t9csC5WSKpmuoEt4fZyZbuGTxxc+2pAxIDjSzc3g/Y1wvoGKBZAb2wv7azs+quBswPcCQHRU2WHwvc1HCmENg== X-MS-TrafficTypeDiagnostic: BN6PR03MB2691: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 31:DfongGgY1gY3O9pq7gQ6kNEVulsv/OMFjhcoDu8Tg7qzLTNnLXXrZNBsV+PfJM9cmkmJ+CGkN9VEA1s/wC+rMw1zh5tPxS8mqU7Kb6uNmE+QkSCXlgdsxap21WXZFIqwTTtsnyErOuI7VUdtuuA7ILEgGCnmR1Oly5d+vpnzXqgx1g58nBl8JEMMM/JBtw8sX2NsMlxKxN2Q6uSEbedKbeT4AgsuCeWulph0DXATOZI=; 4:DVsLdmDzTfblQOYe073WpQvES5yq0lhRX7p6e2aWkpMf1WO7eFSjGGFR/2xCW8Gx+6qM8b2sItGJHG2hH5tkFtO+wYlgDEqmi64r2XzsI2K4G6ziw0Xy/T2WwVz5rAl2g8Z22ettRpcZTuHY/5rwWK7mK0hkzy0RO/MDZddjJTV0WI71rLHqDAmwEVQ26k2vtt+SavIQ3iKpdcp0O/uUP7FYtfhncdEqbtDsNBVWCiNyfl1ponNZOp+Gh0xvvfBj7H7eux+ycmIbzYdgZ85DWxfW4GKRLBkMiXBWJ6+dJ/H+FMWQb7z012j0lGqba4mK 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)(3231023)(944501110)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(20161123561025)(20161123565025)(20161123559100)(201708071742011); SRVR:BN6PR03MB2691; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2691; X-Forefront-PRVS: 0547116B72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2691; 23:lrAK5Tvyoo1yROqZqR6TlUe65a8O8Vi4gyXkiNid+?= 6Bh2whRRkCUPMjhi97aNxCOLnGZszXqHnh3jSeYWrpH4+nEZCdrl99drxmejTg9aagCD9aybn+gkXoD3qyMiOyWksCO3pn7ZdC3TG+VilMJUMaBpJyxxmcpav/W10Tfv+GmglPOZPvmO70ACM6Fi3omCva1Ki4Mp1ieqKXFOY9zeJ8In/GfaqVoIJk96jrdbQHWhTsHchqBRhJOBLFyIshplqR3Z8vW+CFOL64qjHhBx4NLYwZmF1XD+9YXeJgesKtThsukr0VuVZky4mLZ9dtEl7T9hikfP0NqQtMmL3xnvxj1RPAyiRviauxZpw3jVxdphRMhld4MqFt+0L7F44H4DkZ1iV/OHDb1B71MfCHZmGei72veGNi/6LaPG8V4KZlO0/PSoPpLvR9xHetxsSoLGfOUcN/FdfYWZ/DRAZsNNo9pykZ02SokD29jhwczOsURfnSMPAX5s5hRS417mLFLRuqLSIhH2Kadj3KLFIyRTXTNt6Efk5dD0Cf7tWrbkhAaDSYucxwAlP7nR7uA5WnQ+8x2Jhayxhq5HmevjTraUBgR6vMszSVAmwSgxK4FIBixzP4hEWGp67AWqpXO84yKff3y+FMFFgJnuk942dDGHrBvzqZGSyob49J7HvRMJZgQwcAj1+Pz7ViyyAPsBRu3cOgnKMFNGXZecKAafq+UB8EMlXWWbl6l5fDOljjy75V9y/KSOt0XuUF+txDnnZm1oWZlu8yBb8OSxNpdnObKPJXMVnwkacoM+6ID3TB97zoqJOXUHWfB6BHQo/4jp/tXQ7DkmpXrVe0Lp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Grr7qJDdu20BP+LWRTFMCtB30qk+23eNL6H3BIvUbv4IZo+hPvujYuY5XyfPuwHF1qXIfIZ/2PdGAz6/YLi4JSh9o5B+DZZgxLstSyXHTLUsKJSbHBUVN6MrqRMX/J37u SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2018 13:23:45.3144 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fcb3f31-e708-42e1-72e7-08d5576435e2 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: BN6PR03MB2691 Subject: [dpdk-dev] [PATCH v2 01/18] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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(+) -- 2.7.4 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: "