From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B363A0544 for ; Fri, 2 Sep 2022 10:48:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 070F5427ED; Fri, 2 Sep 2022 10:48:31 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2056.outbound.protection.outlook.com [40.107.243.56]) by mails.dpdk.org (Postfix) with ESMTP id E86EA427ED; Fri, 2 Sep 2022 10:48:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MBZpOjzhdFU7yiiUjoFNwycUY/cMkOQ9xMauAZNI8hOkruQMV7MH3FnxaM+z4k4hn8uC+TTWpLo/X7l8h4+BwTxbSdlAoEWhDbbdsDkBhHMPavRHNn9PeBib00kAugzGq3YKc2hoBbLYOa/MpDxghJwjwaa8UtEl+cZqRjeHvCtd/eyNDBp9TU2RA08uZgpDmxe9dP9bzRbNBVaZhj0jWDk+aVaJKlhFRf9wt5fSrEjJ50CvUxzeJGCBJMPzD/dVVxlMDBj0x1/jhCLrqfEI5lPwVjChXeRcmdna1hOjGCzsRegWrLvd9t1CHLk4gM5mNKZR533feQlyipUxnki0Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yh7pAZKj0wGKLAUjdR8z4sBrQYQ9sw6OsUwXcplE5aI=; b=Zu2fNtsZFSDBn4R0i7GdB41Wy3JzoBGoyK8rvAwlPVzTuzF73vxm68n0GVcUCuy7CbGO4/5vKaBOrgKDYnH/nFQbXSwnn9hALZVckrMKyNR6DyRvZlM95smMXxsTGymU5fpGaXF4eKHDVGPJZfBYtYH8GKXcbph84DONznihKDgcRUScqSR/zG8fzX/1ZbyPNCpJZrJYhlFwgFQJtaGT3EG310ZksKSHINF/GmH9fktMocAweKY10rdxWpV8FFtykCrAuYuQbOn9KvUEwwH5AZO2ZL/8HVFuQAwKuKAQXWdLyb6UvhvldaU4alxfhco4QLCnFd8wLrwaTV6MfkcS+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yh7pAZKj0wGKLAUjdR8z4sBrQYQ9sw6OsUwXcplE5aI=; b=JAS4oCGe59BxMRWguAswftONk9F95u1/BXqJK1DohhYUUoMZZc4YuAOWFkBJTWA8lxEa08CxDazqgVqqEt2WyBBju246gqyxKl2b9U1q+F3sqzziP9kaQ73D/ks1nPPfUezE2A7MMDJDxkJt39ROS57zLvhXQbAJpW2Xs1nDo0E= Received: from CY5PR15CA0171.namprd15.prod.outlook.com (2603:10b6:930:81::17) by PH0PR12MB7011.namprd12.prod.outlook.com (2603:10b6:510:21c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Fri, 2 Sep 2022 08:48:27 +0000 Received: from CY4PEPF0000B8E8.namprd05.prod.outlook.com (2603:10b6:930:81:cafe::4d) by CY5PR15CA0171.outlook.office365.com (2603:10b6:930:81::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.15 via Frontend Transport; Fri, 2 Sep 2022 08:48:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000B8E8.mail.protection.outlook.com (10.167.241.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.7 via Frontend Transport; Fri, 2 Sep 2022 08:48:27 +0000 Received: from cae-Selwin.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 2 Sep 2022 03:48:24 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH v3 3/4] net/axgbe: fix length of each segment in scattered Rx Date: Fri, 2 Sep 2022 04:47:53 -0400 Message-ID: <20220902084754.99884-3-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220902084754.99884-1-bhagyada.modali@amd.com> References: <20220901124948.97063-1-bhagyada.modali@amd.com> <20220902084754.99884-1-bhagyada.modali@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64871f28-cbcd-4077-629a-08da8cbfe764 X-MS-TrafficTypeDiagnostic: PH0PR12MB7011:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nnS51NmyVmvYVKX65IPTugDihN4H1K+L/Is9ea0uzA4JShzOorTXwfyrFo7dfIyO671+4g1syT+auYY70Jh77hwsQrXufyDxQ+LJ9rkXXDktfFFwJ8KQgaF0Kz6po61M1blZqXxA636YCjM2BuKIOmUNZqJNPEzjaMsnf6NDiwcZYdN9WL1lPFImM9UcCv8rK4QKjp1lEHGLAg9W81vGOC1WPmaE90c41tZrNNhNtSbNCyM43mcQKGTo67s3mnDLZIgf/0NGgc8Bb8x5hxx4awjs8Fd+SWxDWZeJ0/i6eePeMZPquptC5AnFN+jLjU9aO6966atwrPbia/qISq2HRfsscK5eo/dpqOYUcC/O7jT4tsobQo51LTcDl2p2d9muw1uKWs7+hBNTsqKBl0AfpDb/ZNgZuvnfL7q+LxJaOKSlzcllS/ErXny1Iwnc5vx59R6SGfVkNCtjpGyJHXbZ+gdGeDeEQ31iZFkWm1LKsZaZk+OZSxCkOcizuWC+0WMB5MAz2ro/RwCFc08c85uSqv0wIJUTLu/9U12zPQi3wF7RNgCDIp0zZEEFb4e6jLY6ScqnjXFvOO18TtxdUplFN+RuwaI9hPHAGRGllQWhPligQp0Wise7tdxHEwRAxVJAXxMoKfUKUjznqqkTlxpvUxXZIjmuCSzxFPgJO1B1EVW+Emxq21XGUkFobpGVezHLl5QhS8gU+mShX+XQ2NR2qJAfMWFIiITRu2VQ5X3NDgv2hbiWzAb0Py8RZ4BA8/4RYdtMyZV+D7i1Iq4HJg2Mn/ht9YsLS63andHZPSfWzdRSWdozOrshau/cI7vb7BxiapdY2L2kjzmALGQsepU0dg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(376002)(346002)(136003)(396003)(39860400002)(46966006)(40470700004)(36840700001)(83380400001)(1076003)(26005)(2906002)(16526019)(86362001)(336012)(2616005)(70586007)(4326008)(40480700001)(186003)(426003)(47076005)(356005)(70206006)(82310400005)(8676002)(4744005)(36756003)(450100002)(36860700001)(478600001)(44832011)(40460700003)(8936002)(6666004)(110136005)(41300700001)(5660300002)(81166007)(6636002)(54906003)(82740400003)(316002)(7696005)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2022 08:48:27.3541 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64871f28-cbcd-4077-629a-08da8cbfe764 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7011 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Updating mbuf data_len, Pkt_len for each segment before chaining them Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Cc: stable@dpdk.org Signed-off-by: Bhagyada Modali --- drivers/net/axgbe/axgbe_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 2c2554e900..7c07fd90ef 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -412,6 +412,10 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, } } + /* Mbuf populate */ + mbuf->data_off = RTE_PKTMBUF_HEADROOM; + mbuf->data_len = data_len; + mbuf->pkt_len = data_len; if (first_seg != NULL) { if (rte_pktmbuf_chain(first_seg, mbuf) != 0) @@ -443,9 +447,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, mbuf->vlan_tci = 0; } } - /* Mbuf populate */ - mbuf->data_off = RTE_PKTMBUF_HEADROOM; - mbuf->data_len = data_len; err_set: rxq->cur++; -- 2.25.1