From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 6E9911B1C5 for ; Wed, 24 Jan 2018 16:39:38 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BB59122374; Wed, 24 Jan 2018 10:39:37 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:39:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=kRXRwkAve4VMmA241 ouwkvgpGxsl2ARGi9PNoN2cX0U=; b=Ch7pR88oecdbRuAd6u/+w/XH9jTgccowy kNsxwp8aHtJriWEm2s1lA73RxVAvA2LTkLGag/sfkXogO4wXNJ5s13lu3FoNbyQi kbjDWf3QWu/6PmXkjLRofzHDc8v4KerrA0/KRkWcCCkIz3DQuYont++ReSRjMgmU t17Q297XW7PmvxJGeWIAka4yctVca7dVOTkK3xwj4AslnRVDotfT14IvPG1ucGNy B3MTbEynUhuHgmmvJ3TD1aC4PWinaR9OdUy/vGWWImiKVWwtuzQplEzJgFxMYnO0 QS22uZBH3ZnDUxRftiUYgym2VpghZcbrgxOnngCfteC0IWsJ2m4eQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=kRXRwkAve4VMmA241ouwkvgpGxsl2ARGi9PNoN2cX0U=; b=V+10h0S3 lY7T3mqss5PLBzytr5D0BH3pRuyYVRr5uJVIpa5I0f3mfSnzsCtiniuPK8l205qW RY8cD/mSMCwvTA8FBkAHqB3aKhQVrZXpdvujs9/F/lvrlKSJLGkgUOBnakIrf1EQ qWfex86+K4gR+3zuM1MGYPfzFk6EBUz2jeX7DmISlFvZsvhehCTUAbcBtP5Ax6v+ 3/jswd7qpxOZiqLJpwk1/zZGZuTzakKpm8wD21VGhAKkXjocFEFGiWYCy3gWISc8 KRaP6eLBeDClgxTJNPH7emkykkN6DhCtcm/icW37um3K79iuGz8QVe0bMupxb5Xm afm6RPA5oXKbBA== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id F03017E1A2; Wed, 24 Jan 2018 10:39:35 -0500 (EST) From: Yuanhan Liu To: Ashish Jain Cc: Hemant Agrawal , dpdk stable Date: Wed, 24 Jan 2018 23:32:31 +0800 Message-Id: <1516808026-25523-83-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/dpaa: fix the mbuf packet type if zero' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:39:38 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 7b07235c7c25cf50d75ee5bf32308b462161c8fb Mon Sep 17 00:00:00 2001 From: Ashish Jain Date: Wed, 10 Jan 2018 16:16:24 +0530 Subject: [PATCH] net/dpaa: fix the mbuf packet type if zero [ upstream commit d565c887384e6850e663dcb97815fe3c840d7c38 ] Populate the mbuf field packet_type which is required for calculating checksum while transmitting frames Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx") 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 771e141..c0cfec9 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -58,6 +58,7 @@ #include #include #include +#include #include "dpaa_ethdev.h" #include "dpaa_rxtx.h" @@ -504,6 +505,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 @@ -611,6 +621,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