From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9876DA04B5; Mon, 26 Oct 2020 05:01:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 18070592C; Mon, 26 Oct 2020 04:57:22 +0100 (CET) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 533903976 for ; Mon, 26 Oct 2020 04:56:45 +0100 (CET) Received: by mail-pg1-f193.google.com with SMTP id n16so5327468pgv.13 for ; Sun, 25 Oct 2020 20:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=lbQBfSDI6fFCVZvq3xrEZiZnvysFF5Fc2WHciEsxkTQ=; b=EbjKaH24WrHR7FpkYH3Z3C2OClr7nU1Tp5B3izQDnR/wCcPV5sGs3KAQ50vCkbKy7J gfWYnnx3Pg7kt5Ol8DJeeWZgZP5d175kx0MCF188HPh3H/W3R7ujhIi8BqUcdrQkPFTS YSy6l88mP3wJ/yMa6vA6pX0oqSVy6iDNLMGgA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=lbQBfSDI6fFCVZvq3xrEZiZnvysFF5Fc2WHciEsxkTQ=; b=TEPMTz2hWbSFkMLNRNA2L7aSAzcjuiYy+KuK/mUSVixAr7VnqLESzLVp0mVjx/qI4L mt1ImVfOdO6LKzXYnQMAUxv8R20nyDdaOlukKxPDjinhVaZ4+b/Z2VZ3hBMZCwCgKspj M/NiFEJVEiLcVmb+HhBL1tFMUJdLxC81rwMBh0+xbsctVplSSz2doH8ekP1tJBDQKow0 Gj7RtdoFQxBD7RwuNqIvKBJL5GWhWOJ6mSVfEihSAqzyayP0qYRKvnFtfwVD6jXEHwqy 9sZA3gfUq0lWzZuK3kxls8UDU/JYyeX/erbVd3LMU41FfyfEfk3cxEPlb9mANxR3y25z zpdw== X-Gm-Message-State: AOAM533hjFaK/2t+oYGq8rowH/z5ESzFdRx6hSaibLL+ZOk9pDas9h9f r3PkQmG3THJfJ0tfEoVNbH8/qiqkd3eMzcXh1KDIZuXXh8q4UFN8YI5WFKpIedZucpJ7/mPqj3j Yj9+ESvM1o6pfleTR4Z57Li9np37JRR/PKYPtfm5Bp5pZyG12kT/zo8DHwj0dbfq6lw== X-Google-Smtp-Source: ABdhPJyoxakmSxh4H2/aTWbbAjG1De72F6A3TqSC1jLpApwDU8FTgE7MXUbVxMKYOY2MZmVSK2FceA== X-Received: by 2002:a65:4489:: with SMTP id l9mr14219759pgq.393.1603684603136; Sun, 25 Oct 2020 20:56:43 -0700 (PDT) Received: from localhost.localdomain ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id z185sm10207463pfz.32.2020.10.25.20.56.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Oct 2020 20:56:42 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org, Lance Richardson Date: Sun, 25 Oct 2020 20:56:14 -0700 Message-Id: <20201026035616.19264-14-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201026035616.19264-1-ajit.khaparde@broadcom.com> References: <20201026035616.19264-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [PATCH v4 13/15] net/bnxt: fix to reset mbuf data offset 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" Reset mbuf->data_off before handing the Rx packet to the application. We were not doing this in the TPA path. It can cause applications using this field for post processing to work incorrectly. Fixes: 0958d8b6435d ("net/bnxt: support LRO") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_rxr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 039217fa60..e41833cc43 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -150,6 +150,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq, tpa_info->mbuf = mbuf; tpa_info->len = rte_le_to_cpu_32(tpa_start->len); + mbuf->data_off = RTE_PKTMBUF_HEADROOM; mbuf->nb_segs = 1; mbuf->next = NULL; mbuf->pkt_len = rte_le_to_cpu_32(tpa_start->len); -- 2.21.1 (Apple Git-122.3)