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 42E2FA0032; Thu, 1 Sep 2022 14:50:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A334427F7; Thu, 1 Sep 2022 14:50:17 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2072.outbound.protection.outlook.com [40.107.244.72]) by mails.dpdk.org (Postfix) with ESMTP id BEDB8427F4 for ; Thu, 1 Sep 2022 14:50:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LcRaQF+5roXuSRQOBdyPJk0rC3ayY7QyKNSpNRP2oaf4fuLQBcVV9ojbflSBHYXxbvdvlSuQRWlMUqSOKfd0zIk7+vmq2SkzlE3PG740tjHONW+flbiM/WlKGcJdMTb862ypEfWzkM/TG2L4qlo9dk3JFkKV9gJ5Z5JkiYASf+81wmFHG1V2fg7jnw6h1H3MvRbvRTSs4LiHiVNx1iVTvV8TN4Wg3ntUhrpL1BY61RZTlBhihhaZkaoD0QRcEPCNq51Pp1MrrSXU/bUwaUMlu0dIrvExY/wQI62lbM3vgzfgVzvyu3bEdHDPQgxGfPJYj4hNLz640yZaMC9lVLNqog== 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=UqzcqEuFEEZjhMQ8/XovVynMsU2DXkvikVCx1hh07EQ=; b=m1bFly4g+ZHljomIm8Wosts3O2bBXYQnzCFNrXpCeqSEDQU9N7E6sqNXljCco/SBS9LK2NQlATPYa117l0Wn8cVB/brzFomz10u5OzAgfZGI6tAysQXjiQh6oA8MS+s9BPIarmIA2RxbDEgIIydbQbrOz9u8QHa4i7jqw97vsKGNX19f8I9bGmn1RBdKknnrQLheiB1zOC91kJAB463c/8FunhXGaOBHbxwJHdLviqFTelNLwJNp/kzNSzZedAe8jBRItR0P90i6kiyOCoULV4JPAZ/cgv10KxD8Wbs2z2G4cFlb9SshRDHVJdc7LswvG7efPSrj7Twd1Q6hSReDWg== 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=UqzcqEuFEEZjhMQ8/XovVynMsU2DXkvikVCx1hh07EQ=; b=QB0vieeKndTp4uihTnNGB8MAXqUn5wsh1YN6cHCj45WWDAWKQGmh1/RGvmKa58M2ItIaWnSwlZD0JDMjQ7d36UvIarW6bdt+YTqnAJCFlZuO0bba7PyWOKimp+8q69L4h+2IfIUTnViUJkQJEQZ05w32TIgmhz5z71zGsUyVOt4= Received: from BN0PR03CA0054.namprd03.prod.outlook.com (2603:10b6:408:e7::29) by DM4PR12MB6278.namprd12.prod.outlook.com (2603:10b6:8:a4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 1 Sep 2022 12:50:13 +0000 Received: from BN8NAM11FT092.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e7:cafe::5c) by BN0PR03CA0054.outlook.office365.com (2603:10b6:408:e7::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11 via Frontend Transport; Thu, 1 Sep 2022 12:50:13 +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 BN8NAM11FT092.mail.protection.outlook.com (10.13.176.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.10 via Frontend Transport; Thu, 1 Sep 2022 12:50:13 +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; Thu, 1 Sep 2022 07:50:10 -0500 From: Bhagyada Modali To: , CC: , Bhagyada Modali Subject: [PATCH v2 3/4] net/axgbe: fix length of each segment in scattered Rx Date: Thu, 1 Sep 2022 08:49:47 -0400 Message-ID: <20220901124948.97063-3-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220901124948.97063-1-bhagyada.modali@amd.com> References: <20220901053311.92964-1-bhagyada.modali@amd.com> <20220901124948.97063-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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0db00f42-f0ba-400b-8f58-08da8c18832f X-MS-TrafficTypeDiagnostic: DM4PR12MB6278:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TOPVcJnqd/+gYMA71gYxc79QfOnjZiaqrF91ZV1uj08xLF0jKvw58/CEdFzMlDfYZJL+v36UN8InER4uTLVXwWOfIdygMOrKSBu+8ZmIUBENMgwXvem14zOxwzsBTz8ebogjzp+EFxZzHjN3iRdbp5x5XQC30jdXN8NLgslBLzvwTi0w/mgUtWq+zSeCC/vAuHbuo9uXqWJxhJZfqkS3i6LJ70RZe2TiAv+/5kj0i4bO4OVdodQpMYo93l9FkDcS+IdZWfrZp1sQYs0oLKuHxpGPuX+I851k4/GshxWrUeqaOspqT2ta9yJjWE43pooZmRZpPY2OJseUC0YcEE9X/nHun2VPNhc77mRzB4ROag52oVNZyBUeYwaFhWYSkEjmFq67MH8RDUTRoyC7uOdwmqKRxO99s19cKH24XUXkb6AF7N1XCE6m1W+kUwFvzTCIP01R9ZhdqDP2U5nZIEiQn0ksDArhPQQgCJK3gJi5HsC+4XcAXafdCVXonX7FdLUy5NvasMcKVaqHSJNFVCmtjA8e8NOPSaCiXpfa9hvoii9DyUfrbT+6MGsPOx49OViC/9gm4Z2N+/+QybIMQI9pWFlqp6PCvc5WB3IrRLptrYMemqy4CtVrwbAaVd72efZJ/JQ4bN7g8HEzXUgefjO7KAzI93REsAto9Og2qGweoVPHcNOhW3XlHpqcvHEhRLVuWesbBzIuW/vDZyKLgJGEO1TRp+Qa+ZQvBJc8VDgcyGUUEUM+YlCZPwt/yBI11oXN+1jLQBisM3kd/zr/K7tVbDRoFp9ZI8r6Q1x/CgQ3qu44ACdQ3zN87e5qjLi556w4jn8T5TUK7noQA2LJED5AGw== 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)(136003)(346002)(376002)(39860400002)(396003)(40470700004)(36840700001)(46966006)(26005)(478600001)(6666004)(41300700001)(336012)(83380400001)(186003)(7696005)(2906002)(2616005)(82310400005)(47076005)(44832011)(1076003)(4744005)(426003)(40460700003)(16526019)(54906003)(110136005)(8936002)(40480700001)(5660300002)(6636002)(356005)(70206006)(4326008)(36860700001)(36756003)(70586007)(81166007)(316002)(82740400003)(8676002)(86362001)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 12:50:13.3757 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0db00f42-f0ba-400b-8f58-08da8c18832f 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: BN8NAM11FT092.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6278 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Updating mbuf data_len, Pkt_len for each segment before chaining them Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") 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